Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932772AbbGUO7t (ORCPT ); Tue, 21 Jul 2015 10:59:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59051 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932600AbbGUO7s (ORCPT ); Tue, 21 Jul 2015 10:59:48 -0400 Date: Tue, 21 Jul 2015 16:59:45 +0200 From: Jiri Olsa To: "Liang, Kan" Cc: Namhyung Kim , "acme@kernel.org" , "jolsa@kernel.org" , "ak@linux.intel.com" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RFC V5 2/4] perf,tool: per-event time support Message-ID: <20150721145945.GC21171@krava.brq.redhat.com> References: <1437132655-15883-1-git-send-email-kan.liang@intel.com> <1437132655-15883-3-git-send-email-kan.liang@intel.com> <20150718124547.GA3759@krava.brq.redhat.com> <20150719032128.GA24219@danjae.kornet> <20150719191322.GA27893@krava.brq.redhat.com> <37D7C6CF3E00A74B8858931C1DB2F0770188F5E9@SHSMSX103.ccr.corp.intel.com> <20150720174046.GA27331@krava.brq.redhat.com> <37D7C6CF3E00A74B8858931C1DB2F0770188F94B@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F0770188F94B@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1164 Lines: 41 On Tue, Jul 21, 2015 at 03:39:17AM +0000, Liang, Kan wrote: SNIP > > + case PERF_EVSEL__CONFIG_TERM_PERIOD: > > + attr->sample_period = term->val.period; > > + default: > > + break; > > + } > > + } > > +} > > + > > /* > > * The enable_on_exec/disabled value strategy: > > * > > @@ -773,6 +789,8 @@ void perf_evsel__config(struct perf_evsel *evsel, > > struct record_opts *opts) > > attr->use_clockid = 1; > > attr->clockid = opts->clockid; > > } > > + > > + apply_config_terms(attr, &evsel->config_terms); > > } > > > > Other options/event modifier may also change the sample_period. > E.g. sample read. > So I think we may move it to the beginning of perf_evsel__config. well, it's at the end to ensure we do the event specific setting after everything else is done if you set this together with group leader sampling for non leader event, I guess you know what you're doing.. right? jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/