Skip to content

Commit 4f28641

Browse files
Leo Yanacmel
authored andcommitted
perf c2c: Display "Total Stores" as a standalone metrics
The total stores is displayed under the metrics "Store Reference", to output the same format with total records and all loads, extract the total stores number as a standalone metrics "Total Stores". After this patch, the tool shows the summary numbers ("Total records", "Total loads", "Total Stores") in the unified form. Before: # ----------- Cacheline ---------- Tot ----- LLC Load Hitm ----- Total Total ---- Store Reference ---- --- Load Dram ---- LLC ----- Core Load Hit ----- -- LLC Load Hit -- # Index Address Node PA cnt Hitm Total Lcl Rmt records Loads Total L1Hit L1Miss Lcl Rmt Ld Miss FB L1 L2 Llc Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ........ ........ ....... ....... ....... ....... ........ ........ # 0 0x55f07d580100 0 1499 85.89% 481 481 0 7243 3879 3364 2599 765 0 0 0 548 2615 66 169 0 1 0x55f07d580080 0 1 13.93% 78 78 0 664 664 0 0 0 0 0 0 187 361 27 11 0 2 0x55f07d5800c0 0 1 0.18% 1 1 0 405 405 0 0 0 0 0 0 131 0 10 263 0 After: # ----------- Cacheline ---------- Tot ----- LLC Load Hitm ----- Total Total Total ---- Stores ---- --- Load Dram ---- LLC ----- Core Load Hit ----- -- LLC Load Hit -- # Index Address Node PA cnt Hitm Total Lcl Rmt records Loads Stores L1Hit L1Miss Lcl Rmt Ld Miss FB L1 L2 Llc Rmt # ..... .................. .... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ........ ........ ....... ....... ....... ....... ........ ........ # 0 0x55f07d580100 0 1499 85.89% 481 481 0 7243 3879 3364 2599 765 0 0 0 548 2615 66 169 0 1 0x55f07d580080 0 1 13.93% 78 78 0 664 664 0 0 0 0 0 0 187 361 27 11 0 2 0x55f07d5800c0 0 1 0.18% 1 1 0 405 405 0 0 0 0 0 0 131 0 10 263 0 Signed-off-by: Leo Yan <leo.yan@linaro.org> Tested-by: Joe Mario <jmario@redhat.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/r/20201014050921.5591-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent b596e97 commit 4f28641

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

tools/perf/builtin-c2c.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,16 +1367,16 @@ static struct c2c_dimension dim_cl_lcl_hitm = {
13671367
.width = 7,
13681368
};
13691369

1370-
static struct c2c_dimension dim_stores = {
1371-
.header = HEADER_SPAN("---- Store Reference ----", "Total", 2),
1372-
.name = "stores",
1370+
static struct c2c_dimension dim_tot_stores = {
1371+
.header = HEADER_BOTH("Total", "Stores"),
1372+
.name = "tot_stores",
13731373
.cmp = store_cmp,
13741374
.entry = store_entry,
13751375
.width = 7,
13761376
};
13771377

13781378
static struct c2c_dimension dim_stores_l1hit = {
1379-
.header = HEADER_SPAN_LOW("L1Hit"),
1379+
.header = HEADER_SPAN("---- Stores ----", "L1Hit", 1),
13801380
.name = "stores_l1hit",
13811381
.cmp = st_l1hit_cmp,
13821382
.entry = st_l1hit_entry,
@@ -1648,7 +1648,7 @@ static struct c2c_dimension *dimensions[] = {
16481648
&dim_rmt_hitm,
16491649
&dim_cl_lcl_hitm,
16501650
&dim_cl_rmt_hitm,
1651-
&dim_stores,
1651+
&dim_tot_stores,
16521652
&dim_stores_l1hit,
16531653
&dim_stores_l1miss,
16541654
&dim_cl_stores_l1hit,
@@ -2850,7 +2850,8 @@ static int perf_c2c__report(int argc, const char **argv)
28502850
"tot_hitm,lcl_hitm,rmt_hitm,"
28512851
"tot_recs,"
28522852
"tot_loads,"
2853-
"stores,stores_l1hit,stores_l1miss,"
2853+
"tot_stores,"
2854+
"stores_l1hit,stores_l1miss,"
28542855
"dram_lcl,dram_rmt,"
28552856
"ld_llcmiss,"
28562857
"ld_fbhit,ld_l1hit,ld_l2hit,"

0 commit comments

Comments
 (0)