Bug#793409: linux-tools-4.0: "perf_4.0 script" cannot display userspace call stacks
Package: linux-tools-4.0
Version: 4.0.2-1
Severity: normal
Dear maintainer,
It seems "perf_4.0 script" cannot display userspace call stacks.
Here's a simple program:
~~~c
#include <stdlib.h>
#include <string.h>
int main()
{
size_t size = 20*1024*1024;
void* buffer = malloc(size);
for (int i=0; i != 10; ++i) {
memset(buffer, 0, size);
}
return 0;
}
~~~
Compiled with:
~~~sh
gcc -g --std=c99 foo.c
~~~
I can correctly get call stack samples using perf_3.16 (it's working
OK event on a 4.0 kernel):
~~~sh
perf_3.16 record --call-graph dwarf ./a.out
perf_3.16 script
~~~
I correctly get the call stacks such as:
~~~
a.out 3256 1378.470878: cycles:
ffffffff812ddf97 clear_page_c ([kernel.kallsyms])
7f35f647a720 memset (/lib/x86_64-linux-gnu/libc-2.19.so)
400584 main (/home/gabriel/temp/a.out)
~~~
Now using perf_4.0:
~~~sh
perf_4.0 record --call-graph dwarf ./a.out
perf_4.0 script
~~~
I get empty call stacks instead:
~~~
a.out 3314 1445.288362: 815975 cycles:
~~~
It seems to correctly manage to get kernelspace stacks however:
~~~
a.out 3314 1445.289513: 754329 cycles:
ffffffff8156b020 page_fault ([kernel.kallsyms])
~~~
The issue seems to be located in "perf_4.0 script" and not in "perf
4.0 record" as "perf_4.0 report" works correctly.
--
Gabriel
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable'), (90, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.0.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages linux-tools-4.0 depends on:
ii libaudit1 1:2.4.2-1
ii libc6 2.19-19
ii libc6-i386 2.19-19
ii libc6-x32 2.19-19
ii libdw1 0.159-4.2
ii libelf1 0.159-4.2
ii libnuma1 2.0.10-1
ii libperl5.20 5.20.2-6
ii libpython2.7 2.7.10-3
ii libslang2 2.3.0-2+b1
ii libunwind8 1.1-3.2
ii perl 5.20.2-6
ii zlib1g 1:1.2.8.dfsg-2+b1
Versions of packages linux-tools-4.0 recommends:
ii linux-base 3.5
Versions of packages linux-tools-4.0 suggests:
ii linux-doc-4.0 4.0.8-1
-- no debconf information
Reply to: