static struct perf_aggr_thread_value *sort_aggr_thread(
struct perf_evsel *counter,
int nthreads, int ncpus,
- int *ret)
+ int *ret,
+ struct target *_target)
{
int cpu, thread, i = 0;
double uval;
* Skip value 0 when enabling --per-thread globally,
* otherwise too many 0 output.
*/
- if (uval == 0.0 && target__has_per_thread(&target))
+ if (uval == 0.0 && target__has_per_thread(_target))
continue;
buf[i].counter = counter;
}
static void print_aggr_thread(struct perf_stat_config *config,
+ struct target *_target,
struct perf_evsel *counter, char *prefix)
{
FILE *output = config->output;
int thread, sorted_threads, id;
struct perf_aggr_thread_value *buf;
- buf = sort_aggr_thread(counter, nthreads, ncpus, &sorted_threads);
+ buf = sort_aggr_thread(counter, nthreads, ncpus, &sorted_threads, _target);
if (!buf) {
perror("cannot sort aggr thread");
return;
evlist__for_each_entry(evlist, counter) {
if (is_duration_time(counter))
continue;
- print_aggr_thread(config, counter, prefix);
+ print_aggr_thread(config, _target, counter, prefix);
}
break;
case AGGR_GLOBAL: