lkml.org 
[lkml]   [2014]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 6/8] perf tools: Add hist.percentage config option
Date
On Thu, 20 Feb 2014 12:01:12 +0100, Jiri Olsa wrote:
> On Mon, Feb 10, 2014 at 11:47:23AM +0900, Namhyung Kim wrote:
>> Add hist.percentage option for setting default value of the
>> symbol_conf.filter_relative. It affects the output of various perf
>> commands (like perf report, top and diff) only if filter(s) applied.
>>
>> An user can write .perfconfig file like below to show absolute
>> percentage of filtered entries by default:
>
> SNIP
>
>> +++ b/tools/perf/util/hist.c
>> @@ -934,3 +934,17 @@ int hists__link(struct hists *leader, struct hists *other)
>>
>> return 0;
>> }
>> +
>> +int perf_hist_config(const char *var, const char *value)
>> +{
>> + if (!strcmp(var, "hist.percentage")) {
>> + if (!strcmp(value, "relative"))
>> + symbol_conf.filter_relative = true;
>> + else if (!strcmp(value, "absolute"))
>> + symbol_conf.filter_relative = false;
>> + else
>> + return -1;
>> + }
>> +
>> + return 0;
>> +}
>
> the inner stuff could be done in parse_percentage function
> not to duplicate the symbol_conf.filter_relative assignment

Will do!

Thanks,
Namhyung


\
 
 \ /
  Last update: 2014-02-24 08:21    [W:0.069 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site