Re: Ftrace: can trace kthread?

From: Yong Zhang
Date: Thu Oct 21 2010 - 04:10:43 EST


On Thu, Oct 21, 2010 at 3:55 PM, Figo.zhang
<zhangtianfei@xxxxxxxxxxxxxxxx> wrote:
> hi,
>
> is it ftrace in 2.6.36-rc8 can trace the kthread?

How about the set_ftrace_pid interface?

Thanks,
Yong

> i want to trace the
> kswapd/bdi_writeback_thread, but not success. i am sure that kswapd is
> running, because i let the system eat huge memory. i can trace some
> function such as __do_fault. what is issue on it?
>
> Best,
> Figo.zhang
>
>
> here is my ftrace script.
> i = 1
> while true;
> do
> Â Â Â Âecho 1 > /proc/sys/kernel/ftrace_enabled
> Â Â Â Âecho function_graph > /sys/kernel/debug/tracing/current_tracer
> Â Â Â Âecho kswapd > /sys/kernel/debug/tracing/set_graph_function
> Â Â Â Âecho 1 > /sys/kernel/debug/tracing/tracing_on
> Â Â Â Âecho 1 > /sys/kernel/debug/tracing/tracing_enabled
> Â Â Â Âsleep 1
> Â Â Â Âecho 0 > /sys/kernel/debug/tracing/tracing_enabled
> Â Â Â Âcat /sys/kernel/debug/tracing/trace > ftrace.kswap.log.$i
>
> Â Â Â Âlet i=i+1;
>
> done
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at Âhttp://vger.kernel.org/majordomo-info.html
> Please read the FAQ at Âhttp://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/