Debugging Linux Kernel using ftrace Part10 - Who calls this kernel function
With ftrace, you can find out who is calling a particular kernel function. "function" tracer contains an option which creates backtrace for each function called by tracer. If you enable this option without any filter, chances are that your system will get into live lock.
Note: You can use this feature only when the tracer is "function".
Let's track who all calls "vfs_read".
Note: You can use this feature only when the tracer is "function".
Let's track who all calls "vfs_read".
From the above steps, I did the following:
- Set the tracer to "function"
- Added "vfs_read" as a filter
- Enabled the function back trace option in "options" directory
You can see the flow: system call -> ksys_read -> vfs_read.
Comments
Post a Comment