I am trying to use FTRACE for tracing and getting function_graph on a loadable driver module.
But, somehow, I did not see any functions in that module being traced.
Here is what I did (I had the kernel configured to have FTRACE already in the menuconfig)
#echo function_graph > /sys/kernel/debug/tracing/current_tracer
#cat /sys/kernel/debug/tracing/current_tracer
function_graph
#echo 1 > tracing_on
#insmod my_module.ko
#echo 0 > tracing_on
#cat trace
Nothing in the trace file has any functions inside my_module.ko
Do I need to enable some compiler flags when compiling my_module.c? Any ideas what I need to do?
Thanks!