diff options
author | Chen Zhongjin <chenzhongjin@huawei.com> | 2022-10-04 13:59:25 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-10-06 13:03:52 +0200 |
commit | 30b842d27dfa90046c46bbfa884113885e742279 (patch) | |
tree | b4543c5506ed862da6a0ab63f2026f3def471755 /tools/perf/util/parse-events.c | |
parent | perf tools: Fix empty version number when building outside of a git repo (diff) | |
download | linux-30b842d27dfa90046c46bbfa884113885e742279.tar.xz linux-30b842d27dfa90046c46bbfa884113885e742279.zip |
perf parse-events: Remove unused macros __PERF_EVENT_FIELD()
Unused macros reported by [-Wunused-macros].
This macros were introduced as __PERF_COUNTER_FIELD and used for reading
the bit in config.
cdd6c482c9ff9c55 ("perf: Do the big rename: Performance Counters ->
Performance Events") Changes it to __PERF_EVENT_FIELD but at this commit
there is already nowhere else using these macros, also no macros called
PERF_EVENT_##name##_MASK/SHIFT.
Now we are not reading type or id from config. These macros are useless
and incomplete.
So removing them for code cleaning.
Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Florian Fischer <florian.fischer@muhq.space>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20220926031440.28275-5-chenzhongjin@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index f3b2c2a87456..437389dacf48 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -150,14 +150,6 @@ struct event_symbol event_symbols_sw[PERF_COUNT_SW_MAX] = { }, }; -#define __PERF_EVENT_FIELD(config, name) \ - ((config & PERF_EVENT_##name##_MASK) >> PERF_EVENT_##name##_SHIFT) - -#define PERF_EVENT_RAW(config) __PERF_EVENT_FIELD(config, RAW) -#define PERF_EVENT_CONFIG(config) __PERF_EVENT_FIELD(config, CONFIG) -#define PERF_EVENT_TYPE(config) __PERF_EVENT_FIELD(config, TYPE) -#define PERF_EVENT_ID(config) __PERF_EVENT_FIELD(config, EVENT) - bool is_event_supported(u8 type, u64 config) { bool ret = true; |