Skip to content

Conversation

@BrunoASMauricio
Copy link

@BrunoASMauricio BrunoASMauricio commented Sep 19, 2023

As part of the request in #144, implemented both CONFIG_FTRACE (function entry tracing) and CONFIG_FUNCTION_GRAPH_TRACER (function entry and exit tracing) for ARCv3.

To use this feature, we need to first enable it in menuconfig (activate the FTRACE and FUNCTION_GRAPH_TRACER options)

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

Copy link
Member

@abrodkin abrodkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments in-line.

Copy link
Member

@abrodkin abrodkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my 2 tiny comments.

Implemented both CONFIG_FTRACE (function entry tracing) and
 CONFIG_FUNCTION_GRAPH_TRACER (function entry and exit tracing)
 for ARCv33

Signed-off-by: BrunoASMauricio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants