linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM64 perf stacktraces on tracepoint events
Date: Thu, 2 Mar 2017 10:44:11 +0000	[thread overview]
Message-ID: <20170302104349.GA19632@leverpostej> (raw)
In-Reply-To: <CAEi0qNm3NKSWQOD6A2Z0NTNEfp1kLNEZz-=y+dbVCwYMP0HFoQ@mail.gmail.com>

[Adding James, Takahiro-san, and Will, for stacktracing and arm64 perf]

On Wed, Mar 01, 2017 at 04:42:17PM -0800, Joel Fernandes wrote:
> Hi,
> 
> On 3.18 kernel running on an arm64 device, I tried running:
> perf record -a -g -e sched:sched_wakeup
> 
> I was expecting something like the output at:
> www.brendangregg.com/perf.html
> 
> But I don't see stacktraces, could I be missing any patches you could
> point me to?

I can't spot much obvious, looking at arm64's stacktrace.c and perf_callchain.c
since v3.18. There's commit:

  9702970c7bd3e2d6 (Revert "ARM64: unwind: Fix PC calculation")

... though that was Cc'd stable.

I can't immediately see why that would truncate unwinding, though I'm also not
sure how perf and ftrace interact here, so I may be missing something obvious.

> I do see stack traces if I do regular perf profiling
> (perf record -F 99 -a -g).

> Below is the output I get. Thanks for any insight into this.
> 
> Regards,
> Joel
> 
> sailfish:/data # ./perf report
>        # Samples: 22  of event 'sched:sched_wakeup'
> # Event count (approx.): 410333
> #
> # Children      Self  Trace output
> # ........  ........
> .............................................................
> #
>     61.29%    61.29%  comm=ksoftirqd/0 pid=3 prio=120 success=1 target_cpu=000
>             |
>             ---0
> 
>     33.25%    33.25%  comm=hw pid=12777 prio=120 success=1 target_cpu=002
>             |
>             ---0
> 
>      2.46%     2.46%  comm=kworker/u8:2 pid=12482 prio=120 success=1
> target_cpu=002
>             |
>             ---0
> 
>      1.39%     1.39%  comm=migration/2 pid=21 prio=0 success=1 target_cpu=002
>             |
>             ---0


FWIW, on a recent HEAD (86292b33d4b79ee0), I see reasonable looking backtraces,
e.g.

    77.48%     0.00%  swapper      [kernel.kallsyms]  [k] do_idle
            |
            ---do_idle
               |          
               |--68.84%--call_cpuidle
               |          cpuidle_enter
               |          cpuidle_enter_state
               |          |          
               |           --61.05%--el1_irq
               |                     gic_handle_irq
               |                     __handle_domain_irq
               |                     irq_exit
               |                     __do_softirq
               |                     |          
               |                     |--22.29%--run_timer_softirq


Thanks,
Mark.

  reply	other threads:[~2017-03-02 10:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-02  0:42 ARM64 perf stacktraces on tracepoint events Joel Fernandes
2017-03-02 10:44 ` Mark Rutland [this message]
2017-03-02 23:21   ` Kim Phillips

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=20170302104349.GA19632@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).