Re: When and how to use ftrace?

From: wu zhangjin
Date: Wed Jun 09 2010 - 04:59:19 EST


On Wed, Jun 9, 2010 at 4:14 PM, Ryan Wang <> wrote:
>>> --
>>> To unsubscribe from this list: send an email with
>>> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
>>> Please read the FAQ at
> Seems ftrace is helpful to study the activities inside the kernel to me.
> I wonder whether it can be useful to debug kernel bugs. And if so, will
> you please give me some examples?

Yeah, did you read this paper written by Steven: "Finding Origins of
Latencies Using Ftrace" (please google to download it).
If not, please read it. that paper will tell you what Ftrace really is
and will show the demos how to play with it.

> Or so far it's mainly used for
> observing the running status of kernel?

Ftrace is originally created for debugging and optimizing the
preempt-rt, but of course, it becomes a tracing framework currently.

It not only show you what the kernel space does when you do something
in user space,
but will show you the calling tree of kernel functions, time consuming
of every function and
even allow you to filter the parts you care about.

If you need more info about it, please refer to:

[1] Debugging the kernel using Ftrace
[2] Ftrace usage ....
[3] Tools for Ftrace
trace-cmd from readhat...


Studying engineer. Wu Zhangjin
Lanzhou University
Distributed & Embedded System Lab
School of Information Science and Engeneering
Address:Tianshui South Road 222,Lanzhou,P.R.China Zip Code:730000
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at