public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/events: Add module tracepoints
Date: Wed, 22 Jul 2009 15:48:56 +0800	[thread overview]
Message-ID: <4A66C468.5070100@cn.fujitsu.com> (raw)
In-Reply-To: <200907221352.17850.rusty@rustcorp.com.au>

Rusty Russell wrote:
> On Tue, 21 Jul 2009 06:26:33 pm Li Zefan wrote:
>> Add trace points to trace module_load, module_free, module_get,
>> module_put and module_request, and use trace_event facility
>> to get the trace output.
> 
> Hi Li Zefan,
> 
>    I don't know anything about tracing, but the module code changes look
> simple and fine to me.
> 

I guess I can take this as an ack. :)

Tracing is used to have a deep insight into the system, analyse
performance issue, help debugging, dump info at system panic,
etc..

And those module trace events also can be used with other trace
events and tracers, an example below:

# mount -t debugfs xxx /mnt
# cd /mnt/tracing
# echo module > set_event
# echo scsi_device_get > set_graph_function
# echo scsi_device_put >> set_graph_function
# mount /dev/sda1 /media
# cat trace
# tracer: function_graph                         
#                                                
# CPU  DURATION                  FUNCTION CALLS  
# |     |   |                     |   |   |   |
 0)               |  scsi_device_get() {
 0)   1.215 us    |    get_device();
 0)               |    ftrace_raw_event_module_get() {
 0)   0.870 us    |      strlen();
 0)               |      /* module_get: sata_sis call_site=scsi_device_get refcnt=9 */
 0)   1.003 us    |      strcpy();
 0)   5.821 us    |    }
 0) + 17.304 us   |  }
 1)               |  scsi_device_put() {
 1)   1.807 us    |    module_refcount();
 1)               |    module_put() {
 1)               |      ftrace_raw_event_module_put() {
 1)   0.748 us    |        strlen();
 1)               |        /* module_put: sata_sis call_site=return_to_handler refcnt=-6 */
 1)   0.856 us    |        strcpy();
 1)   4.799 us    |      }
 1)   6.799 us    |    }
 1)   0.771 us    |    put_device();
 1) + 17.464 us   |  }
 ------------------------------------------
 1)   mount-2452   =>  mount.n-2453
 ------------------------------------------



  reply	other threads:[~2009-07-22  7:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21  8:56 [PATCH] tracing/events: Add module tracepoints Li Zefan
2009-07-21 13:32 ` Steven Rostedt
2009-07-22  4:22 ` Rusty Russell
2009-07-22  7:48   ` Li Zefan [this message]
2009-07-22 15:16     ` Steven Rostedt
2009-07-25 15:37 ` Frederic Weisbecker
2009-07-27  1:41   ` Li Zefan
2009-07-28  1:22     ` Frederic Weisbecker

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=4A66C468.5070100@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    /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