@@ -144,9 +144,9 @@ void evlist__delete(struct evlist *evlist)
144144 perf_evlist__munmap (evlist );
145145 evlist__close (evlist );
146146 perf_cpu_map__put (evlist -> core .cpus );
147- perf_thread_map__put (evlist -> threads );
147+ perf_thread_map__put (evlist -> core . threads );
148148 evlist -> core .cpus = NULL ;
149- evlist -> threads = NULL ;
149+ evlist -> core . threads = NULL ;
150150 perf_evlist__purge (evlist );
151151 perf_evlist__exit (evlist );
152152 free (evlist );
@@ -168,7 +168,7 @@ static void __perf_evlist__propagate_maps(struct evlist *evlist,
168168 }
169169
170170 perf_thread_map__put (evsel -> core .threads );
171- evsel -> core .threads = perf_thread_map__get (evlist -> threads );
171+ evsel -> core .threads = perf_thread_map__get (evlist -> core . threads );
172172}
173173
174174static void perf_evlist__propagate_maps (struct evlist * evlist )
@@ -342,7 +342,7 @@ static int perf_evlist__nr_threads(struct evlist *evlist,
342342 if (evsel -> system_wide )
343343 return 1 ;
344344 else
345- return thread_map__nr (evlist -> threads );
345+ return thread_map__nr (evlist -> core . threads );
346346}
347347
348348void evlist__disable (struct evlist * evlist )
@@ -425,7 +425,7 @@ int perf_evlist__enable_event_idx(struct evlist *evlist,
425425int perf_evlist__alloc_pollfd (struct evlist * evlist )
426426{
427427 int nr_cpus = cpu_map__nr (evlist -> core .cpus );
428- int nr_threads = thread_map__nr (evlist -> threads );
428+ int nr_threads = thread_map__nr (evlist -> core . threads );
429429 int nfds = 0 ;
430430 struct evsel * evsel ;
431431
@@ -556,8 +556,8 @@ static void perf_evlist__set_sid_idx(struct evlist *evlist,
556556 sid -> cpu = evlist -> core .cpus -> map [cpu ];
557557 else
558558 sid -> cpu = -1 ;
559- if (!evsel -> system_wide && evlist -> threads && thread >= 0 )
560- sid -> tid = thread_map__pid (evlist -> threads , thread );
559+ if (!evsel -> system_wide && evlist -> core . threads && thread >= 0 )
560+ sid -> tid = thread_map__pid (evlist -> core . threads , thread );
561561 else
562562 sid -> tid = -1 ;
563563}
@@ -722,7 +722,7 @@ static struct perf_mmap *perf_evlist__alloc_mmap(struct evlist *evlist,
722722
723723 evlist -> nr_mmaps = cpu_map__nr (evlist -> core .cpus );
724724 if (cpu_map__empty (evlist -> core .cpus ))
725- evlist -> nr_mmaps = thread_map__nr (evlist -> threads );
725+ evlist -> nr_mmaps = thread_map__nr (evlist -> core . threads );
726726 map = zalloc (evlist -> nr_mmaps * sizeof (struct perf_mmap ));
727727 if (!map )
728728 return NULL ;
@@ -836,7 +836,7 @@ static int perf_evlist__mmap_per_cpu(struct evlist *evlist,
836836{
837837 int cpu , thread ;
838838 int nr_cpus = cpu_map__nr (evlist -> core .cpus );
839- int nr_threads = thread_map__nr (evlist -> threads );
839+ int nr_threads = thread_map__nr (evlist -> core . threads );
840840
841841 pr_debug2 ("perf event ring buffer mmapped per cpu\n" );
842842 for (cpu = 0 ; cpu < nr_cpus ; cpu ++ ) {
@@ -864,7 +864,7 @@ static int perf_evlist__mmap_per_thread(struct evlist *evlist,
864864 struct mmap_params * mp )
865865{
866866 int thread ;
867- int nr_threads = thread_map__nr (evlist -> threads );
867+ int nr_threads = thread_map__nr (evlist -> core . threads );
868868
869869 pr_debug2 ("perf event ring buffer mmapped per thread\n" );
870870 for (thread = 0 ; thread < nr_threads ; thread ++ ) {
@@ -1015,7 +1015,7 @@ int perf_evlist__mmap_ex(struct evlist *evlist, unsigned int pages,
10151015{
10161016 struct evsel * evsel ;
10171017 const struct perf_cpu_map * cpus = evlist -> core .cpus ;
1018- const struct perf_thread_map * threads = evlist -> threads ;
1018+ const struct perf_thread_map * threads = evlist -> core . threads ;
10191019 /*
10201020 * Delay setting mp.prot: set it before calling perf_mmap__mmap.
10211021 * Its value is decided by evsel's write_backward.
@@ -1121,9 +1121,9 @@ void perf_evlist__set_maps(struct evlist *evlist, struct perf_cpu_map *cpus,
11211121 evlist -> core .cpus = perf_cpu_map__get (cpus );
11221122 }
11231123
1124- if (threads != evlist -> threads ) {
1125- perf_thread_map__put (evlist -> threads );
1126- evlist -> threads = perf_thread_map__get (threads );
1124+ if (threads != evlist -> core . threads ) {
1125+ perf_thread_map__put (evlist -> core . threads );
1126+ evlist -> core . threads = perf_thread_map__get (threads );
11271127 }
11281128
11291129 perf_evlist__propagate_maps (evlist );
@@ -1398,7 +1398,7 @@ int evlist__open(struct evlist *evlist)
13981398 * Default: one fd per CPU, all threads, aka systemwide
13991399 * as sys_perf_event_open(cpu = -1, thread = -1) is EINVAL
14001400 */
1401- if (evlist -> threads == NULL && evlist -> core .cpus == NULL ) {
1401+ if (evlist -> core . threads == NULL && evlist -> core .cpus == NULL ) {
14021402 err = perf_evlist__create_syswide_maps (evlist );
14031403 if (err < 0 )
14041404 goto out_err ;
@@ -1501,12 +1501,12 @@ int perf_evlist__prepare_workload(struct evlist *evlist, struct target *target,
15011501 }
15021502
15031503 if (target__none (target )) {
1504- if (evlist -> threads == NULL ) {
1504+ if (evlist -> core . threads == NULL ) {
15051505 fprintf (stderr , "FATAL: evlist->threads need to be set at this point (%s:%d).\n" ,
15061506 __func__ , __LINE__ );
15071507 goto out_close_pipes ;
15081508 }
1509- perf_thread_map__set_pid (evlist -> threads , 0 , evlist -> workload .pid );
1509+ perf_thread_map__set_pid (evlist -> core . threads , 0 , evlist -> workload .pid );
15101510 }
15111511
15121512 close (child_ready_pipe [1 ]);
@@ -1921,7 +1921,7 @@ int perf_evlist__start_sb_thread(struct evlist *evlist,
19211921
19221922 evlist__for_each_entry (evlist , counter ) {
19231923 if (evsel__open (counter , evlist -> core .cpus ,
1924- evlist -> threads ) < 0 )
1924+ evlist -> core . threads ) < 0 )
19251925 goto out_delete_evlist ;
19261926 }
19271927
0 commit comments