Re: Ftrace: can trace kthread?
From: Yong Zhang
Date: Thu Oct 21 2010 - 05:08:58 EST
On Thu, Oct 21, 2010 at 4:59 PM, Figo.zhang
<zhangtianfei@xxxxxxxxxxxxxxxx> wrote:
>
>> I just
>> echo Â0 > tracing_enabled
>> echo function > current_tracer
>> echo 374(pid of flush) > set_ftrace_pid
>> echo 1 > tracing_enabled
>> wait some time
>> echo 0 > tracing_enabled
>> cat trace
>>
>> So I think this answer your question "could kthread be traced?"
>
> i do it the same of you.
>
> [root@myhost tracing]# ps -ax | grep flush
> Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
> Â1205 ? Â Â Â ÂS Â Â Â0:01 [flush-8:0]
> 11852 pts/1 Â ÂS+ Â Â 0:00 grep flush
> [root@myhost tracing]#
>
> so my flusher pid is 1205, i do it as below:
>
> [root@myhost tracing]# echo 0 > tracing_enabled
> [root@myhost tracing]# echo function > current_tracer
> [root@myhost tracing]# echo 1205 > set_ftrace_pid
> [root@myhost tracing]# echo 1 > tracing_enabled
>
> wait ... and open some pdf files, let system eat huge memory...
>
> [root@myhost tracing]# echo 0 > tracing_enabled
> [root@myhost tracing]# cat trace
> # tracer: function
> #
> # Â Â Â Â Â TASK-PID Â ÂCPU# Â ÂTIMESTAMP ÂFUNCTION
> # Â Â Â Â Â Â Â| | Â Â Â | Â Â Â Â Â| Â Â Â Â |
>
>
> but i canot trace nothing.
Is tracing_on enable(1) on your system?
I enable it on my system by default, so I didn't show it in the previous mail.
Thanks,
Yong
--
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/