Closed BrunoASMauricio closed 7 months ago
As part of the request in https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/144, implemented both CONFIG_FTRACE (function entry tracing) and CONFIG_FUNCTION_GRAPH_TRACER (function entry and exit tracing) for ARCv3.
CONFIG_FTRACE
CONFIG_FUNCTION_GRAPH_TRACER
To use this feature, we need to first enable it in menuconfig (activate the FTRACE and FUNCTION_GRAPH_TRACER options)
menuconfig
FTRACE
FUNCTION_GRAPH_TRACER
Then, we mount the debugfs filesystem:
mount -t tracefs nodev /sys/kernel/tracing
Select the tracer we want. For full tracing we have:
echo function_graph > /sys/kernel/tracing/current_tracer
And for entry only tracing we have:
echo function > /sys/kernel/tracing/current_tracer
Then to see the trace, read from the '/sys/kernel/tracing/trace' file
less /sys/kernel/tracing/trace
As part of the request in https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/144, implemented both
CONFIG_FTRACE
(function entry tracing) andCONFIG_FUNCTION_GRAPH_TRACER
(function entry and exit tracing) for ARCv3.To use this feature, we need to first enable it in
menuconfig
(activate theFTRACE
andFUNCTION_GRAPH_TRACER
options)Then, we mount the debugfs filesystem:
Select the tracer we want. For full tracing we have:
And for entry only tracing we have:
Then to see the trace, read from the '/sys/kernel/tracing/trace' file