koute / not-perf

A sampling CPU profiler for Linux
Apache License 2.0
871 stars 41 forks source link

Hard-to-diagnose panic if `/proc/kallsyms` file is absent #38

Open jerome-trc opened 11 months ago

jerome-trc commented 11 months ago

Example message from command nperf record -P <command name> -w:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/execution_queue.rs:28:60
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted

Compare against perf's handling of this case:

Couldn't record kernel reference relocation symbol
Symbol resolution may be skewed if relocation was used (e.g. kexec).
Check /proc/kallsyms permission or run as root.