title: Is there a way to use perf tracepoints without running as root?
body: <h3>Summary:</h3>
  <p>I want to be able to profile the event <code>sched:sched_stat_sleep</code> without running as root.  Is this possible?</p>
  <h3>Details:</h3>
  <p>When I run the command: <code>sudo perf stat -e sched:sched_stat_sleep sleep 1</code> I get output that looks correct:</p>
  <pre><code>Performance counter stats for 'sleep 1':
  
     1,001,729,231      sched:sched_stat_sleep                                      
  
     1.002880455 seconds time elapsed
  </code></pre>
  <p>But when I run without <code>sudo</code> I get the error</p>
  <pre><code>invalid or unsupported event: 'sched:sched_stat_sleep'
  Run 'perf list' for a list of valid events
  
   usage: perf stat [&lt;options&gt;] [&lt;command&gt;]
  
      -e, --event &lt;event&gt;   event selector. use 'perf list' to list available events
  </code></pre>
  <p>And when I run <code>perf list</code> without <code>sudo</code> part of the output is:</p>
  <pre><code>[ Tracepoints not available: Permission denied ]
  </code></pre>
  <p>I found <a href="https://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar">anther question</a> which suggests setting <code>kernel.perf_event_paranoid</code> to <code>-1</code>.  I tried doing this but it doesn't appear to make a difference.  I did not reboot after making the change (is that necessary?).  Viewing the setting seems to indicate that it's set to -1 now.</p>
  <pre><code>cat /proc/sys/kernel/perf_event_paranoid 
  -1
  </code></pre>
  <p>I'm running Arch Linux with Linux kernel version <code>3.19.2-1-ARCH #1 SMP PREEMPT</code></p>