From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: dsahern@gmail.com, minchan@kernel.org, js1304@gmail.com,
mingo@kernel.org, acme@redhat.com, hpa@zytor.com,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
namhyung@kernel.org, a.p.zijlstra@chello.nl
Subject: [tip:perf/core] perf kmem: Fix alignment of slab result table
Date: Sat, 14 Mar 2015 00:07:07 -0700 [thread overview]
Message-ID: <tip-65f46e0214c64198a0266c37181a7776e16b7e53@git.kernel.org> (raw)
In-Reply-To: <1426145571-3065-4-git-send-email-namhyung@kernel.org>
Commit-ID: 65f46e0214c64198a0266c37181a7776e16b7e53
Gitweb: http://git.kernel.org/tip/65f46e0214c64198a0266c37181a7776e16b7e53
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Thu, 12 Mar 2015 16:32:48 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 13 Mar 2015 07:47:48 -0300
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>
---
tools/perf/builtin-kmem.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 02b7697..8c85aeb 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,
struct rb_node *next;
struct machine *machine = &session->machines.host;
- printf("%.102s\n", graph_dotted_line);
+ printf("%.105s\n", graph_dotted_line);
printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr");
printf(" Total_alloc/Per | Total_req/Per | Hit | Ping-pong | Frag\n");
- printf("%.102s\n", graph_dotted_line);
+ printf("%.105s\n", graph_dotted_line);
next = rb_first(root);
@@ -304,7 +304,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
snprintf(buf, sizeof(buf), "%#" PRIx64 "", addr);
printf(" %-34s |", buf);
- printf(" %9llu/%-5lu | %9llu/%-5lu | %8lu | %8lu | %6.3f%%\n",
+ printf(" %9llu/%-5lu | %9llu/%-5lu | %8lu | %9lu | %6.3f%%\n",
(unsigned long long)data->bytes_alloc,
(unsigned long)data->bytes_alloc / data->hit,
(unsigned long long)data->bytes_req,
@@ -317,9 +317,9 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
}
if (n_lines == -1)
- printf(" ... | ... | ... | ... | ... | ... \n");
+ printf(" ... | ... | ... | ... | ... | ... \n");
- printf("%.102s\n", graph_dotted_line);
+ printf("%.105s\n", graph_dotted_line);
}
static void print_summary(void)
next prev parent reply other threads:[~2015-03-14 7:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 7:32 [RFC/PATCHSET 0/6] perf kmem: Implement page allocation analysis (v1) Namhyung Kim
2015-03-12 7:32 ` [PATCH 1/6] perf kmem: Fix segfault when invalid sort key is given Namhyung Kim
2015-03-14 7:06 ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-03-12 7:32 ` [PATCH 2/6] perf kmem: Allow -v option Namhyung Kim
2015-03-14 7:06 ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-03-12 7:32 ` [PATCH 3/6] perf kmem: Fix alignment of slab result table Namhyung Kim
2015-03-14 7:07 ` tip-bot for Namhyung Kim [this message]
2015-03-12 7:32 ` [PATCH 4/6] perf kmem: Analyze page allocator events also Namhyung Kim
2015-03-12 11:01 ` Jiri Olsa
2015-03-12 15:11 ` Namhyung Kim
2015-03-12 7:32 ` [PATCH 5/6] perf kmem: Implement stat --page --caller Namhyung Kim
2015-03-12 7:32 ` [PATCH 6/6] perf kmem: Support sort keys on page analysis Namhyung Kim
2015-03-12 10:41 ` [RFC/PATCHSET 0/6] perf kmem: Implement page allocation analysis (v1) Ingo Molnar
2015-03-12 14:58 ` Namhyung Kim
2015-03-12 15:54 ` Ingo Molnar
2015-03-13 8:19 ` Namhyung Kim
2015-03-13 12:44 ` Ingo Molnar
2015-03-16 2:06 ` Namhyung Kim
2015-03-16 2:10 ` Namhyung Kim
2015-03-16 8:26 ` Ingo Molnar
2015-03-16 8:35 ` Namhyung Kim
2015-03-16 8:43 ` Ingo Molnar
2015-03-12 19:07 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-65f46e0214c64198a0266c37181a7776e16b7e53@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).