Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f61f3e4 authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar
Browse files

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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarFrederic 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: default avatarIngo Molnar <mingo@elte.hu>
parent 8ce26169
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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 & (1UL << i))
		if (mask & (1ULL << i))
			size++;
			size++;
	}
	}