* [PATCH] tools: perf: consistently use PRIu64 for printing u64 values
@ 2015-04-23 13:40 Will Deacon
2015-04-23 13:45 ` Arnaldo Carvalho de Melo
2015-05-01 10:13 ` [tip:perf/urgent] perf kmem: Consistently " tip-bot for Will Deacon
0 siblings, 2 replies; 3+ messages in thread
From: Will Deacon @ 2015-04-23 13:40 UTC (permalink / raw)
To: linux-kernel
Cc: Will Deacon, Namhyung Kim, David Ahern, Jiri Olsa, Joonsoo Kim,
Minchan Kim, Peter Zijlstra, Arnaldo Carvalho de Melo
Building the perf tool for 32-bit ARM results in the following build
error due to a combination of an incorrect conversion specifier and
compiling with -Werror:
builtin-kmem.c: In function ‘print_page_summary’:
builtin-kmem.c:644:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
nr_alloc_freed, (total_alloc_freed_bytes) / 1024);
^
builtin-kmem.c:647:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
(total_page_alloc_bytes - total_alloc_freed_bytes) / 1024);
^
cc1: all warnings being treated as errors
This patch fixes the problem by consistently using PRIu64 for printing
out u64 values.
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
tools/perf/builtin-kmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 63ea01349b6e..a1915b430044 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -640,9 +640,9 @@ static void print_page_summary(void)
nr_page_frees, total_page_free_bytes / 1024);
printf("\n");
- printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total alloc+freed requests",
+ printf("%-30s: %'16"PRIu64" [ %'16"PRIu64" KB ]\n", "Total alloc+freed requests",
nr_alloc_freed, (total_alloc_freed_bytes) / 1024);
- printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total alloc-only requests",
+ printf("%-30s: %'16"PRIu64" [ %'16"PRIu64" KB ]\n", "Total alloc-only requests",
nr_page_allocs - nr_alloc_freed,
(total_page_alloc_bytes - total_alloc_freed_bytes) / 1024);
printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total free-only requests",
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools: perf: consistently use PRIu64 for printing u64 values
2015-04-23 13:40 [PATCH] tools: perf: consistently use PRIu64 for printing u64 values Will Deacon
@ 2015-04-23 13:45 ` Arnaldo Carvalho de Melo
2015-05-01 10:13 ` [tip:perf/urgent] perf kmem: Consistently " tip-bot for Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-04-23 13:45 UTC (permalink / raw)
To: Will Deacon
Cc: linux-kernel, Namhyung Kim, David Ahern, Jiri Olsa, Joonsoo Kim,
Minchan Kim, Peter Zijlstra, Arnaldo Carvalho de Melo
Em Thu, Apr 23, 2015 at 02:40:37PM +0100, Will Deacon escreveu:
> Building the perf tool for 32-bit ARM results in the following build
> error due to a combination of an incorrect conversion specifier and
> compiling with -Werror:
>
> builtin-kmem.c: In function ‘print_page_summary’:
> builtin-kmem.c:644:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
> nr_alloc_freed, (total_alloc_freed_bytes) / 1024);
> ^
> builtin-kmem.c:647:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
> (total_page_alloc_bytes - total_alloc_freed_bytes) / 1024);
> ^
> cc1: all warnings being treated as errors
>
> This patch fixes the problem by consistently using PRIu64 for printing
> out u64 values.
Thanks, applied to perf/urgent.
- Arnaldo
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:perf/urgent] perf kmem: Consistently use PRIu64 for printing u64 values
2015-04-23 13:40 [PATCH] tools: perf: consistently use PRIu64 for printing u64 values Will Deacon
2015-04-23 13:45 ` Arnaldo Carvalho de Melo
@ 2015-05-01 10:13 ` tip-bot for Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Will Deacon @ 2015-05-01 10:13 UTC (permalink / raw)
To: linux-tip-commits
Cc: hpa, a.p.zijlstra, mingo, dsahern, tglx, jolsa, linux-kernel,
will.deacon, namhyung, js1304, acme, minchan
Commit-ID: 6145c259cd454bcb7a1288f7bbb7b4fbc18175dd
Gitweb: http://git.kernel.org/tip/6145c259cd454bcb7a1288f7bbb7b4fbc18175dd
Author: Will Deacon <will.deacon@arm.com>
AuthorDate: Thu, 23 Apr 2015 14:40:37 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 23 Apr 2015 17:08:22 -0300
perf kmem: Consistently use PRIu64 for printing u64 values
Building the perf tool for 32-bit ARM results in the following build
error due to a combination of an incorrect conversion specifier and
compiling with -Werror:
builtin-kmem.c: In function ‘print_page_summary’:
builtin-kmem.c:644:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
nr_alloc_freed, (total_alloc_freed_bytes) / 1024);
^
builtin-kmem.c:647:9: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u64’ [-Werror=format=]
(total_page_alloc_bytes - total_alloc_freed_bytes) / 1024);
^
cc1: all warnings being treated as errors
This patch fixes the problem by consistently using PRIu64 for printing
out u64 values.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429796437-1790-1-git-send-email-will.deacon@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-kmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 63ea013..a1915b4 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -640,9 +640,9 @@ static void print_page_summary(void)
nr_page_frees, total_page_free_bytes / 1024);
printf("\n");
- printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total alloc+freed requests",
+ printf("%-30s: %'16"PRIu64" [ %'16"PRIu64" KB ]\n", "Total alloc+freed requests",
nr_alloc_freed, (total_alloc_freed_bytes) / 1024);
- printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total alloc-only requests",
+ printf("%-30s: %'16"PRIu64" [ %'16"PRIu64" KB ]\n", "Total alloc-only requests",
nr_page_allocs - nr_alloc_freed,
(total_page_alloc_bytes - total_alloc_freed_bytes) / 1024);
printf("%-30s: %'16lu [ %'16"PRIu64" KB ]\n", "Total free-only requests",
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-01 10:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 13:40 [PATCH] tools: perf: consistently use PRIu64 for printing u64 values Will Deacon
2015-04-23 13:45 ` Arnaldo Carvalho de Melo
2015-05-01 10:13 ` [tip:perf/urgent] perf kmem: Consistently " tip-bot for Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.