Skip to content

Commit 4864854

Browse files
ZhengjunXingacmel
authored andcommitted
perf stat: Capitalize topdown metrics' names
Capitalize topdown metrics' names to follow the intel SDM. Before: # ./perf stat -a sleep 1 Performance counter stats for 'system wide': 228,094.05 msec cpu-clock # 225.026 CPUs utilized 842 context-switches # 3.691 /sec 224 cpu-migrations # 0.982 /sec 70 page-faults # 0.307 /sec 23,164,105 cycles # 0.000 GHz 29,403,446 instructions # 1.27 insn per cycle 5,268,185 branches # 23.097 K/sec 33,239 branch-misses # 0.63% of all branches 136,248,990 slots # 597.337 K/sec 32,976,450 topdown-retiring # 24.2% retiring 4,651,918 topdown-bad-spec # 3.4% bad speculation 26,148,695 topdown-fe-bound # 19.2% frontend bound 72,515,776 topdown-be-bound # 53.2% backend bound 6,008,540 topdown-heavy-ops # 4.4% heavy operations # 19.8% light operations 3,934,049 topdown-br-mispredict # 2.9% branch mispredict # 0.5% machine clears 16,655,439 topdown-fetch-lat # 12.2% fetch latency # 7.0% fetch bandwidth 41,635,972 topdown-mem-bound # 30.5% memory bound # 22.7% Core bound 1.013634593 seconds time elapsed After: # ./perf stat -a sleep 1 Performance counter stats for 'system wide': 228,081.94 msec cpu-clock # 225.003 CPUs utilized 824 context-switches # 3.613 /sec 224 cpu-migrations # 0.982 /sec 67 page-faults # 0.294 /sec 22,647,423 cycles # 0.000 GHz 28,870,551 instructions # 1.27 insn per cycle 5,167,099 branches # 22.655 K/sec 32,383 branch-misses # 0.63% of all branches 133,411,074 slots # 584.926 K/sec 32,352,607 topdown-retiring # 24.3% Retiring 4,456,977 topdown-bad-spec # 3.3% Bad Speculation 25,626,487 topdown-fe-bound # 19.2% Frontend Bound 70,955,316 topdown-be-bound # 53.2% Backend Bound 5,834,844 topdown-heavy-ops # 4.4% Heavy Operations # 19.9% Light Operations 3,738,781 topdown-br-mispredict # 2.8% Branch Mispredict # 0.5% Machine Clears 16,286,803 topdown-fetch-lat # 12.2% Fetch Latency # 7.0% Fetch Bandwidth 40,802,069 topdown-mem-bound # 30.6% Memory Bound # 22.6% Core Bound 1.013683125 seconds time elapsed Reviewed-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Xing Zhengjun <zhengjun.xing@linux.intel.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20220825015458.3252239-1-zhengjun.xing@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 3126204 commit 4864854

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tools/perf/util/stat-shadow.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
11931193
&rsd);
11941194
if (retiring > 0.7)
11951195
color = PERF_COLOR_GREEN;
1196-
print_metric(config, ctxp, color, "%8.1f%%", "retiring",
1196+
print_metric(config, ctxp, color, "%8.1f%%", "Retiring",
11971197
retiring * 100.);
11981198
} else if (perf_stat_evsel__is(evsel, TOPDOWN_FE_BOUND) &&
11991199
full_td(cpu_map_idx, st, &rsd)) {
@@ -1202,7 +1202,7 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
12021202
&rsd);
12031203
if (fe_bound > 0.2)
12041204
color = PERF_COLOR_RED;
1205-
print_metric(config, ctxp, color, "%8.1f%%", "frontend bound",
1205+
print_metric(config, ctxp, color, "%8.1f%%", "Frontend Bound",
12061206
fe_bound * 100.);
12071207
} else if (perf_stat_evsel__is(evsel, TOPDOWN_BE_BOUND) &&
12081208
full_td(cpu_map_idx, st, &rsd)) {
@@ -1211,7 +1211,7 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
12111211
&rsd);
12121212
if (be_bound > 0.2)
12131213
color = PERF_COLOR_RED;
1214-
print_metric(config, ctxp, color, "%8.1f%%", "backend bound",
1214+
print_metric(config, ctxp, color, "%8.1f%%", "Backend Bound",
12151215
be_bound * 100.);
12161216
} else if (perf_stat_evsel__is(evsel, TOPDOWN_BAD_SPEC) &&
12171217
full_td(cpu_map_idx, st, &rsd)) {
@@ -1220,7 +1220,7 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
12201220
&rsd);
12211221
if (bad_spec > 0.1)
12221222
color = PERF_COLOR_RED;
1223-
print_metric(config, ctxp, color, "%8.1f%%", "bad speculation",
1223+
print_metric(config, ctxp, color, "%8.1f%%", "Bad Speculation",
12241224
bad_spec * 100.);
12251225
} else if (perf_stat_evsel__is(evsel, TOPDOWN_HEAVY_OPS) &&
12261226
full_td(cpu_map_idx, st, &rsd) && (config->topdown_level > 1)) {
@@ -1234,13 +1234,13 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
12341234

12351235
if (retiring > 0.7 && heavy_ops > 0.1)
12361236
color = PERF_COLOR_GREEN;
1237-
print_metric(config, ctxp, color, "%8.1f%%", "heavy operations",
1237+
print_metric(config, ctxp, color, "%8.1f%%", "Heavy Operations",
12381238
heavy_ops * 100.);
12391239
if (retiring > 0.7 && light_ops > 0.6)
12401240
color = PERF_COLOR_GREEN;
12411241
else
12421242
color = NULL;
1243-
print_metric(config, ctxp, color, "%8.1f%%", "light operations",
1243+
print_metric(config, ctxp, color, "%8.1f%%", "Light Operations",
12441244
light_ops * 100.);
12451245
} else if (perf_stat_evsel__is(evsel, TOPDOWN_BR_MISPREDICT) &&
12461246
full_td(cpu_map_idx, st, &rsd) && (config->topdown_level > 1)) {
@@ -1254,13 +1254,13 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
12541254

12551255
if (bad_spec > 0.1 && br_mis > 0.05)
12561256
color = PERF_COLOR_RED;
1257-
print_metric(config, ctxp, color, "%8.1f%%", "branch mispredict",
1257+
print_metric(config, ctxp, color, "%8.1f%%", "Branch Mispredict",
12581258
br_mis * 100.);
12591259
if (bad_spec > 0.1 && m_clears > 0.05)
12601260
color = PERF_COLOR_RED;
12611261
else
12621262
color = NULL;
1263-
print_metric(config, ctxp, color, "%8.1f%%", "machine clears",
1263+
print_metric(config, ctxp, color, "%8.1f%%", "Machine Clears",
12641264
m_clears * 100.);
12651265
} else if (perf_stat_evsel__is(evsel, TOPDOWN_FETCH_LAT) &&
12661266
full_td(cpu_map_idx, st, &rsd) && (config->topdown_level > 1)) {
@@ -1274,13 +1274,13 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
12741274

12751275
if (fe_bound > 0.2 && fetch_lat > 0.15)
12761276
color = PERF_COLOR_RED;
1277-
print_metric(config, ctxp, color, "%8.1f%%", "fetch latency",
1277+
print_metric(config, ctxp, color, "%8.1f%%", "Fetch Latency",
12781278
fetch_lat * 100.);
12791279
if (fe_bound > 0.2 && fetch_bw > 0.1)
12801280
color = PERF_COLOR_RED;
12811281
else
12821282
color = NULL;
1283-
print_metric(config, ctxp, color, "%8.1f%%", "fetch bandwidth",
1283+
print_metric(config, ctxp, color, "%8.1f%%", "Fetch Bandwidth",
12841284
fetch_bw * 100.);
12851285
} else if (perf_stat_evsel__is(evsel, TOPDOWN_MEM_BOUND) &&
12861286
full_td(cpu_map_idx, st, &rsd) && (config->topdown_level > 1)) {
@@ -1294,13 +1294,13 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,
12941294

12951295
if (be_bound > 0.2 && mem_bound > 0.2)
12961296
color = PERF_COLOR_RED;
1297-
print_metric(config, ctxp, color, "%8.1f%%", "memory bound",
1297+
print_metric(config, ctxp, color, "%8.1f%%", "Memory Bound",
12981298
mem_bound * 100.);
12991299
if (be_bound > 0.2 && core_bound > 0.1)
13001300
color = PERF_COLOR_RED;
13011301
else
13021302
color = NULL;
1303-
print_metric(config, ctxp, color, "%8.1f%%", "Core bound",
1303+
print_metric(config, ctxp, color, "%8.1f%%", "Core Bound",
13041304
core_bound * 100.);
13051305
} else if (evsel->metric_expr) {
13061306
generic_metric(config, evsel->metric_expr, evsel->metric_events, NULL,

0 commit comments

Comments
 (0)