Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752584AbbF3MbW (ORCPT ); Tue, 30 Jun 2015 08:31:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42435 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752172AbbF3MbV (ORCPT ); Tue, 30 Jun 2015 08:31:21 -0400 Date: Tue, 30 Jun 2015 14:31:17 +0200 From: Jiri Olsa To: kan.liang@intel.com Cc: acme@kernel.org, namhyung@kernel.org, jolsa@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 1/1] perf,tool: partial callgrap and time support Message-ID: <20150630123117.GG25631@krava.brq.redhat.com> References: <1435513641-9139-1-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435513641-9139-1-git-send-email-kan.liang@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: 2380 Lines: 59 On Sun, Jun 28, 2015 at 01:47:21PM -0400, kan.liang@intel.com wrote: SNIP > Signed-off-by: Kan Liang > --- > tools/perf/Documentation/perf-record.txt | 13 ++++++++ > tools/perf/builtin-record.c | 7 ++-- > tools/perf/perf.h | 2 ++ > tools/perf/util/evsel.c | 55 ++++++++++++++++++++++++++++++-- > tools/perf/util/parse-events.c | 33 +++++++++++++++++++ > tools/perf/util/parse-events.h | 3 ++ > tools/perf/util/parse-events.l | 3 ++ > tools/perf/util/parse-options.c | 2 ++ > tools/perf/util/parse-options.h | 4 +++ > 9 files changed, 116 insertions(+), 6 deletions(-) > > diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt > index 9b9d9d0..f945b01 100644 > --- a/tools/perf/Documentation/perf-record.txt > +++ b/tools/perf/Documentation/perf-record.txt > @@ -45,6 +45,19 @@ OPTIONS > param1 and param2 are defined as formats for the PMU in: > /sys/bus/event_sources/devices//format/* > > + There are also some params which are not defined in ...//format/*. > + These params can be used to set event defaults. > + Here is a list of the params. > + - 'period': Set event sampling period > + - 'callgraph': Disable/enable callgraph. Acceptable values are > + 1 for FP mode, 2 for dwarf mode, 3 for LBR mode, > + 0 for disabling callgraph. why dont use strings like 'fp,dwarf,lbr' to identify callchains? you'd have: '{cpu/cpu-cycles,callgraph=fp,time=1,period=100000/, also you dont need to assign 1 to time, it's the default, so this is equal: '{cpu/cpu-cycles,callgraph=fp,time,period=100000/, come to that, 'fp' could be default for callgraph, like: '{cpu/cpu-cycles,callgraph,time,period=100000/, we already have string terms translation support in pmu_config_term.. but I guess this is not pmu specific and can stay in config_term also please add appropriate tests to tests/parse-events.c thanks, 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/