Does the Function Tracer (https://www.kernel.org/doc/Documentation/trace/ftrace.txt) work in RISC-V Linux?
Yes, the function tracer does work. You may need to enable it in your kernel .config file (CONFIG_FUNCTION_TRACER=y) and rebuild the kernel. Once that’s done and you’ve booted into userspace, mount debugfs by running something like this as root:
mkdir -p /debug; mount -t debugfs none /debug
Change into the debug tracing directory:
cd /debug/tracing
The README virtual file in that “directory” describes how to use the debugfs tracing interface.
Thanks for your answer. My issue is I can’t find “available_filter_functions” and “set_graph_function” to filter the trace based on function name.
Most likely the kernel that you’re using was built with CONFIG_FUNCTION_TRACER disabled.