From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753232AbdF2PwE convert rfc822-to-8bit (ORCPT ); Thu, 29 Jun 2017 11:52:04 -0400 Received: from mga06.intel.com ([134.134.136.31]:19762 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbdF2Pv7 (ORCPT ); Thu, 29 Jun 2017 11:51:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,281,1496127600"; d="scan'208";a="118968076" From: "Liang, Kan" To: Jiri Olsa CC: "acme@kernel.org" , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , "peterz@infradead.org" , "Hunter, Adrian" , "alexander.shishkin@linux.intel.com" , "ak@linux.intel.com" Subject: RE: [PATCH] perf tools: set no branch type for dummy event in PT Thread-Topic: [PATCH] perf tools: set no branch type for dummy event in PT Thread-Index: AQHS8Bt1uVwRKpcWuUaNyttmillp0qI7cpcAgACGV+D//3yMAIAAiC4Q Date: Thu, 29 Jun 2017 15:50:29 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F077537141A7@SHSMSX103.ccr.corp.intel.com> References: <20170628143153.29643-1-kan.liang@intel.com> <20170629152912.GB1463@krava> <37D7C6CF3E00A74B8858931C1DB2F0775371415B@SHSMSX103.ccr.corp.intel.com> <20170629153932.GA2924@krava> In-Reply-To: <20170629153932.GA2924@krava> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjIxYmVhNjAtNGI5MS00YzJhLTljYmMtZmQ5MDIyMjAzMjA5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImMyV0MzYjVKVG5hVXpOMkFuS0kzcXNUSG94WTFUVmYzdEJFSnpQZEQ5Rmc9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action 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 > > On Thu, Jun 29, 2017 at 03:31:45PM +0000, Liang, Kan wrote: > > SNIP > > > > > static int intel_pt_recording_options(struct auxtrace_record *itr, > > > > struct perf_evlist *evlist, > > > > struct record_opts *opts) @@ -701,6 > +717,8 @@ static > > > > int intel_pt_recording_options(struct > > > auxtrace_record *itr, > > > > perf_evsel__set_sample_bit(switch_evsel, > > > TIME); > > > > perf_evsel__set_sample_bit(switch_evsel, > > > CPU); > > > > > > > > + add_no_lbr_config_term(&switch_evsel- > > > >config_terms); > > > > + > > > > > > hum, why can't you change the sample bit directly? with: > > > > > > perf_evsel__reset_sample_bit(switch_evsel, > > > BRANCH_STACK); > > > > It will be overwrite in perf_evsel__config. > > > > where? you set the evsel->no_aux_samples Yes for switch_evsel, but no for tracking_evsel. If it's only for switch_evsel, yes, we can change the sample bit directly. But I think we should use the same method for both of them. Thanks, Kan