Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARCv3: Implemented ftrace #146

Closed
wants to merge 1 commit into from

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.

arch/arc/Kconfig Outdated Show resolved Hide resolved
arch/arc/kernel/Makefile Outdated Show resolved Hide resolved
arch/arc/kernel/ftrace.c Outdated Show resolved Hide resolved
arch/arc/kernel/mcount.S Outdated Show resolved Hide resolved
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.

arch/arc/Kconfig Outdated Show resolved Hide resolved
arch/arc/kernel/Makefile Show resolved Hide resolved
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.

3 participants