I have recently started working with ftrace. I able to get function graph trace using
trace-cmd record -p function_graph -F <bash command> trace-cmd report
With the above commands I can see time taken by function to finish before ‘ } ‘ But I want to script for listing functions taking more time than 10ms.
Can anyone help me to achieve this?
Advertisement
Answer
TLDR it can be achieved by
trace-cmd report -O fgraph:tailprint=yes
explanation
as per help
-O plugin option -O [plugin:]var[=val]
but when we try but plugin name function_graph what we use for record doesn’t work
as well if we dig in ftrace docs
we have option funcgraph-tail
but even this won’t work
finally when you dig in source code of trace-cmd
trace-cmd/lib/trace-cmd/trace-ftrace.c
has these options.