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

  1. Hey embedded guru, it looks like the User code you have above isn't appearing for me. Any chance you still have the photo?

    ReplyDelete

Post a Comment

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig