Commit 2dc065ea authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo
Browse files

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: 12279429 ("perf stat: Uniquify hybrid event name")
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarIan Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210602212241.2175005-2-namhyung@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f677ec94
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -428,6 +428,7 @@ struct evsel *evsel__clone(struct evsel *orig)
	evsel->auto_merge_stats = orig->auto_merge_stats;
	evsel->collect_stat = orig->collect_stat;
	evsel->weak_group = orig->weak_group;
	evsel->use_config_name = orig->use_config_name;

	if (evsel__copy_config_terms(evsel, orig) < 0)
		goto out_err;
+2 −2
Original line number Diff line number Diff line
@@ -83,8 +83,10 @@ struct evsel {
		bool			collect_stat;
		bool			weak_group;
		bool			bpf_counter;
		bool			use_config_name;
		int			bpf_fd;
		struct bpf_object	*bpf_obj;
		struct list_head	config_terms;
	};

	/*
@@ -116,10 +118,8 @@ struct evsel {
	bool			merged_stat;
	bool			reset_group;
	bool			errored;
	bool			use_config_name;
	struct hashmap		*per_pkg_mask;
	struct evsel		*leader;
	struct list_head	config_terms;
	int			err;
	int			cpu_iter;
	struct {