From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CB7C32C00E3 for ; Fri, 10 May 2013 21:52:18 +1000 (EST) Message-ID: <1368186695.4524.27.camel@pasglop> Subject: Re: Invalid perf_branch_entry.to entries question From: Benjamin Herrenschmidt To: Michael Neuling Date: Fri, 10 May 2013 21:51:35 +1000 In-Reply-To: References: <25394.1367890528@ale.ozlabs.ibm.com> <20130508155929.GA8459@dyad.programming.kicks-ass.net> <14691.1368052755@ale.ozlabs.ibm.com> <20130510104352.GF31235@dyad.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: Peter Zijlstra , Linux PPC dev , linux-kernel@vger.kernel.org, eranian@google.com, Anshuman Khandual List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2013-05-10 at 20:50 +1000, Michael Neuling wrote: > The buffer is in the core (not main memory) and hence only has limited > entries. So skipping entries that can hopefully be determined in > other ways means we can log more branches. > > That being said, it's a PITA for the kernel ;-) I would suggest flagging them. As you mention, the code might have been modified since the sample was taken. Even if it still looks like a branch and you can compute the "To" address it might not be the right one ... at least userspace should be notified that this specific sample is to handle with care. And if you just can't read the instruction or it's not a branch anymore, then stick a -1 in there, no way it can be a valid branch address :-) Cheers, Ben.