[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4bbe4175.5124cc0a.5bd3.22d6@mx.google.com>
Date: Thu, 8 Apr 2010 22:45:01 +0200
From: Stephane Eranian <eranian@...gle.com>
To: linux-kernel@...r.kernel.org
Cc: peterz@...radead.org, mingo@...e.hu, paulus@...ba.org,
davem@...emloft.net, fweisbec@...il.com, robert.richter@....com,
perfmon2-devel@...ts.sf.net, eranian@...il.com, eranian@...gle.com
Subject: [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()
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@...gle.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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists