1

I'm trying to use ftrace for function profiling based on function_profile_enabled as described here. I would like to capture function calls only for a certain PID using set_ftrace_pid as described in the same link. However, when I set PID and do function_profile_enabled it still captures function calls on all CPUs. So, considering context-switching it is really hard to filter out unwanted CPUs from /sys/kernel/debug/tracing/trace_stat/function*. The function_graph feature works with set_ftrace_pid just fine. Brandan Gregg had the same problem as found here, but I'm using 4.4 kernel, which is generations after.

Dimon
  • 131
  • 3

0 Answers0