summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-05-24 03:31:26 +0200
committerIngo Molnar <mingo@elte.hu>2011-05-24 04:33:24 +0200
commit0f61f3e4db71946292ef8d6d6df74b8fcf001646 (patch)
treefe1412923e82309065038c526f6fda664273e5e7 /tools
parent8ce26169555cf5634263d39d3665e45300218a5e (diff)
downloadop-kernel-dev-0f61f3e4db71946292ef8d6d6df74b8fcf001646.zip
op-kernel-dev-0f61f3e4db71946292ef8d6d6df74b8fcf001646.tar.gz
perf tools: Fix sample type size calculation in 32 bits archs
The shift used here to count the number of bits set in the mask doesn't work above the low part for archs that are not 64 bits. Fix the constant used for the shift. This fixes a 32-bit perf top failure reported by Eric Dumazet: Can't parse sample, err = -14 Can't parse sample, err = -14 ... Reported-and-tested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Stephane Eranian <eranian@google.com Link: http://lkml.kernel.org/r/1306200686-17317-1-git-send-email-fweisbec@gmail.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 252b72a..6635fcd 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -42,7 +42,7 @@ int perf_sample_size(u64 sample_type)
int i;
for (i = 0; i < 64; i++) {
- if (mask & (1UL << i))
+ if (mask & (1ULL << i))
size++;
}
OpenPOWER on IntegriCloud