}
static void print_aggr(struct perf_stat_config *config,
+ struct perf_evlist *evlist,
char *prefix)
{
bool metric_only = config->metric_only;
ad.id = id = aggr_map->map[s];
first = true;
- evlist__for_each_entry(evsel_list, counter) {
+ evlist__for_each_entry(evlist, counter) {
if (is_duration_time(counter))
continue;
}
static void print_no_aggr_metric(struct perf_stat_config *config,
+ struct perf_evlist *evlist,
char *prefix)
{
int cpu;
u64 ena, run, val;
double uval;
- nrcpus = evsel_list->cpus->nr;
+ nrcpus = evlist->cpus->nr;
for (cpu = 0; cpu < nrcpus; cpu++) {
bool first = true;
if (prefix)
fputs(prefix, config->output);
- evlist__for_each_entry(evsel_list, counter) {
+ evlist__for_each_entry(evlist, counter) {
if (is_duration_time(counter))
continue;
if (first) {
};
static void print_metric_headers(struct perf_stat_config *config,
+ struct perf_evlist *evlist,
const char *prefix, bool no_indent)
{
struct perf_stat_output_ctx out;
}
/* Print metrics headers only */
- evlist__for_each_entry(evsel_list, counter) {
+ evlist__for_each_entry(evlist, counter) {
if (is_duration_time(counter))
continue;
os.evsel = counter;
}
static void print_interval(struct perf_stat_config *config,
+ struct perf_evlist *evlist,
char *prefix, struct timespec *ts)
{
bool metric_only = config->metric_only;
}
if ((num_print_interval == 0 || config->interval_clear) && metric_only)
- print_metric_headers(config, " ", true);
+ print_metric_headers(config, evlist, " ", true);
if (++num_print_interval == 25)
num_print_interval = 0;
}
char buf[64], *prefix = NULL;
if (interval)
- print_interval(config, prefix = buf, ts);
+ print_interval(config, evlist, prefix = buf, ts);
else
print_header(config, _target, argc, argv);
static int num_print_iv;
if (num_print_iv == 0 && !interval)
- print_metric_headers(config, prefix, false);
+ print_metric_headers(config, evlist, prefix, false);
if (num_print_iv++ == 25)
num_print_iv = 0;
if (config->aggr_mode == AGGR_GLOBAL && prefix)
switch (config->aggr_mode) {
case AGGR_CORE:
case AGGR_SOCKET:
- print_aggr(config, prefix);
+ print_aggr(config, evlist, prefix);
break;
case AGGR_THREAD:
evlist__for_each_entry(evlist, counter) {
break;
case AGGR_NONE:
if (metric_only)
- print_no_aggr_metric(config, prefix);
+ print_no_aggr_metric(config, evlist, prefix);
else {
evlist__for_each_entry(evlist, counter) {
if (is_duration_time(counter))