aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-03-12 03:32:48 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-03-13 06:47:48 -0400
commit65f46e0214c64198a0266c37181a7776e16b7e53 (patch)
tree240120a80e3ac8623c5b111a57e5b231b3789385 /tools
parentbd72a33ebae8b4d37e3d2a3f0f3f3333ac9654dd (diff)
perf kmem: Fix alignment of slab result table
Its table was a bit misaligned. Fix it. Before: # perf kmem stat --caller -l 10 ------------------------------------------------------------------------------------------------------ Callsite | Total_alloc/Per | Total_req/Per | Hit | Ping-pong | Frag ------------------------------------------------------------------------------------------------------ radeon_cs_parser_init.part.1+11a | 2080/260 | 1504/188 | 8 | 0 | 27.692% radeon_cs_parser_init.part.1+e1 | 384/96 | 288/72 | 4 | 0 | 25.000% radeon_cs_parser_init.part.1+93 | 128/32 | 96/24 | 4 | 0 | 25.000% load_elf_binary+a39 | 512/512 | 392/392 | 1 | 0 | 23.438% __alloc_skb+89 | 6144/877 | 4800/685 | 7 | 6 | 21.875% radeon_fence_emit+5c | 1152/192 | 912/152 | 6 | 0 | 20.833% radeon_cs_parser_relocs+ad | 8192/2048 | 6624/1656 | 4 | 0 | 19.141% radeon_sa_bo_new+78 | 1280/64 | 1120/56 | 20 | 0 | 12.500% load_elf_binary+2c4 | 32/32 | 28/28 | 1 | 0 | 12.500% anon_vma_prepare+101 | 576/72 | 512/64 | 8 | 0 | 11.111% ... | ... | ... | ... | ... | ... ------------------------------------------------------------------------------------------------------ After: --------------------------------------------------------------------------------------------------------- Callsite | Total_alloc/Per | Total_req/Per | Hit | Ping-pong | Frag --------------------------------------------------------------------------------------------------------- radeon_cs_parser_init.part.1+11a | 2080/260 | 1504/188 | 8 | 0 | 27.692% radeon_cs_parser_init.part.1+e1 | 384/96 | 288/72 | 4 | 0 | 25.000% radeon_cs_parser_init.part.1+93 | 128/32 | 96/24 | 4 | 0 | 25.000% load_elf_binary+a39 | 512/512 | 392/392 | 1 | 0 | 23.438% __alloc_skb+89 | 6144/877 | 4800/685 | 7 | 6 | 21.875% radeon_fence_emit+5c | 1152/192 | 912/152 | 6 | 0 | 20.833% radeon_cs_parser_relocs+ad | 8192/2048 | 6624/1656 | 4 | 0 | 19.141% radeon_sa_bo_new+78 | 1280/64 | 1120/56 | 20 | 0 | 12.500% load_elf_binary+2c4 | 32/32 | 28/28 | 1 | 0 | 12.500% anon_vma_prepare+101 | 576/72 | 512/64 | 8 | 0 | 11.111% ... | ... | ... | ... | ... | ... --------------------------------------------------------------------------------------------------------- Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1426145571-3065-4-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-kmem.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 02b76976b288..8c85aeb3327a 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -275,10 +275,10 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
275 struct rb_node *next; 275 struct rb_node *next;
276 struct machine *machine = &session->machines.host; 276 struct machine *machine = &session->machines.host;
277 277
278 printf("%.102s\n", graph_dotted_line); 278 printf("%.105s\n", graph_dotted_line);
279 printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr"); 279 printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr");
280 printf(" Total_alloc/Per | Total_req/Per | Hit | Ping-pong | Frag\n"); 280 printf(" Total_alloc/Per | Total_req/Per | Hit | Ping-pong | Frag\n");
281 printf("%.102s\n", graph_dotted_line); 281 printf("%.105s\n", graph_dotted_line);
282 282
283 next = rb_first(root); 283 next = rb_first(root);
284 284
@@ -304,7 +304,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
304 snprintf(buf, sizeof(buf), "%#" PRIx64 "", addr); 304 snprintf(buf, sizeof(buf), "%#" PRIx64 "", addr);
305 printf(" %-34s |", buf); 305 printf(" %-34s |", buf);
306 306
307 printf(" %9llu/%-5lu | %9llu/%-5lu | %8lu | %8lu | %6.3f%%\n", 307 printf(" %9llu/%-5lu | %9llu/%-5lu | %8lu | %9lu | %6.3f%%\n",
308 (unsigned long long)data->bytes_alloc, 308 (unsigned long long)data->bytes_alloc,
309 (unsigned long)data->bytes_alloc / data->hit, 309 (unsigned long)data->bytes_alloc / data->hit,
310 (unsigned long long)data->bytes_req, 310 (unsigned long long)data->bytes_req,
@@ -317,9 +317,9 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
317 } 317 }
318 318
319 if (n_lines == -1) 319 if (n_lines == -1)
320 printf(" ... | ... | ... | ... | ... | ... \n"); 320 printf(" ... | ... | ... | ... | ... | ... \n");
321 321
322 printf("%.102s\n", graph_dotted_line); 322 printf("%.105s\n", graph_dotted_line);
323} 323}
324 324
325static void print_summary(void) 325static void print_summary(void)