From: Cody P Schafer <devel-lists@codyps.com>
To: David Ahern <dsahern@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: BUG: perf kvm top --callgraph not showing callgraph
Date: Fri, 14 Jun 2013 14:53:04 -0700 [thread overview]
Message-ID: <CAPoQQ-3Jq2tu1ccsmcL14H=+QF1B+k5cb-SOqihwvZbWcA960A@mail.gmail.com> (raw)
In-Reply-To: <51BA6D96.5050004@gmail.com>
On Thu, Jun 13, 2013 at 6:10 PM, David Ahern <dsahern@gmail.com> wrote:
> On 6/13/13 7:04 PM, Cody P Schafer wrote:
>>
>> Hi all, I'm trying to use perf kvm to profile linux early boot.
>>
>> However, perf kvm top always appears to behave as though it's in
>> non-callgraph mode.
>
>
> During event collection perf kernel side does not walk the guest callchain.
> I believe it only collects IP.
>
Some further investigation shows that the user unwind code could be
used, but [the following] is always false.
if (!((evsel->attr.sample_type & PERF_SAMPLE_REGS_USER) &&
(evsel->attr.sample_type & PERF_SAMPLE_STACK_USER)))
return 0;
There don't appear to be any users which _set_ PERF_SAMPLE_REGS_USER
or PERF_SAMPLE_STACK_USER, only ones that check it. Can we just use
__perf_evsel__set_sample_bit() twice and have this magically work?
So, a few questions:
- can we get perf to dump the user regs & stack for kvm guest kernels?
- does the in kernel stack unwinding _only_ trigger for host (ie:
real) kernel mode samples? If so, does this restriction always make
sense?
- How did all this user unwind code get triggered if no one is
setting PERF_SAMPLE_REGS_USER and PERF_SAMPLE_STACK_USER? Was it ever
triggered?
next prev parent reply other threads:[~2013-06-14 21:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 1:04 BUG: perf kvm top --callgraph not showing callgraph Cody P Schafer
2013-06-14 1:10 ` David Ahern
2013-06-14 21:53 ` Cody P Schafer [this message]
2013-06-14 22:01 ` David Ahern
2013-06-14 23:11 ` Cody P Schafer
2013-06-14 23:23 ` David Ahern
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='CAPoQQ-3Jq2tu1ccsmcL14H=+QF1B+k5cb-SOqihwvZbWcA960A@mail.gmail.com' \
--to=devel-lists@codyps.com \
--cc=dsahern@gmail.com \
--cc=linux-perf-users@vger.kernel.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).