aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-22 17:37:02 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-22 20:41:57 -0500
commit9486aa38771661e96fbb51c549b9901b5df609d8 (patch)
tree72cecbff0cb5124c960feeec3a6ac1fff75c649a /tools/perf/builtin-script.c
parent57b84e53171ce672683faf1cab2e660965a6bdaf (diff)
perf tools: Fix 64 bit integer format strings
Using %L[uxd] has issues in some architectures, like on ppc64. Fix it by making our 64 bit integers typedefs of stdint.h types and using PRI[ux]64 like, for instance, git does. Reported by Denis Kirjanov that provided a patch for one case, I went and changed all cases. Reported-by: Denis Kirjanov <dkirjanov@kernel.org> Tested-by: Denis Kirjanov <dkirjanov@kernel.org> LKML-Reference: <20110120093246.GA8031@hera.kernel.org> Cc: Denis Kirjanov <dkirjanov@kernel.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Pingtian Han <phan@redhat.com> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r--tools/perf/builtin-script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 150a606002eb..b766c2a9ac97 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -77,8 +77,8 @@ static int process_sample_event(event_t *event, struct sample_data *sample,
77 if (session->sample_type & PERF_SAMPLE_RAW) { 77 if (session->sample_type & PERF_SAMPLE_RAW) {
78 if (debug_mode) { 78 if (debug_mode) {
79 if (sample->time < last_timestamp) { 79 if (sample->time < last_timestamp) {
80 pr_err("Samples misordered, previous: %llu " 80 pr_err("Samples misordered, previous: %" PRIu64
81 "this: %llu\n", last_timestamp, 81 " this: %" PRIu64 "\n", last_timestamp,
82 sample->time); 82 sample->time);
83 nr_unordered++; 83 nr_unordered++;
84 } 84 }
@@ -126,7 +126,7 @@ static int __cmd_script(struct perf_session *session)
126 ret = perf_session__process_events(session, &event_ops); 126 ret = perf_session__process_events(session, &event_ops);
127 127
128 if (debug_mode) 128 if (debug_mode)
129 pr_err("Misordered timestamps: %llu\n", nr_unordered); 129 pr_err("Misordered timestamps: %" PRIu64 "\n", nr_unordered);
130 130
131 return ret; 131 return ret;
132} 132}