Linux perf tool run issues -


i using perf tool bench mark 1 of projects. issue facing wo automatihen run perf tool on machine, works fine. however, trying run perf in automation servers make part of check in process getting following error automation servers

warning: kernel address maps (/proc/{kallsyms,modules}) restricted, check /proc/sys/kernel/kptr_restrict.

samples in kernel functions may not resolved if suitable vmlinux file not found in buildid cache or in vmlinux path.

samples in kernel modules won't resolved @ all. if relocation applied (e.g. kexec) symbols may misresolved suitable vmlinux or kallsyms file.

error:

permission error - root?

consider tweaking /proc/sys/kernel/perf_event_paranoid:

-1 - not paranoid @ all

0 - disallow raw tracepoint access unpriv

1 - disallow cpu events unpriv

2 - disallow kernel profiling unpriv

fp: terminated

i tried changing /proc/sys/kernel/perf_event_paranoid -1 , 0 still see same issue. seen before? why need run command root? able run on machine without sudo. btw, command this

perf record -m 32 -f 99 -p xxxx -a -g --call-graph fp

you can't use -a (full system profiling) , sample kernel non-root user: http://man7.org/linux/man-pages/man1/perf-record.1.html

try running without -a option , event limited userspace events :u suffix:

perf record -m 32 -f 99 -p $pid -g --call-graph fp -e cycles:u 

or use software event virtualized platforms without pmu passthrough

perf record -m 32 -f 99 -p $pid -g --call-graph fp -e cpu-clock:u 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -