Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756890AbcCaOGG (ORCPT ); Thu, 31 Mar 2016 10:06:06 -0400 Received: from mga11.intel.com ([192.55.52.93]:28377 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753163AbcCaOGE convert rfc822-to-8bit (ORCPT ); Thu, 31 Mar 2016 10:06:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,422,1455004800"; d="scan'208";a="678603743" From: "Liang, Kan" To: "acme@kernel.org" , Peter Zijlstra CC: "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 Thread-Topic: [PATCH V2 1/1] perf/core: don't find side-band event from all pmus Thread-Index: AQHRibNvpK2JvytInkKikXuiI5DbO59zlleQ Date: Thu, 31 Mar 2016 14:05:46 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077058AA5A8@SHSMSX103.ccr.corp.intel.com> References: <1458757477-3781-1-git-send-email-kan.liang@intel.com> <20160329120609.GG3408@twins.programming.kicks-ass.net> In-Reply-To: <20160329120609.GG3408@twins.programming.kicks-ass.net> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjUyNjUzZDAtNmUzOS00NWY4LTljMzAtYmEwZGY3ZjYyMjcwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjNRSEczZnpJdjJJd2xGY3lIOVFWdUJsVFZ0OTJEVHg2WmVXVWZaRUpEd0E9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 814 Lines: 36 > > +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? Thanks, Kan