perf parse-event: Constify event_symbol arrays
Moves 352 bytes from .data to .data.rel.ro. Signed-off-by: Ian Rogers <irogers@google.com> Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Tested-by: Atish Patra <atishp@rivosinc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Beeman Strong <beeman@rivosinc.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20240416061533.921723-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
e30a7912f4
commit
4a20e79365
@ -39,7 +39,7 @@ static int get_config_terms(const struct parse_events_terms *head_config,
|
||||
static int parse_events_terms__copy(const struct parse_events_terms *src,
|
||||
struct parse_events_terms *dest);
|
||||
|
||||
struct event_symbol event_symbols_hw[PERF_COUNT_HW_MAX] = {
|
||||
const struct event_symbol event_symbols_hw[PERF_COUNT_HW_MAX] = {
|
||||
[PERF_COUNT_HW_CPU_CYCLES] = {
|
||||
.symbol = "cpu-cycles",
|
||||
.alias = "cycles",
|
||||
@ -82,7 +82,7 @@ struct event_symbol event_symbols_hw[PERF_COUNT_HW_MAX] = {
|
||||
},
|
||||
};
|
||||
|
||||
struct event_symbol event_symbols_sw[PERF_COUNT_SW_MAX] = {
|
||||
const struct event_symbol event_symbols_sw[PERF_COUNT_SW_MAX] = {
|
||||
[PERF_COUNT_SW_CPU_CLOCK] = {
|
||||
.symbol = "cpu-clock",
|
||||
.alias = "",
|
||||
|
@ -250,8 +250,8 @@ struct event_symbol {
|
||||
const char *symbol;
|
||||
const char *alias;
|
||||
};
|
||||
extern struct event_symbol event_symbols_hw[];
|
||||
extern struct event_symbol event_symbols_sw[];
|
||||
extern const struct event_symbol event_symbols_hw[];
|
||||
extern const struct event_symbol event_symbols_sw[];
|
||||
|
||||
char *parse_events_formats_error_string(char *additional_terms);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user