flamegraph-rs / flamegraph

Easy flamegraphs for Rust projects and everything else, without Perl or pipes <3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running with `--root` cannot read kallsyms

bobrik opened this issue · comments

Currently:

We executed perf record with sudo, and will be executing perf script without sudo.

Running as a regular user means that one cannot read /proc/kallsyms to resolve kernel symbols, resulting in this:

image

When running perf script:

rs-1brc  5713  7909.014673:    1003009 cpu-clock:pppH:
        ffffffe0d6f5a7e0 [unknown] ([kernel.kallsyms])
        ffffffe0d6f5b290 [unknown] ([kernel.kallsyms])
        ffffffe0d6611558 [unknown] ([kernel.kallsyms])
                    6f4c core::intrinsics::copy_nonoverlapping+0x4a4 (inlined)

When running sudo perf script -f:

rs-1brc  5713  7909.014673:    1003009 cpu-clock:pppH:
        ffffffe0d6f5a7e0 el0_da+0x28 ([kernel.kallsyms])
        ffffffe0d6f5b290 el0t_64_sync_handler+0xc0 ([kernel.kallsyms])
        ffffffe0d6611558 el0t_64_sync+0x198 ([kernel.kallsyms])
                    6f4c core::intrinsics::copy_nonoverlapping+0x4a4 (inlined)

The latter is definitely preferred from a users point of view.

Fair point -- want to submit a PR to fix this?