Debugging Linux Kernel using ftrace Part 20 - Write into trace file from user space

Writing to 'trace_marker' file from userspace will write into the ftrace ring buffer.


'trace_marker' and 'tracing_on'  help us find out what is happening inside the kernel at a particular line of the user space application.

User Code:

Output:





Observation:

You can see in the code, I want to observe what internally 'sleep' command does. But not sure in the trace file output, where the kernel functions related to sleep starts and ends. Writing to trace using the 'trace_marker' helps us to coordinate between user code and kernel code.

Comments

Popular posts from this blog

bb.utils.contains yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig

PR, PN and PV Variable in Yocto