inferno icon indicating copy to clipboard operation
inferno copied to clipboard

flamegraph does not contain sys_enter_* calls with params

Open SergejIsbrecht opened this issue 7 months ago • 3 comments

Version

Inferno 0.11.18

Issue

When using Inferno to process sampled perf script output, some stacktraces a missing in a generated flamegraph.svg

perf record -F499 -e 'syscalls:sys_enter_*' --call-graph dwarf -- command
perf script > out

The generated flamegraph only contains sys calls without any parameters. For example:

File: out

XXXXXX XXXXX [005] 44427.957866: syscalls:sys_enter_sched_yield: 
	      xxxxxxxxxx __sched_yield (/gpl/lib/libc)
	      ...
          xxxxxxxxxx [unknown] (/gpl/lib/libpthread)
	      xxxxxxxxxx [unknown] (/gpl/lib/libc)
XXXX XXXX [005] 44422.848908: syscalls:sys_enter_getuid: 
	      XXXXXXXXXX getuid (/gpl/lib/libc)
...
	      XXXXXXXXXX __libc_start_main (/gpl/lib/libc)
	      XXXXXXXXXX _start (/opt/hmi/native_image/command)

This calls are visible in the flamegraph. On the contrary following entries are missing in the flamegraph.

XXXXXXXXX XXXXX [001] 44422.868561: syscalls:sys_enter_munmap: addr: 0xXXXXX, len: 0xXXXXX
	      XXXXXXX __munmap (/gpl/lib/libc)
          ....
	      XXXXXXX [unknown] (/gpl/lib/libpthread)
	      XXXXXXX [unknown] (/gpl/lib/libc)

Output: inferno-collapse-perf

perf script

XXXXXXXXXXXX XXXXX [003] 44422.850672: syscalls:sys_enter_sched_getaffinity: pid: 0xXXXXXXXXXX, len: 0xXXXXXXXXXX, user_mask_ptr: 0xXXXXXXXXXX
	      XXXXXXXXXX pthread_getaffinity_np (/gpl/lib/libpthread)
	      XXXXXXXXXX pthread_getattr_np (/gpl/lib/libpthread)
          ....
	      XXXXXXXXXX [unknown] (/gpl/lib/libpthread)
	      XXXXXXXXXX [unknown] (/gpl/lib/libc)

inferno-collapse-perf

[WARN  inferno::collapse::perf::logging] Weird stack line: pid: 0xXXXXXXXXXX, len: 0xXXXXXXXXXX, user_mask_ptr: 0xXXXXXXXXXX
[WARN  inferno::collapse::perf::logging] Weird event line: 	      XXXXXXXXXX pthread_getaffinity_np (/gpl/lib/libpthread)
[WARN  inferno::collapse::perf::logging] Weird event line: 	      XXXXXXXXXX pthread_getattr_np (/gpl/lib/libpthread)
...
[WARN  inferno::collapse::perf::logging] Weird event line: 	      XXXXXXXXXX [unknown] (/gpl/lib/libpthread)
[WARN  inferno::collapse::perf::logging] Weird event line: 	      XXXXXXXXXX [unknown] (/gpl/lib/libc)

Perf

perf version 4.4

FlameGraph

Seems like FlameGraph by Brendan Gregg is able to pars perf script properly

  • ./stackcollapse-perf.pl
  • ./flamegraph.pl.

SergejIsbrecht avatar Nov 13 '23 18:11 SergejIsbrecht