Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757260AbcCaO0K (ORCPT ); Thu, 31 Mar 2016 10:26:10 -0400 Received: from mail.kernel.org ([198.145.29.136]:58046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756948AbcCaO0I (ORCPT ); Thu, 31 Mar 2016 10:26:08 -0400 Date: Thu, 31 Mar 2016 11:25:58 -0300 From: "acme@kernel.org" To: "Liang, Kan" Cc: Peter Zijlstra , "ak@linux.intel.com" , "eranian@google.com" , "vincent.weaver@maine.edu" , "tglx@linutronix.de" , "mingo@kernel.org" , "acme@redhat.com" , "jolsa@redhat.com" , "alexander.shishkin@linux.intel.com" , "ying.huang@linux.intel.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH V2 1/1] perf/core: don't find side-band event from all pmus Message-ID: <20160331142558.GA27708@kernel.org> References: <1458757477-3781-1-git-send-email-kan.liang@intel.com> <20160329120609.GG3408@twins.programming.kicks-ass.net> <37D7C6CF3E00A74B8858931C1DB2F077058AA5A8@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077058AA5A8@SHSMSX103.ccr.corp.intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 998 Lines: 38 Em Thu, Mar 31, 2016 at 02:05:46PM +0000, Liang, Kan escreveu: > > > > > +static void perf_event_sb_mask(unsigned int sb_mask, > > > + perf_event_aux_output_cb output, > > > + void *data) > > > +{ > > > + int sb; > > > + > > > + for (sb = 0; sb < sb_nr; sb++) { > > > + if (!(sb_mask & (1 << sb))) > > > + continue; > > > + perf_event_sb_iterate(sb, output, data); > > > + } > > > +} > > > > > @@ -5852,7 +5910,8 @@ static void perf_event_task(struct task_struct > > > *task, > > > > > > perf_event_aux(perf_event_task_output, > > > &task_event, > > > - task_ctx); > > > + task_ctx, > > > + (1 << sb_task) | (1 << sb_mmap) | (1 << sb_comm)); > > > } > > > > So one side-effect of this change is that the above event can be delivered > > 3 times if you're 'lucky'. > > > > Acme; does userspace care? > > Hi Arnaldo, > > Do you think if it's an issue for userspace? Trying to get context and decode what you guys wrote... - Arnaldo