The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, paulus@samba.org,
	davem@davemloft.net, fweisbec@gmail.com, robert.richter@amd.com,
	perfmon2-devel@lists.sf.net, eranian@gmail.com,
	eranian@google.com
Subject: [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample()
Date: Thu, 8 Apr 2010 22:45:01 +0200	[thread overview]
Message-ID: <4bbe4175.5124cc0a.5bd3.22d6@mx.google.com> (raw)

	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;
 	}
 

             reply	other threads:[~2010-04-08 20:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 20:45 Stephane Eranian [this message]
2010-04-08 20:55 ` [PATCH] perf_events: fix bogus warn_on(_once) in perf_prepare_sample() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4bbe4175.5124cc0a.5bd3.22d6@mx.google.com \
    --to=eranian@google.com \
    --cc=davem@davemloft.net \
    --cc=eranian@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=perfmon2-devel@lists.sf.net \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox