* perf: problem of 32bit mmap call graph recording
@ 2011-08-17 8:20 Lin Ming
2011-08-17 13:19 ` Frederic Weisbecker
0 siblings, 1 reply; 2+ messages in thread
From: Lin Ming @ 2011-08-17 8:20 UTC (permalink / raw)
To: Frederic Weisbecker
Cc: lkml, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Andi Kleen, Huang, Ying, He, Fan F
Hi all,
On 32 bit machine, we have problem to get the usersapce call graph of
mmap syscall.
You can reproduce it with below command on 32bit machine.
sudo perf record -f -g -e raw_syscalls:sys_enter --filter "id==192" ls
sudo perf report |less
# Events: 26
#
# Overhead Command Shared Object Symbol
# ........ ....... ................. ......
#
100.00% ls [kernel.kallsyms] [k] syscall_trace_enter
|
--- syscall_trace_enter
syscall_trace_entry
|
|--88.46%-- __mmap <--- only __mmap, no more userspace call stacks
|
--11.54%-- 0xffffe424
Kernel relies on userspace bp register to get call graph information.
But for mmap syscall, the bp register is used to pass in the sixth
parameter(offset).
void *mmap(void *addr, size_t length, int prot, int flags,
int fd, off_t offset);
Anyway to fix this issue on 32bit machine?
Thanks,
Lin Ming
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: perf: problem of 32bit mmap call graph recording
2011-08-17 8:20 perf: problem of 32bit mmap call graph recording Lin Ming
@ 2011-08-17 13:19 ` Frederic Weisbecker
0 siblings, 0 replies; 2+ messages in thread
From: Frederic Weisbecker @ 2011-08-17 13:19 UTC (permalink / raw)
To: Lin Ming
Cc: lkml, Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Andi Kleen, Huang, Ying, He, Fan F
On Wed, Aug 17, 2011 at 04:20:03PM +0800, Lin Ming wrote:
> Hi all,
>
> On 32 bit machine, we have problem to get the usersapce call graph of
> mmap syscall.
>
> You can reproduce it with below command on 32bit machine.
>
> sudo perf record -f -g -e raw_syscalls:sys_enter --filter "id==192" ls
>
> sudo perf report |less
>
> # Events: 26
> #
> # Overhead Command Shared Object Symbol
> # ........ ....... ................. ......
> #
> 100.00% ls [kernel.kallsyms] [k] syscall_trace_enter
> |
> --- syscall_trace_enter
> syscall_trace_entry
> |
> |--88.46%-- __mmap <--- only __mmap, no more userspace call stacks
> |
> --11.54%-- 0xffffe424
>
>
> Kernel relies on userspace bp register to get call graph information.
> But for mmap syscall, the bp register is used to pass in the sixth
> parameter(offset).
>
> void *mmap(void *addr, size_t length, int prot, int flags,
> int fd, off_t offset);
>
> Anyway to fix this issue on 32bit machine?
Ah... Well we can't do much about that I fear :)
The only way would be to rely on dwarf informations to do the
unwind. The upside is that it would work about everywhere
even on places that don't have frame pointers, the downside
is some overhead on sample records (dump a bunch of stack every
sample) and a lot of work :)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-17 13:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17 8:20 perf: problem of 32bit mmap call graph recording Lin Ming
2011-08-17 13:19 ` Frederic Weisbecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox