From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756359Ab0JUJ4t (ORCPT ); Thu, 21 Oct 2010 05:56:49 -0400 Received: from [120.204.251.227] ([120.204.251.227]:52567 "EHLO LC-SHMAIL-01.SHANGHAI.LEADCORETECH.COM" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1756233Ab0JUJ4s (ORCPT ); Thu, 21 Oct 2010 05:56:48 -0400 Subject: Re: Ftrace: can trace kthread? From: "Figo.zhang" To: Yong Zhang Cc: Li Zefan , "linux-kernel@vger.kernel.org" , Steven Rostedt In-Reply-To: References: <1287647732.2237.7.camel@myhost> <1287649283.2237.8.camel@myhost> <1287650668.2237.12.camel@myhost> <1287651542.2237.17.camel@myhost> Content-Type: text/plain; charset="UTF-8" Date: Thu, 21 Oct 2010 17:52:45 +0800 Message-ID: <1287654765.2237.18.camel@myhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 21 Oct 2010 09:56:47.0052 (UTC) FILETIME=[462148C0:01CB7106] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > [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. > tracing_on is sure on, my kernel is 2.6.36-rc8, what is your kernel version?