linux - Is there a way to use perf tracepoints without running as root? -


summary:

i want able profile event sched:sched_stat_sleep without running root. possible?

details:

when run command: sudo perf stat -e sched:sched_stat_sleep sleep 1 output looks correct:

performance counter stats 'sleep 1':     1,001,729,231      sched:sched_stat_sleep                                           1.002880455 seconds time elapsed 

but when run without sudo error

invalid or unsupported event: 'sched:sched_stat_sleep' run 'perf list' list of valid events   usage: perf stat [<options>] [<command>]      -e, --event <event>   event selector. use 'perf list' list available events 

and when run perf list without sudo part of output is:

[ tracepoints not available: permission denied ] 

i found anther question suggests setting kernel.perf_event_paranoid -1. tried doing doesn't appear make difference. did not reboot after making change (is necessary?). viewing setting seems indicate it's set -1 now.

cat /proc/sys/kernel/perf_event_paranoid  -1 

i'm running arch linux linux kernel version 3.19.2-1-arch #1 smp preempt


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -