In order to do off-cpu profiles we need to give all the java versions cap_perfmon:
CAP_PERFMON (since Linux 5.8)
Employ various performance-monitoring mechanisms,
including:
• call [perf_event_open(2)](https://man7.org/linux/man-pages/man2/perf_event_open.2.html);
• employ various BPF operations that have performance
implications.
This capability was added in Linux 5.8 to separate out
performance monitoring functionality from the overloaded
CAP_SYS_ADMIN capability. See also the kernel source file
Documentation/admin-guide/perf-security.rst.
This should run on all java executables when setup_instance.sh is run:
In order to do off-cpu profiles we need to give all the java versions cap_perfmon:
This should run on all java executables when setup_instance.sh is run:
More here: https://github.com/async-profiler/async-profiler/issues/907