lkml.org 
[lkml]   [2014]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] perf tools: Introduce perf_callchain_config()
On Sun, Sep 21, 2014 at 01:18:05AM +0900, Namhyung Kim wrote:

SNIP

> +int perf_callchain_config(const char *var, const char *value)
> +{
> + if (prefixcmp(var, "call-graph."))
> + return 0;
> + var += 11; /* strlen("call-graph.") == 11 */
> +
> + if (!strcmp(var, "record-mode"))
> + return parse_callchain_record_opt(value);
> +#ifdef HAVE_DWARF_UNWIND_SUPPORT
> + if (!strcmp(var, "dump-size")) {
> + unsigned long size = 0;
> + int ret;
> +
> + ret = get_stack_size(value, &size);
> + callchain_param.dump_size = size;
> +
> + return ret;
> + }
> +#endif
> + if (!strcmp(var, "print-type"))
> + return parse_callchain_report_opt(value);
> + if (!strcmp(var, "order"))
> + return parse_callchain_report_opt(value);
> + if (!strcmp(var, "threshold"))
> + return parse_callchain_report_opt(value);
> + if (!strcmp(var, "print-limit"))
> + return parse_callchain_report_opt(value);
> + if (!strcmp(var, "sort-key"))
> + return parse_callchain_report_opt(value);

so this allows to spcify option like:

[call-graph]
sort-key = caller,function,1

which might be confusing for someone.. personaly I'm ok with that,
I'm just raising it, because it's not apparent and not sure how
strict we want to be in here ;-)

jirka


\
 
 \ /
  Last update: 2014-09-22 17:01    [W:0.077 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site