lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 12 Mar 2015 18:28:03 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	linux-kernel@...r.kernel.org, Namhyung Kim <namhyung@...nel.org>,
	David Ahern <dsahern@...il.com>,
	Joonsoo Kim <js1304@...il.com>,
	Minchan Kim <minchan@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: [PATCH 23/24] perf kmem: Fix alignment of slab result table

From: Namhyung Kim <namhyung@...nel.org>

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@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Joonsoo Kim <js1304@...il.com>
Cc: Minchan Kim <minchan@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1426145571-3065-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.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 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,
 	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)
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ