public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <srostedt@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>, rostedt@goodmis.org
Cc: "Figo.zhang" <zhangtianfei@leadcoretech.com>,
	Yong Zhang <yong.zhang0@gmail.com>,
	Li Zefan <lizf@cn.fujitsu.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Ftrace: can trace kthread?
Date: Thu, 21 Oct 2010 09:31:41 -0400	[thread overview]
Message-ID: <1287667901.2824.13.camel@fedora> (raw)
In-Reply-To: <1287655927.3488.100.camel@twins>

On Thu, 2010-10-21 at 12:12 +0200, Peter Zijlstra wrote:
> On Thu, 2010-10-21 at 16:59 +0800, Figo.zhang wrote:
> > > I just
> > > echo  0 > tracing_enabled

I need to remove that file. "tracing_enabled" is pretty much deprecated,
just use tracing_on to enable and disable the trace recording.

> > > 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.
> 
> > but i canot trace nothing. 
> 
> Your initial attempt had:
> 
>         echo kswapd > /sys/kernel/debug/tracing/set_graph_function

Yeah, that wont work. That's because kswapd() is called at system
startup and goes into a loop. The function graph tracer will never see
that function again (it's not called again). It can't know what function
it is in, only what functions it enters.

-- Steve

> 
> have you reset that state?



  reply	other threads:[~2010-10-21 13:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21  7:55 Ftrace: can trace kthread? Figo.zhang
2010-10-21  8:10 ` Yong Zhang
2010-10-21  8:21   ` Figo.zhang
2010-10-21  8:39     ` Yong Zhang
2010-10-21  8:44       ` Figo.zhang
2010-10-21  8:54         ` Yong Zhang
2010-10-21  8:59           ` Figo.zhang
2010-10-21  9:08             ` Yong Zhang
2010-10-21  9:52               ` Figo.zhang
2010-10-21 10:08                 ` KOSAKI Motohiro
2010-10-21 10:12             ` Peter Zijlstra
2010-10-21 13:31               ` Steven Rostedt [this message]
2010-10-21 13:33 ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287667901.2824.13.camel@fedora \
    --to=srostedt@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=yong.zhang0@gmail.com \
    --cc=zhangtianfei@leadcoretech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox