The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()
@ 2010-04-08 20:45 Stephane Eranian
  2010-04-08 20:55 ` Peter Zijlstra
  0 siblings, 1 reply; 18+ messages in thread
From: Stephane Eranian @ 2010-04-08 20:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, mingo, paulus, davem, fweisbec, robert.richter,
	perfmon2-devel, eranian, eranian

	There is a warn_on_once() check for PERF_SAMPLE_RAW which trips
	when using PEBS on both Core and Nehalem. Core PEBS sample size is 144
	bytes and 176 bytes for Nehalem. Both are multiples of 8, but the size
	field is encoded as int, thus the total is never a multiple of 8 which
	trips the check. I think the size should have been u64, but now it is
	too late to change given it is ABI.

	Signed-off-by: Stephane Eranian <eranian@google.com>

diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 8143e77..fffeb95 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -3311,7 +3311,6 @@ void perf_prepare_sample(struct perf_event_header *header,
 		else
 			size += sizeof(u32);
 
-		WARN_ON_ONCE(size & (sizeof(u64)-1));
 		header->size += size;
 	}
 

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-04-08 21:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-08 20:45 [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample() Stephane Eranian
2010-04-08 20:55 ` Peter Zijlstra
2010-04-08 21:03   ` Peter Zijlstra
2010-04-08 21:18     ` Stephane Eranian
2010-04-08 21:24       ` Peter Zijlstra
2010-04-08 21:33         ` Stephane Eranian
2010-04-08 21:08   ` Stephane Eranian
2010-04-08 21:11     ` Peter Zijlstra
2010-04-08 21:14       ` Stephane Eranian
2010-04-08 21:17         ` Frederic Weisbecker
2010-04-08 21:22           ` Stephane Eranian
2010-04-08 21:42             ` Frederic Weisbecker
2010-04-08 21:46             ` Frederic Weisbecker
2010-04-08 21:23         ` Peter Zijlstra
2010-04-08 21:12     ` Peter Zijlstra
2010-04-08 21:15     ` Peter Zijlstra
2010-04-08 21:29       ` Stephane Eranian
2010-04-08 21:42         ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox