Debugging Linux Kernel using ftrace Part9 - Start tracing on a particular function
We know 'tracing_on' file is used to disable/enable writing the traces on the ring buffer.
echo '0' > tracing_on //to disable tracing
echo '1' > tracing_on // to enable tracing
ftrace also provides functionality to start tracing on a particular function call execution or stop tracing on a particular function execution.
Syntax:
echo '0' > tracing_on //to disable tracing
echo '1' > tracing_on // to enable tracing
ftrace also provides functionality to start tracing on a particular function call execution or stop tracing on a particular function execution.
Syntax:
function:command[:count]
The command will be executed on the start of the function. The value of command can be "traceon" to start the trace or "traceoff" to stop the trace, or it can be "stacktrace".
The count is optional, specifies the number of times the command should be executed. If there is no count specified, the command will be executed each time the function is called.
From the above screenshot, i told ftrace to stop tracing on ksys_read, which is called when user space calls read, and start tracing on ksys_write, which is called when user space calls write.
Comments
Post a Comment