diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-03-08 10:11:33 -0300 | 
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-03-08 10:11:33 -0300 | 
| commit | 009ef05f98129aa91c62c3baab859ba593a15bb2 (patch) | |
| tree | f3414f08d636a597545b1e4f443b373b9d6d8f4b /tools/lib/perf/evlist.c | |
| parent | 2777b81b379df772defd654bc4d3fa82dca17a4b (diff) | |
| parent | 144c79ef33536b4ecb4951e07dbc1f2b7fa99d32 (diff) | |
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up the fixes sent for v5.12 and continue development based on
v5.12-rc2, i.e. without the swap on file bug.
This also gets a slightly newer and better tools/perf/arch/arm/util/cs-etm.c
patch version, using the BIT() macro, that had already been slated to
v5.13 but ended up going to v5.12-rc1 on an older version.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/perf/evlist.c')
| -rw-r--r-- | tools/lib/perf/evlist.c | 13 | 
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c index 17465d454a0e..a0aaf385cbb5 100644 --- a/tools/lib/perf/evlist.c +++ b/tools/lib/perf/evlist.c @@ -26,13 +26,10 @@  void perf_evlist__init(struct perf_evlist *evlist)  { -	int i; - -	for (i = 0; i < PERF_EVLIST__HLIST_SIZE; ++i) -		INIT_HLIST_HEAD(&evlist->heads[i]);  	INIT_LIST_HEAD(&evlist->entries);  	evlist->nr_entries = 0;  	fdarray__init(&evlist->pollfd, 64); +	perf_evlist__reset_id_hash(evlist);  }  static void __perf_evlist__propagate_maps(struct perf_evlist *evlist, @@ -237,6 +234,14 @@ static void perf_evlist__id_hash(struct perf_evlist *evlist,  	hlist_add_head(&sid->node, &evlist->heads[hash]);  } +void perf_evlist__reset_id_hash(struct perf_evlist *evlist) +{ +	int i; + +	for (i = 0; i < PERF_EVLIST__HLIST_SIZE; ++i) +		INIT_HLIST_HEAD(&evlist->heads[i]); +} +  void perf_evlist__id_add(struct perf_evlist *evlist,  			 struct perf_evsel *evsel,  			 int cpu, int thread, u64 id)  | 
