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-next>] [day] [month] [year] [list]
Date:	Mon, 2 Jun 2014 16:12:20 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	David Ahern <dsahern@...il.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: Re: Fw: Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on
 DWARF debug info

On Fri, May 30, 2014 at 05:59:25PM +0200, Jiri Olsa wrote:
> On Fri, May 30, 2014 at 08:50:19AM -0700, Sukadev Bhattiprolu wrote:
> > Jiri Olsa [jolsa@...hat.com] wrote:
> > | On Fri, May 16, 2014 at 02:03:33PM -0700, Sukadev Bhattiprolu wrote:
> > | > Hi Arnaldo, Jiri
> > | > 
> > | > Do you have any comments on this patch ? Pls let me know if you need
> > | > me to resend this. The TODO is for a less frequent case and can be
> > | > addressed independently.
> > | 
> > | hi,
> > | I can take it, but it does not apply to my perf/core,
> > | there're some ARM related unwind changes already:
> > |   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> > | 
> > | please resend updated patch
> > 
> > Jiri,
> > 
> > I resent the patch. Can you please let me know if you have any
> > comments ?
> > 
> > 	https://lkml.org/lkml/2014/5/22/695
> 
> sry, got distracted.. yep, that one seems looks ok now, I'll queue it
> 

so.. I tried some performance test and looks like this
adds some considerable penalty also for archs != powerpc

test data:
  $ sudo ./perf record -a -g -F 50000 # perf.data size is ~1.1GB

before your patch:

 Performance counter stats for './perf.old report --stdio' (5 runs):

    60,345,248,146      cycles                     ( +-  0.50% ) █▁▁▂▂
    72,766,496,819      instructions              #    1.21  insns per cycle          ( +-  0.00% ) █▁▄▁▅

      19.930324523 seconds time elapsed                                          ( +-  1.07% ) █▄▁▁▁

with your patch:
    62,559,079,470      cycles                     ( +-  2.10% ) ▁▁▂▁█
    72,649,781,930      instructions              #    1.16  insns per cycle          ( +-  0.00% ) ▄▃▅█▁

      23.355028944 seconds time elapsed                                          ( +-  9.85% ) ▁▁▁▂█


I think the issue is following hunk (I havent verified with record/report):

@@ -1300,14 +1301,25 @@ static int machine__resolve_callchain_sample(struct machine *machine,
                return 0;
        }
 
+       /*
+        * Based on DWARF debug information, some architectures skip
+        * some of the callchain entries saved by the kernel.
+        */
+       skip_slot = arch_skip_callchain_idx(machine, thread, chain);
+
        for (i = 0; i < chain_nr; i++) {
                u64 ip;
                struct addr_location al;
 
-               if (callchain_param.order == ORDER_CALLEE)
+               if (callchain_param.order == ORDER_CALLEE) {
+                       if (i == skip_slot)
+                               continue;
                        ip = chain->ips[i];
-               else
+               } else {
+                       if ((int)(chain->nr - i - 1) == skip_slot)
+                               continue;
                        ip = chain->ips[chain->nr - i - 1];
+               }


could you please change this, so it's nop for arch != powerpc
via #ifdef I guess.. or some other smart way ;-)

adding some other folks and lkml to the loop

thanks,
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