perf parse-events: Compare with hybrid pmu name
On hybrid platform, user may want to enable event only on one pmu. Following syntax will be supported: cpu_core/<event>/ cpu_atom/<event>/ For hardware event, hardware cache event and raw event, two events are created by default. We pass the specified pmu name in parse_state and it would be checked before event creation. So next only the event with the specified pmu would be created. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Reviewed-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20210427070139.25256-12-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
94da591b1c
commit
c93afadc92
@ -138,6 +138,7 @@ struct parse_events_state {
|
||||
struct list_head *terms;
|
||||
int stoken;
|
||||
struct perf_pmu *fake_pmu;
|
||||
char *hybrid_pmu_name;
|
||||
};
|
||||
|
||||
void parse_events__handle_error(struct parse_events_error *err, int idx,
|
||||
@ -188,7 +189,8 @@ int parse_events_add_tool(struct parse_events_state *parse_state,
|
||||
int parse_events_add_cache(struct list_head *list, int *idx,
|
||||
char *type, char *op_result1, char *op_result2,
|
||||
struct parse_events_error *error,
|
||||
struct list_head *head_config);
|
||||
struct list_head *head_config,
|
||||
struct parse_events_state *parse_state);
|
||||
int parse_events_add_breakpoint(struct list_head *list, int *idx,
|
||||
u64 addr, char *type, u64 len);
|
||||
int parse_events_add_pmu(struct parse_events_state *parse_state,
|
||||
|
Reference in New Issue
Block a user