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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 16 Aug 2016 16:21:31 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: RFC: callchain showing same entry as hist_entry

Em Tue, Aug 16, 2016 at 12:46:57PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Aug 17, 2016 at 12:41:18AM +0900, Namhyung Kim escreveu:
> > Hmm.. if so, wouldn't it be better skipping the first callchain entry
> > when the user-given sort key contains "sym" too (not only when it
> > starts with 'sym')?
> 
> Probably, I think, whatever causes the mentioned duplication. And do
> that at all the UIs, hence the suggestion for a callchain__first_node()
> or more suitably named routine where such logic would live, to be
> used for all the callchain rendering interfaces.

So, it is not possible to have that callchain__first_node() one, since
we're dealing with one of the "list" entries, that are in each "node",
etc, we need to do that test when printing the first entry, how about
this one instead?

commit 83b98f4da0068a4aefe49554351f33944dfd03d1
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
Date:   Tue Aug 16 11:36:50 2016 -0300

    perf callchain: Do not repeat the hist_entry symbol as the 1st callchain entry
    
    We were getting:
    
         2.62%  [k] __d_lookup_rcu
                |
                ---__d_lookup_rcu
                   |
                    --2.52%--lookup_fast
                              |
                               --2.50%--walk_component
    
    Noticed the __d_lookup_rcu dup, elide that first entry if "sym" is in
    the sort order, as in the current default sort order:
    
         2.62%  [k] __d_lookup_rcu
                |
                 --2.52%--lookup_fast
                           |
                            --2.50%--walk_component
    
    This is for --stdio, TUI being investigated.
    
    Cc: Adrian Hunter <adrian.hunter@...el.com>
    Cc: David Ahern <dsahern@...il.com>
    Cc: Jiri Olsa <jolsa@...nel.org>
    Cc: Linus Torvalds <torvalds@...ux-foundation.org>
    Cc: Namhyung Kim <namhyung@...nel.org>
    Cc: Wang Nan <wangnan0@...wei.com>
    Link: http://lkml.kernel.org/r/20160816143628.GG20972@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>

diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 9b65f4a6b35a..a894e35bb4d4 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -206,8 +206,7 @@ static size_t callchain__fprintf_graph(FILE *fp, struct rb_root *root,
 			 * the symbol. No need to print it otherwise it appears as
 			 * displayed twice.
 			 */
-			if (!i++ && field_order == NULL &&
-			    sort_order && !prefixcmp(sort_order, "sym"))
+			if (!i++ && field_order == NULL && perf_hpp_list.sym)
 				continue;
 			if (!printed) {
 				ret += callchain__fprintf_left_margin(fp, left_margin);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ