@@ -258,9 +258,9 @@ list_add_counter(struct perf_counter *counter, struct perf_counter_context *ctx)
258258 * leader's sibling list:
259259 */
260260 if (group_leader == counter )
261- list_add_tail (& counter -> list_entry , & ctx -> counter_list );
261+ list_add_tail (& counter -> group_entry , & ctx -> group_list );
262262 else {
263- list_add_tail (& counter -> list_entry , & group_leader -> sibling_list );
263+ list_add_tail (& counter -> group_entry , & group_leader -> sibling_list );
264264 group_leader -> nr_siblings ++ ;
265265 }
266266
@@ -279,13 +279,13 @@ list_del_counter(struct perf_counter *counter, struct perf_counter_context *ctx)
279279{
280280 struct perf_counter * sibling , * tmp ;
281281
282- if (list_empty (& counter -> list_entry ))
282+ if (list_empty (& counter -> group_entry ))
283283 return ;
284284 ctx -> nr_counters -- ;
285285 if (counter -> attr .inherit_stat )
286286 ctx -> nr_stat -- ;
287287
288- list_del_init (& counter -> list_entry );
288+ list_del_init (& counter -> group_entry );
289289 list_del_rcu (& counter -> event_entry );
290290
291291 if (counter -> group_leader != counter )
@@ -296,10 +296,9 @@ list_del_counter(struct perf_counter *counter, struct perf_counter_context *ctx)
296296 * upgrade the siblings to singleton counters by adding them
297297 * to the context list directly:
298298 */
299- list_for_each_entry_safe (sibling , tmp ,
300- & counter -> sibling_list , list_entry ) {
299+ list_for_each_entry_safe (sibling , tmp , & counter -> sibling_list , group_entry ) {
301300
302- list_move_tail (& sibling -> list_entry , & ctx -> counter_list );
301+ list_move_tail (& sibling -> group_entry , & ctx -> group_list );
303302 sibling -> group_leader = sibling ;
304303 }
305304}
@@ -343,7 +342,7 @@ group_sched_out(struct perf_counter *group_counter,
343342 /*
344343 * Schedule out siblings (if any):
345344 */
346- list_for_each_entry (counter , & group_counter -> sibling_list , list_entry )
345+ list_for_each_entry (counter , & group_counter -> sibling_list , group_entry )
347346 counter_sched_out (counter , cpuctx , ctx );
348347
349348 if (group_counter -> attr .exclusive )
@@ -435,7 +434,7 @@ static void perf_counter_remove_from_context(struct perf_counter *counter)
435434 /*
436435 * If the context is active we need to retry the smp call.
437436 */
438- if (ctx -> nr_active && !list_empty (& counter -> list_entry )) {
437+ if (ctx -> nr_active && !list_empty (& counter -> group_entry )) {
439438 spin_unlock_irq (& ctx -> lock );
440439 goto retry ;
441440 }
@@ -445,7 +444,7 @@ static void perf_counter_remove_from_context(struct perf_counter *counter)
445444 * can remove the counter safely, if the call above did not
446445 * succeed.
447446 */
448- if (!list_empty (& counter -> list_entry )) {
447+ if (!list_empty (& counter -> group_entry )) {
449448 list_del_counter (counter , ctx );
450449 }
451450 spin_unlock_irq (& ctx -> lock );
@@ -497,7 +496,7 @@ static void update_group_times(struct perf_counter *leader)
497496 struct perf_counter * counter ;
498497
499498 update_counter_times (leader );
500- list_for_each_entry (counter , & leader -> sibling_list , list_entry )
499+ list_for_each_entry (counter , & leader -> sibling_list , group_entry )
501500 update_counter_times (counter );
502501}
503502
@@ -643,7 +642,7 @@ group_sched_in(struct perf_counter *group_counter,
643642 /*
644643 * Schedule in siblings as one group (if any):
645644 */
646- list_for_each_entry (counter , & group_counter -> sibling_list , list_entry ) {
645+ list_for_each_entry (counter , & group_counter -> sibling_list , group_entry ) {
647646 if (counter_sched_in (counter , cpuctx , ctx , cpu )) {
648647 partial_group = counter ;
649648 goto group_error ;
@@ -657,7 +656,7 @@ group_sched_in(struct perf_counter *group_counter,
657656 * Groups can be scheduled in as one unit only, so undo any
658657 * partial group before returning:
659658 */
660- list_for_each_entry (counter , & group_counter -> sibling_list , list_entry ) {
659+ list_for_each_entry (counter , & group_counter -> sibling_list , group_entry ) {
661660 if (counter == partial_group )
662661 break ;
663662 counter_sched_out (counter , cpuctx , ctx );
@@ -678,7 +677,7 @@ static int is_software_only_group(struct perf_counter *leader)
678677 if (!is_software_counter (leader ))
679678 return 0 ;
680679
681- list_for_each_entry (counter , & leader -> sibling_list , list_entry )
680+ list_for_each_entry (counter , & leader -> sibling_list , group_entry )
682681 if (!is_software_counter (counter ))
683682 return 0 ;
684683
@@ -842,7 +841,7 @@ perf_install_in_context(struct perf_counter_context *ctx,
842841 /*
843842 * we need to retry the smp call.
844843 */
845- if (ctx -> is_active && list_empty (& counter -> list_entry )) {
844+ if (ctx -> is_active && list_empty (& counter -> group_entry )) {
846845 spin_unlock_irq (& ctx -> lock );
847846 goto retry ;
848847 }
@@ -852,7 +851,7 @@ perf_install_in_context(struct perf_counter_context *ctx,
852851 * can add the counter safely, if it the call above did not
853852 * succeed.
854853 */
855- if (list_empty (& counter -> list_entry ))
854+ if (list_empty (& counter -> group_entry ))
856855 add_counter_to_ctx (counter , ctx );
857856 spin_unlock_irq (& ctx -> lock );
858857}
@@ -872,7 +871,7 @@ static void __perf_counter_mark_enabled(struct perf_counter *counter,
872871
873872 counter -> state = PERF_COUNTER_STATE_INACTIVE ;
874873 counter -> tstamp_enabled = ctx -> time - counter -> total_time_enabled ;
875- list_for_each_entry (sub , & counter -> sibling_list , list_entry )
874+ list_for_each_entry (sub , & counter -> sibling_list , group_entry )
876875 if (sub -> state >= PERF_COUNTER_STATE_INACTIVE )
877876 sub -> tstamp_enabled =
878877 ctx -> time - sub -> total_time_enabled ;
@@ -1032,7 +1031,7 @@ void __perf_counter_sched_out(struct perf_counter_context *ctx,
10321031
10331032 perf_disable ();
10341033 if (ctx -> nr_active ) {
1035- list_for_each_entry (counter , & ctx -> counter_list , list_entry ) {
1034+ list_for_each_entry (counter , & ctx -> group_list , group_entry ) {
10361035 if (counter != counter -> group_leader )
10371036 counter_sched_out (counter , cpuctx , ctx );
10381037 else
@@ -1252,7 +1251,7 @@ __perf_counter_sched_in(struct perf_counter_context *ctx,
12521251 * First go through the list and put on any pinned groups
12531252 * in order to give them the best chance of going on.
12541253 */
1255- list_for_each_entry (counter , & ctx -> counter_list , list_entry ) {
1254+ list_for_each_entry (counter , & ctx -> group_list , group_entry ) {
12561255 if (counter -> state <= PERF_COUNTER_STATE_OFF ||
12571256 !counter -> attr .pinned )
12581257 continue ;
@@ -1276,7 +1275,7 @@ __perf_counter_sched_in(struct perf_counter_context *ctx,
12761275 }
12771276 }
12781277
1279- list_for_each_entry (counter , & ctx -> counter_list , list_entry ) {
1278+ list_for_each_entry (counter , & ctx -> group_list , group_entry ) {
12801279 /*
12811280 * Ignore counters in OFF or ERROR state, and
12821281 * ignore pinned counters since we did them already.
@@ -1369,7 +1368,7 @@ static void perf_ctx_adjust_freq(struct perf_counter_context *ctx)
13691368 u64 interrupts , freq ;
13701369
13711370 spin_lock (& ctx -> lock );
1372- list_for_each_entry (counter , & ctx -> counter_list , list_entry ) {
1371+ list_for_each_entry (counter , & ctx -> group_list , group_entry ) {
13731372 if (counter -> state != PERF_COUNTER_STATE_ACTIVE )
13741373 continue ;
13751374
@@ -1441,8 +1440,8 @@ static void rotate_ctx(struct perf_counter_context *ctx)
14411440 * Rotate the first entry last (works just fine for group counters too):
14421441 */
14431442 perf_disable ();
1444- list_for_each_entry (counter , & ctx -> counter_list , list_entry ) {
1445- list_move_tail (& counter -> list_entry , & ctx -> counter_list );
1443+ list_for_each_entry (counter , & ctx -> group_list , group_entry ) {
1444+ list_move_tail (& counter -> group_entry , & ctx -> group_list );
14461445 break ;
14471446 }
14481447 perf_enable ();
@@ -1498,7 +1497,7 @@ static void perf_counter_enable_on_exec(struct task_struct *task)
14981497
14991498 spin_lock (& ctx -> lock );
15001499
1501- list_for_each_entry (counter , & ctx -> counter_list , list_entry ) {
1500+ list_for_each_entry (counter , & ctx -> group_list , group_entry ) {
15021501 if (!counter -> attr .enable_on_exec )
15031502 continue ;
15041503 counter -> attr .enable_on_exec = 0 ;
@@ -1575,7 +1574,7 @@ __perf_counter_init_context(struct perf_counter_context *ctx,
15751574 memset (ctx , 0 , sizeof (* ctx ));
15761575 spin_lock_init (& ctx -> lock );
15771576 mutex_init (& ctx -> mutex );
1578- INIT_LIST_HEAD (& ctx -> counter_list );
1577+ INIT_LIST_HEAD (& ctx -> group_list );
15791578 INIT_LIST_HEAD (& ctx -> event_list );
15801579 atomic_set (& ctx -> refcount , 1 );
15811580 ctx -> task = task ;
@@ -1818,7 +1817,7 @@ static int perf_counter_read_group(struct perf_counter *counter,
18181817
18191818 size += err ;
18201819
1821- list_for_each_entry (sub , & leader -> sibling_list , list_entry ) {
1820+ list_for_each_entry (sub , & leader -> sibling_list , group_entry ) {
18221821 err = perf_counter_read_entry (sub , read_format ,
18231822 buf + size );
18241823 if (err < 0 )
@@ -1948,7 +1947,7 @@ static void perf_counter_for_each(struct perf_counter *counter,
19481947
19491948 perf_counter_for_each_child (counter , func );
19501949 func (counter );
1951- list_for_each_entry (sibling , & counter -> sibling_list , list_entry )
1950+ list_for_each_entry (sibling , & counter -> sibling_list , group_entry )
19521951 perf_counter_for_each_child (counter , func );
19531952 mutex_unlock (& ctx -> mutex );
19541953}
@@ -2832,7 +2831,7 @@ static void perf_output_read_group(struct perf_output_handle *handle,
28322831
28332832 perf_output_copy (handle , values , n * sizeof (u64 ));
28342833
2835- list_for_each_entry (sub , & leader -> sibling_list , list_entry ) {
2834+ list_for_each_entry (sub , & leader -> sibling_list , group_entry ) {
28362835 n = 0 ;
28372836
28382837 if (sub != counter )
@@ -4118,7 +4117,7 @@ perf_counter_alloc(struct perf_counter_attr *attr,
41184117 mutex_init (& counter -> child_mutex );
41194118 INIT_LIST_HEAD (& counter -> child_list );
41204119
4121- INIT_LIST_HEAD (& counter -> list_entry );
4120+ INIT_LIST_HEAD (& counter -> group_entry );
41224121 INIT_LIST_HEAD (& counter -> event_entry );
41234122 INIT_LIST_HEAD (& counter -> sibling_list );
41244123 init_waitqueue_head (& counter -> waitq );
@@ -4544,7 +4543,7 @@ static int inherit_group(struct perf_counter *parent_counter,
45444543 child , NULL , child_ctx );
45454544 if (IS_ERR (leader ))
45464545 return PTR_ERR (leader );
4547- list_for_each_entry (sub , & parent_counter -> sibling_list , list_entry ) {
4546+ list_for_each_entry (sub , & parent_counter -> sibling_list , group_entry ) {
45484547 child_ctr = inherit_counter (sub , parent , parent_ctx ,
45494548 child , leader , child_ctx );
45504549 if (IS_ERR (child_ctr ))
@@ -4670,16 +4669,16 @@ void perf_counter_exit_task(struct task_struct *child)
46704669 mutex_lock_nested (& child_ctx -> mutex , SINGLE_DEPTH_NESTING );
46714670
46724671again :
4673- list_for_each_entry_safe (child_counter , tmp , & child_ctx -> counter_list ,
4674- list_entry )
4672+ list_for_each_entry_safe (child_counter , tmp , & child_ctx -> group_list ,
4673+ group_entry )
46754674 __perf_counter_exit_task (child_counter , child_ctx , child );
46764675
46774676 /*
46784677 * If the last counter was a group counter, it will have appended all
46794678 * its siblings to the list, but we obtained 'tmp' before that which
46804679 * will still point to the list head terminating the iteration.
46814680 */
4682- if (!list_empty (& child_ctx -> counter_list ))
4681+ if (!list_empty (& child_ctx -> group_list ))
46834682 goto again ;
46844683
46854684 mutex_unlock (& child_ctx -> mutex );
@@ -4701,7 +4700,7 @@ void perf_counter_free_task(struct task_struct *task)
47014700
47024701 mutex_lock (& ctx -> mutex );
47034702again :
4704- list_for_each_entry_safe (counter , tmp , & ctx -> counter_list , list_entry ) {
4703+ list_for_each_entry_safe (counter , tmp , & ctx -> group_list , group_entry ) {
47054704 struct perf_counter * parent = counter -> parent ;
47064705
47074706 if (WARN_ON_ONCE (!parent ))
@@ -4717,7 +4716,7 @@ void perf_counter_free_task(struct task_struct *task)
47174716 free_counter (counter );
47184717 }
47194718
4720- if (!list_empty (& ctx -> counter_list ))
4719+ if (!list_empty (& ctx -> group_list ))
47214720 goto again ;
47224721
47234722 mutex_unlock (& ctx -> mutex );
@@ -4847,7 +4846,7 @@ static void __perf_counter_exit_cpu(void *info)
48474846 struct perf_counter_context * ctx = & cpuctx -> ctx ;
48484847 struct perf_counter * counter , * tmp ;
48494848
4850- list_for_each_entry_safe (counter , tmp , & ctx -> counter_list , list_entry )
4849+ list_for_each_entry_safe (counter , tmp , & ctx -> group_list , group_entry )
48514850 __perf_counter_remove_from_context (counter );
48524851}
48534852static void perf_counter_exit_cpu (int cpu )
0 commit comments