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:
> This patch adds support for following config options to ~/.perfconfig file.
>
> [call-graph]
> record-mode = dwarf
> dump-size = 8192
> print-type = fractal
> order = callee
> threshold = 0.5
> print-limit = 128
> sort-key = function
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/callchain.c | 33 +++++++++++++++++++++++++++++++++
> tools/perf/util/callchain.h | 1 +
> tools/perf/util/config.c | 3 +++
> 3 files changed, 37 insertions(+)
>
> diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
> index ba7297230143..ee489a1e3f4c 100644
> --- a/tools/perf/util/callchain.c
> +++ b/tools/perf/util/callchain.c
> @@ -168,6 +168,39 @@ parse_callchain_report_opt(const char *arg)
> return 0;
> }
>
> +int perf_callchain_config(const char *var, const char *value)
> +{
> + if (prefixcmp(var, "call-graph."))
> + return 0;
> + var += 11; /* strlen("call-graph.") == 11 */

should we use sizeof("call-graph.") - 1 instead ?

jirka


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