Commit 3cb6d154 authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar

perf tools: Fix sample size bit operations

What we want is to count the number of bits in the mask,
not some other random operation written in the middle
of the night.
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@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/1306148788-6179-2-git-send-email-fweisbec@gmail.com
[ Fixed perf_event__names[] alignment which was nearby and hurting my eyes ... ]
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 998bedc8
...@@ -42,7 +42,7 @@ int perf_sample_size(u64 sample_type) ...@@ -42,7 +42,7 @@ int perf_sample_size(u64 sample_type)
int i; int i;
for (i = 0; i < 64; i++) { for (i = 0; i < 64; i++) {
if ((mask << i) & 1) if (mask & (1UL << i))
size++; size++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment