3

I am learning to use perf profiling tool on my Ubuntu 18.04.3 LTS. I know by using perf timechart you can visualize your system behavior during a workload. I tried that with my parallel program:

perf timechart record mpirun -np 4 main

Then I got this error info:

event syntax error: 'sched:sched_wakeup'
                     \___ can't access trace events

Error:  No permissions to read /sys/kernel/debug/tracing/events/sched/sched_wakeup
Hint:   Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing'

Run 'perf list' for a list of valid events

 Usage: perf record [<options>] [<command>]
    or: perf record [<options>] -- <command> [<options>]

    -e, --event <event>   event selector. use 'perf list' to list available events

I tried what pref suggests sudo mount -o remount,mode=755 /sys/kernel/debug/tracing, and I still get the same error. Is there anyway I can fix this without using perf as a root? I already changed my /proc/sys/kernel/perf_event_paranoid to be -1 .

Shiqi
  • 133

1 Answers1

0

After running sudo mount -o remount,mode=755 /sys/kernel/debug/tracing tracefs should now be mounted with the correct permissions. However, you still need to ensure you have permissions to access the mount point itself (in otherwords, you need execute permission on all the parent directories to 'traverse' to this path).

In ubuntu, debugfs is mounted at /sys/kernel/debug with the default permissions allowing only root to traverse this directory.

Running:

sudo mount -o remount,mode=755 /sys/kernel/debug/

should resolve the issue.