diff options
Diffstat (limited to 'tools/perf/util/stat.c')
-rw-r--r-- | tools/perf/util/stat.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c index 151e9efd7286..32235657c1ac 100644 --- a/tools/perf/util/stat.c +++ b/tools/perf/util/stat.c | |||
@@ -278,9 +278,16 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel | |||
278 | perf_evsel__compute_deltas(evsel, cpu, thread, count); | 278 | perf_evsel__compute_deltas(evsel, cpu, thread, count); |
279 | perf_counts_values__scale(count, config->scale, NULL); | 279 | perf_counts_values__scale(count, config->scale, NULL); |
280 | if (config->aggr_mode == AGGR_NONE) | 280 | if (config->aggr_mode == AGGR_NONE) |
281 | perf_stat__update_shadow_stats(evsel, count->val, cpu); | 281 | perf_stat__update_shadow_stats(evsel, count->val, cpu, |
282 | if (config->aggr_mode == AGGR_THREAD) | 282 | &rt_stat); |
283 | perf_stat__update_shadow_stats(evsel, count->val, 0); | 283 | if (config->aggr_mode == AGGR_THREAD) { |
284 | if (config->stats) | ||
285 | perf_stat__update_shadow_stats(evsel, | ||
286 | count->val, 0, &config->stats[thread]); | ||
287 | else | ||
288 | perf_stat__update_shadow_stats(evsel, | ||
289 | count->val, 0, &rt_stat); | ||
290 | } | ||
284 | break; | 291 | break; |
285 | case AGGR_GLOBAL: | 292 | case AGGR_GLOBAL: |
286 | aggr->val += count->val; | 293 | aggr->val += count->val; |
@@ -362,7 +369,7 @@ int perf_stat_process_counter(struct perf_stat_config *config, | |||
362 | /* | 369 | /* |
363 | * Save the full runtime - to allow normalization during printout: | 370 | * Save the full runtime - to allow normalization during printout: |
364 | */ | 371 | */ |
365 | perf_stat__update_shadow_stats(counter, *count, 0); | 372 | perf_stat__update_shadow_stats(counter, *count, 0, &rt_stat); |
366 | 373 | ||
367 | return 0; | 374 | return 0; |
368 | } | 375 | } |