Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbdF3HG2 (ORCPT ); Fri, 30 Jun 2017 03:06:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50248 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751579AbdF3HG1 (ORCPT ); Fri, 30 Jun 2017 03:06:27 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EA7EFC049D5C Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EA7EFC049D5C Date: Fri, 30 Jun 2017 09:06:24 +0200 From: Jiri Olsa To: "Liang, Kan" 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 Message-ID: <20170630070624.GD6815@krava> References: <20170628143153.29643-1-kan.liang@intel.com> <20170629152912.GB1463@krava> <37D7C6CF3E00A74B8858931C1DB2F0775371415B@SHSMSX103.ccr.corp.intel.com> <20170629153932.GA2924@krava> <37D7C6CF3E00A74B8858931C1DB2F077537141A7@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077537141A7@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 30 Jun 2017 07:06:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1215 Lines: 42 On Thu, Jun 29, 2017 at 03:50:29PM +0000, Liang, Kan wrote: > > > > > > 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. we could set the no_aux_samples for the tracking_evsel as well jirka