@@ -639,7 +639,7 @@ int __weak arch_get_runtimeparam(void)
639639 return 1 ;
640640}
641641
642- static int __add_metric (struct list_head * group_list ,
642+ static int __add_metric (struct list_head * metric_list ,
643643 struct pmu_event * pe ,
644644 bool metric_no_group ,
645645 int runtime ,
@@ -726,13 +726,13 @@ static int __add_metric(struct list_head *group_list,
726726 if (m -> metric_refs_cnt )
727727 return 0 ;
728728
729- if (list_empty (group_list ))
730- list_add (& m -> nd , group_list );
729+ if (list_empty (metric_list ))
730+ list_add (& m -> nd , metric_list );
731731 else {
732732 struct list_head * pos ;
733733
734734 /* Place the largest groups at the front. */
735- list_for_each_prev (pos , group_list ) {
735+ list_for_each_prev (pos , metric_list ) {
736736 struct metric * old = list_entry (pos , struct metric , nd );
737737
738738 if (hashmap__size (& m -> pctx .ids ) <=
@@ -813,7 +813,7 @@ static int recursion_check(struct metric *m, const char *id, struct expr_id **pa
813813 return p -> id ? 0 : - ENOMEM ;
814814}
815815
816- static int add_metric (struct list_head * group_list ,
816+ static int add_metric (struct list_head * metric_list ,
817817 struct pmu_event * pe ,
818818 bool metric_no_group ,
819819 struct metric * * mp ,
@@ -822,7 +822,7 @@ static int add_metric(struct list_head *group_list,
822822
823823static int __resolve_metric (struct metric * m ,
824824 bool metric_no_group ,
825- struct list_head * group_list ,
825+ struct list_head * metric_list ,
826826 struct pmu_events_map * map ,
827827 struct expr_ids * ids )
828828{
@@ -854,7 +854,7 @@ static int __resolve_metric(struct metric *m,
854854 expr__del_id (& m -> pctx , cur -> key );
855855
856856 /* ... and it gets resolved to the parent context. */
857- ret = add_metric (group_list , pe , metric_no_group , & m , parent , ids );
857+ ret = add_metric (metric_list , pe , metric_no_group , & m , parent , ids );
858858 if (ret )
859859 return ret ;
860860
@@ -885,7 +885,7 @@ static int resolve_metric(bool metric_no_group,
885885 return 0 ;
886886}
887887
888- static int add_metric (struct list_head * group_list ,
888+ static int add_metric (struct list_head * metric_list ,
889889 struct pmu_event * pe ,
890890 bool metric_no_group ,
891891 struct metric * * m ,
@@ -898,27 +898,27 @@ static int add_metric(struct list_head *group_list,
898898 pr_debug ("metric expr %s for %s\n" , pe -> metric_expr , pe -> metric_name );
899899
900900 if (!strstr (pe -> metric_expr , "?" )) {
901- ret = __add_metric (group_list , pe , metric_no_group , 1 , m , parent , ids );
901+ ret = __add_metric (metric_list , pe , metric_no_group , 1 , m , parent , ids );
902902 } else {
903903 int j , count ;
904904
905905 count = arch_get_runtimeparam ();
906906
907907 /* This loop is added to create multiple
908908 * events depend on count value and add
909- * those events to group_list .
909+ * those events to metric_list .
910910 */
911911
912912 for (j = 0 ; j < count && !ret ; j ++ , * m = orig )
913- ret = __add_metric (group_list , pe , metric_no_group , j , m , parent , ids );
913+ ret = __add_metric (metric_list , pe , metric_no_group , j , m , parent , ids );
914914 }
915915
916916 return ret ;
917917}
918918
919919static int metricgroup__add_metric (const char * metric , bool metric_no_group ,
920920 struct strbuf * events ,
921- struct list_head * group_list ,
921+ struct list_head * metric_list ,
922922 struct pmu_events_map * map )
923923{
924924 struct expr_ids ids = { .cnt = 0 , };
@@ -963,14 +963,14 @@ static int metricgroup__add_metric(const char *metric, bool metric_no_group,
963963 }
964964 }
965965
966- list_splice (& list , group_list );
966+ list_splice (& list , metric_list );
967967 expr_ids__exit (& ids );
968968 return 0 ;
969969}
970970
971971static int metricgroup__add_metric_list (const char * list , bool metric_no_group ,
972972 struct strbuf * events ,
973- struct list_head * group_list ,
973+ struct list_head * metric_list ,
974974 struct pmu_events_map * map )
975975{
976976 char * llist , * nlist , * p ;
@@ -986,7 +986,7 @@ static int metricgroup__add_metric_list(const char *list, bool metric_no_group,
986986
987987 while ((p = strsep (& llist , "," )) != NULL ) {
988988 ret = metricgroup__add_metric (p , metric_no_group , events ,
989- group_list , map );
989+ metric_list , map );
990990 if (ret == - EINVAL ) {
991991 fprintf (stderr , "Cannot find metric or group `%s'\n" ,
992992 p );
@@ -1011,11 +1011,11 @@ static void metric__free_refs(struct metric *metric)
10111011 }
10121012}
10131013
1014- static void metricgroup__free_metrics (struct list_head * group_list )
1014+ static void metricgroup__free_metrics (struct list_head * metric_list )
10151015{
10161016 struct metric * m , * tmp ;
10171017
1018- list_for_each_entry_safe (m , tmp , group_list , nd ) {
1018+ list_for_each_entry_safe (m , tmp , metric_list , nd ) {
10191019 metric__free_refs (m );
10201020 expr__ctx_clear (& m -> pctx );
10211021 list_del_init (& m -> nd );
@@ -1032,13 +1032,13 @@ static int parse_groups(struct evlist *perf_evlist, const char *str,
10321032{
10331033 struct parse_events_error parse_error ;
10341034 struct strbuf extra_events ;
1035- LIST_HEAD (group_list );
1035+ LIST_HEAD (metric_list );
10361036 int ret ;
10371037
10381038 if (metric_events -> nr_entries == 0 )
10391039 metricgroup__rblist_init (metric_events );
10401040 ret = metricgroup__add_metric_list (str , metric_no_group ,
1041- & extra_events , & group_list , map );
1041+ & extra_events , & metric_list , map );
10421042 if (ret )
10431043 return ret ;
10441044 pr_debug ("adding %s\n" , extra_events .buf );
@@ -1049,10 +1049,10 @@ static int parse_groups(struct evlist *perf_evlist, const char *str,
10491049 goto out ;
10501050 }
10511051 strbuf_release (& extra_events );
1052- ret = metricgroup__setup_events (& group_list , metric_no_merge ,
1052+ ret = metricgroup__setup_events (& metric_list , metric_no_merge ,
10531053 perf_evlist , metric_events );
10541054out :
1055- metricgroup__free_metrics (& group_list );
1055+ metricgroup__free_metrics (& metric_list );
10561056 return ret ;
10571057}
10581058
0 commit comments