@@ -56,7 +56,6 @@ struct saved_value {
56
56
struct rb_node rb_node ;
57
57
struct perf_evsel * evsel ;
58
58
int cpu ;
59
- int ctx ;
60
59
struct stats stats ;
61
60
};
62
61
@@ -67,8 +66,6 @@ static int saved_value_cmp(struct rb_node *rb_node, const void *entry)
67
66
rb_node );
68
67
const struct saved_value * b = entry ;
69
68
70
- if (a -> ctx != b -> ctx )
71
- return a -> ctx - b -> ctx ;
72
69
if (a -> cpu != b -> cpu )
73
70
return a -> cpu - b -> cpu ;
74
71
if (a -> evsel == b -> evsel )
@@ -90,13 +87,12 @@ static struct rb_node *saved_value_new(struct rblist *rblist __maybe_unused,
90
87
}
91
88
92
89
static struct saved_value * saved_value_lookup (struct perf_evsel * evsel ,
93
- int cpu , int ctx ,
90
+ int cpu ,
94
91
bool create )
95
92
{
96
93
struct rb_node * nd ;
97
94
struct saved_value dm = {
98
95
.cpu = cpu ,
99
- .ctx = ctx ,
100
96
.evsel = evsel ,
101
97
};
102
98
nd = rblist__find (& runtime_saved_values , & dm );
@@ -232,8 +228,7 @@ void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 *count,
232
228
update_stats (& runtime_aperf_stats [ctx ][cpu ], count [0 ]);
233
229
234
230
if (counter -> collect_stat ) {
235
- struct saved_value * v = saved_value_lookup (counter , cpu , ctx ,
236
- true);
231
+ struct saved_value * v = saved_value_lookup (counter , cpu , true);
237
232
update_stats (& v -> stats , count [0 ]);
238
233
}
239
234
}
@@ -634,7 +629,6 @@ static void generic_metric(const char *metric_expr,
634
629
const char * metric_name ,
635
630
double avg ,
636
631
int cpu ,
637
- int ctx ,
638
632
struct perf_stat_output_ctx * out )
639
633
{
640
634
print_metric_t print_metric = out -> print_metric ;
@@ -648,7 +642,7 @@ static void generic_metric(const char *metric_expr,
648
642
for (i = 0 ; metric_events [i ]; i ++ ) {
649
643
struct saved_value * v ;
650
644
651
- v = saved_value_lookup (metric_events [i ], cpu , ctx , false);
645
+ v = saved_value_lookup (metric_events [i ], cpu , false);
652
646
if (!v )
653
647
break ;
654
648
expr__add_id (& pctx , metric_events [i ]-> name , avg_stats (& v -> stats ));
@@ -866,7 +860,7 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
866
860
print_metric (ctxp , NULL , NULL , name , 0 );
867
861
} else if (evsel -> metric_expr ) {
868
862
generic_metric (evsel -> metric_expr , evsel -> metric_events , evsel -> name ,
869
- evsel -> metric_name , avg , cpu , ctx , out );
863
+ evsel -> metric_name , avg , cpu , out );
870
864
} else if (runtime_nsecs_stats [cpu ].n != 0 ) {
871
865
char unit = 'M' ;
872
866
char unit_buf [10 ];
@@ -895,7 +889,7 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel,
895
889
out -> new_line (ctxp );
896
890
generic_metric (mexp -> metric_expr , mexp -> metric_events ,
897
891
evsel -> name , mexp -> metric_name ,
898
- avg , cpu , ctx , out );
892
+ avg , cpu , out );
899
893
}
900
894
}
901
895
if (num == 0 )
0 commit comments