Skip to content

Commit 2dc065e

Browse files
namhyungacmel
authored andcommitted
perf evsel: Add missing cloning of evsel->use_config_name
The evsel__clone() should copy all fields in the evsel which are set during the event parsing. But it missed the use_config_name field. Fixes: 1227942 ("perf stat: Uniquify hybrid event name") Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Jin Yao <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent f677ec9 commit 2dc065e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/perf/util/evsel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ struct evsel *evsel__clone(struct evsel *orig)
428428
evsel->auto_merge_stats = orig->auto_merge_stats;
429429
evsel->collect_stat = orig->collect_stat;
430430
evsel->weak_group = orig->weak_group;
431+
evsel->use_config_name = orig->use_config_name;
431432

432433
if (evsel__copy_config_terms(evsel, orig) < 0)
433434
goto out_err;

tools/perf/util/evsel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ struct evsel {
8383
bool collect_stat;
8484
bool weak_group;
8585
bool bpf_counter;
86+
bool use_config_name;
8687
int bpf_fd;
8788
struct bpf_object *bpf_obj;
89+
struct list_head config_terms;
8890
};
8991

9092
/*
@@ -116,10 +118,8 @@ struct evsel {
116118
bool merged_stat;
117119
bool reset_group;
118120
bool errored;
119-
bool use_config_name;
120121
struct hashmap *per_pkg_mask;
121122
struct evsel *leader;
122-
struct list_head config_terms;
123123
int err;
124124
int cpu_iter;
125125
struct {

0 commit comments

Comments
 (0)