diff options
Diffstat (limited to 'tools/perf/util/stat-shadow.c')
-rw-r--r-- | tools/perf/util/stat-shadow.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c index fdb71961143e..aa9efe08762b 100644 --- a/tools/perf/util/stat-shadow.c +++ b/tools/perf/util/stat-shadow.c | |||
@@ -94,7 +94,8 @@ void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 *count, | |||
94 | { | 94 | { |
95 | int ctx = evsel_context(counter); | 95 | int ctx = evsel_context(counter); |
96 | 96 | ||
97 | if (perf_evsel__match(counter, SOFTWARE, SW_TASK_CLOCK)) | 97 | if (perf_evsel__match(counter, SOFTWARE, SW_TASK_CLOCK) || |
98 | perf_evsel__match(counter, SOFTWARE, SW_CPU_CLOCK)) | ||
98 | update_stats(&runtime_nsecs_stats[cpu], count[0]); | 99 | update_stats(&runtime_nsecs_stats[cpu], count[0]); |
99 | else if (perf_evsel__match(counter, HARDWARE, HW_CPU_CYCLES)) | 100 | else if (perf_evsel__match(counter, HARDWARE, HW_CPU_CYCLES)) |
100 | update_stats(&runtime_cycles_stats[ctx][cpu], count[0]); | 101 | update_stats(&runtime_cycles_stats[ctx][cpu], count[0]); |
@@ -188,7 +189,7 @@ static void print_stalled_cycles_backend(int cpu, | |||
188 | 189 | ||
189 | color = get_ratio_color(GRC_STALLED_CYCLES_BE, ratio); | 190 | color = get_ratio_color(GRC_STALLED_CYCLES_BE, ratio); |
190 | 191 | ||
191 | out->print_metric(out->ctx, color, "%6.2f%%", "backend cycles idle", ratio); | 192 | out->print_metric(out->ctx, color, "%7.2f%%", "backend cycles idle", ratio); |
192 | } | 193 | } |
193 | 194 | ||
194 | static void print_branch_misses(int cpu, | 195 | static void print_branch_misses(int cpu, |
@@ -444,7 +445,8 @@ void perf_stat__print_shadow_stats(struct perf_evsel *evsel, | |||
444 | ratio = total / avg; | 445 | ratio = total / avg; |
445 | 446 | ||
446 | print_metric(ctxp, NULL, "%8.0f", "cycles / elision", ratio); | 447 | print_metric(ctxp, NULL, "%8.0f", "cycles / elision", ratio); |
447 | } else if (perf_evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK)) { | 448 | } else if (perf_evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK) || |
449 | perf_evsel__match(evsel, SOFTWARE, SW_CPU_CLOCK)) { | ||
448 | if ((ratio = avg_stats(&walltime_nsecs_stats)) != 0) | 450 | if ((ratio = avg_stats(&walltime_nsecs_stats)) != 0) |
449 | print_metric(ctxp, NULL, "%8.3f", "CPUs utilized", | 451 | print_metric(ctxp, NULL, "%8.3f", "CPUs utilized", |
450 | avg / ratio); | 452 | avg / ratio); |