From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753458AbbC3RZv (ORCPT ); Mon, 30 Mar 2015 13:25:51 -0400 Received: from one.firstfloor.org ([193.170.194.197]:47424 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753127AbbC3RZt (ORCPT ); Mon, 30 Mar 2015 13:25:49 -0400 Date: Mon, 30 Mar 2015 19:25:45 +0200 From: Andi Kleen To: "Liang, Kan" Cc: Peter Zijlstra , "linux-kernel@vger.kernel.org" , "mingo@kernel.org" , "acme@infradead.org" , "eranian@google.com" , "andi@firstfloor.org" Subject: Re: [PATCH V5 4/6] perf, x86: handle multiple records in PEBS buffer Message-ID: <20150330172545.GG2366@two.firstfloor.org> References: <1424701556-28270-1-git-send-email-kan.liang@intel.com> <1424701556-28270-5-git-send-email-kan.liang@intel.com> <20150330134531.GV23123@twins.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F0770178BAF5@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F0770178BAF5@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > - its possible (and harmless) for the status field to contain set bits > > for !PEBS events -- the proposed code is buggy here. > I will fix it. > > - its possible to have multiple PEBS bits set even though the event > > really only was for a single event -- if you count everything with > > multiple PEBS bits set as a collision you're counting wrong. > > > > In what situation multiple PEBS bits was set for a single event? > Could you please give me an example? The field in the PEBS record is just a copy of GLOBAL_STATUS (minus some extra bits), so if there were already bits in GLOBAL_STATUS that haven't been cleared yet you may see multiple bits In a proper configuration this should be rare, as we expect the events to be different and run on different effective frequencies, so GLOBAL_STATUS should be already cleared. -Andi -- ak@linux.intel.com -- Speaking for myself only.