From: Jiri Olsa <jolsa@redhat.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
David Ahern <dsahern@gmail.com>,
Namhyung Kim <namhyung@kernel.org>
Subject: Re: Fw: Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug info
Date: Mon, 2 Jun 2014 16:12:20 +0200 [thread overview]
Message-ID: <20140602141219.GB7861@krava.brq.redhat.com> (raw)
In-Reply-To: <20140530155925.GF7427@krava.brq.redhat.com>
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@redhat.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
next parent reply other threads:[~2014-06-02 14:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140530155925.GF7427@krava.brq.redhat.com>
2014-06-02 14:12 ` Jiri Olsa [this message]
2014-06-03 7:47 ` Sukadev Bhattiprolu
2014-06-04 12:08 ` Jiri Olsa
2014-06-04 15:39 ` Sukadev Bhattiprolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140602141219.GB7861@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=sukadev@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®