lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131101131734.GG10041@krava.brq.redhat.com>
Date:	Fri, 1 Nov 2013 14:17:34 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Stephane Eranian <eranian@...gle.com>,
	Rodrigo Campos <rodrigo@...g.com.ar>,
	Arun Sharma <asharma@...com>
Subject: Re: [PATCH 14/14] perf report: Add -g cumulative option

On Thu, Oct 31, 2013 at 03:56:16PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@....com>
> 
> The -g cumulative option is for showing accumulated overhead (period)
> value as well as self overhead.
> 
> Cc: Arun Sharma <asharma@...com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/Documentation/perf-report.txt |  2 ++
>  tools/perf/builtin-report.c              |  3 +++
>  tools/perf/util/callchain.c              | 12 +++++++++++-
>  3 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
> index 10a279871251..b150bfb734f4 100644
> --- a/tools/perf/Documentation/perf-report.txt
> +++ b/tools/perf/Documentation/perf-report.txt
> @@ -130,6 +130,8 @@ OPTIONS
>  	- graph: use a graph tree, displaying absolute overhead rates.
>  	- fractal: like graph, but displays relative rates. Each branch of
>  		 the tree is considered as a new profiled object. +
> +        - cumulative: accumulate callchain to parent entry so that they can
> +		    show up in the output.
>  
>  	order can be either:
>  	- callee: callee based call graph.
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 3b626127c8d6..281053b28898 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -1030,6 +1030,9 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
>  	else if (!strncmp(tok, "fractal", strlen(arg)))
>  		callchain_param.mode = CHAIN_GRAPH_REL;
>  
> +	else if (!strncmp(tok, "cumulative", strlen(arg)))
> +		callchain_param.mode = CHAIN_CUMULATIVE;
> +
>  	else if (!strncmp(tok, "none", strlen(arg))) {
>  		callchain_param.mode = CHAIN_NONE;
>  		symbol_conf.use_callchain = false;
> diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
> index c10052c6e73c..c3c73eb839df 100644
> --- a/tools/perf/util/callchain.c
> +++ b/tools/perf/util/callchain.c
> @@ -150,6 +150,14 @@ sort_chain_graph_rel(struct rb_root *rb_root, struct callchain_root *chain_root,
>  	rb_root->rb_node = chain_root->node.rb_root.rb_node;
>  }
>  
> +static void
> +sort_chain_cumulative(struct rb_root *rb_root __maybe_unused,
> +		      struct callchain_root *chain_root __maybe_unused,
> +		      u64 min_hit __maybe_unused,
> +		      struct callchain_param *param __maybe_unused)
> +{
> +}

maybe add some commentary explaning that it's intentionaly empty

or maybe dont set it and do following check
in __hists__insert_output_entry:

        if (symbol_conf.use_callchain && callchain_param.sort)
                callchain_param.sort(&he->sorted_chain, he->callchain,
                                      min_callchain_hits, &callchain_param);


jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ