Li Zefan 7ead8b8313 tracing/events: Add module tracepoints
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.

Here's the sample output:

     TASK-PID    CPU#    TIMESTAMP  FUNCTION
        | |       |          |         |
    <...>-42    [000]     1.758380: module_request: fb0 wait=1 call_site=fb_open
    ...
    <...>-60    [000]     3.269403: module_load: scsi_wait_scan
    <...>-60    [000]     3.269432: module_put: scsi_wait_scan call_site=sys_init_module refcnt=0
    <...>-61    [001]     3.273168: module_free: scsi_wait_scan
    ...
    <...>-1021  [000]    13.836081: module_load: sunrpc
    <...>-1021  [000]    13.840589: module_put: sunrpc call_site=sys_init_module refcnt=-1
    <...>-1027  [000]    13.848098: module_get: sunrpc call_site=try_module_get refcnt=0
    <...>-1027  [000]    13.848308: module_get: sunrpc call_site=get_filesystem refcnt=1
    <...>-1027  [000]    13.848692: module_put: sunrpc call_site=put_filesystem refcnt=0
    ...
 modprobe-2587  [001]  1088.437213: module_load: trace_events_sample F
 modprobe-2587  [001]  1088.437786: module_put: trace_events_sample call_site=sys_init_module refcnt=0

Note:

- the taints flag can be 'F', 'C' and/or 'P' if mod->taints != 0

- the module refcnt is percpu, so it can be negative in a
  specific cpu

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
LKML-Reference: <4A891B3C.5030608@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-08-17 11:25:08 +02:00
..
2009-06-17 19:41:52 +02:00
2009-06-18 08:46:47 +10:00
2009-06-30 18:56:00 -07:00
2009-07-12 12:22:34 -07:00
2009-06-17 00:36:36 -04:00
2009-06-30 18:55:58 -07:00
2009-06-01 06:21:13 +00:00
2009-05-02 15:36:10 -07:00
2009-04-23 10:06:35 +01:00
2009-06-11 21:36:09 -04:00
2009-07-29 19:10:35 -07:00
2009-06-22 10:12:35 +01:00
2009-07-12 12:22:34 -07:00
2009-05-29 08:40:01 -07:00
2009-06-11 08:50:57 -07:00
2009-06-11 21:36:06 -04:00
2009-07-12 13:02:10 -07:00
2009-06-22 10:12:30 +01:00
2009-06-22 10:12:35 +01:00
2009-05-18 14:46:26 +01:00
2009-06-17 09:33:49 -07:00
2009-07-08 09:18:05 -07:00
2009-06-24 08:17:04 -04:00
2009-06-30 18:56:00 -07:00
2009-06-15 21:30:25 -07:00
2009-08-07 14:38:29 -03:00
2009-06-18 18:40:18 -04:00
2009-06-30 20:12:24 +02:00
2009-06-18 13:04:05 -07:00
2009-07-12 12:22:34 -07:00
2009-06-03 14:05:10 -04:00
2009-05-19 16:02:02 -07:00
2009-06-29 08:59:10 +10:00
2009-06-02 00:45:24 -07:00
2009-06-18 13:03:57 -07:00
2009-05-18 14:46:26 +01:00
2009-07-31 08:55:48 +02:00
2009-06-18 13:03:56 -07:00
2009-04-21 13:41:48 -07:00
2009-04-21 13:41:48 -07:00
2009-06-22 10:12:35 +01:00
2009-06-15 15:49:23 +02:00
2009-06-10 11:48:39 +03:00
2009-06-23 20:21:39 +01:00
2009-07-30 16:03:45 +09:30
2009-07-28 21:07:09 -04:00
2009-06-16 19:47:57 -07:00
2009-04-28 07:37:28 +02:00
2009-04-14 09:00:19 +10:00
2009-06-16 19:47:48 -07:00
2009-06-16 08:40:20 +02:00
2009-04-29 17:32:35 -07:00
2009-06-11 19:05:32 +02:00
2009-05-25 00:55:45 -07:00
2009-06-16 19:50:13 -07:00
2009-06-25 11:22:13 -07:00
2009-07-08 09:31:56 -07:00
2009-06-11 21:36:02 -04:00
2009-06-11 21:36:01 -04:00
2009-06-17 18:02:11 -07:00
2009-06-17 18:02:11 -07:00
2009-06-17 12:24:34 -07:00
2009-06-17 12:24:34 -07:00
2009-06-17 18:02:11 -07:00
2009-06-15 21:44:43 -07:00
2009-06-29 12:14:51 -07:00
2009-06-30 18:55:59 -07:00
2009-04-24 08:54:21 +02:00
2009-06-18 13:04:04 -07:00
2009-07-29 19:10:36 -07:00
2009-06-11 21:36:12 -04:00
2009-07-12 12:22:34 -07:00
2009-06-24 08:17:06 -04:00
2009-07-07 18:36:12 -04:00
2009-05-09 10:49:41 -04:00
2009-04-08 14:33:38 -07:00
2009-06-11 08:50:58 -07:00
2009-06-24 08:17:06 -04:00
2009-04-13 15:04:29 -07:00
2009-06-15 15:50:49 +02:00
2009-04-21 19:40:00 -07:00
2009-06-16 19:47:48 -07:00
2009-04-27 02:45:02 -07:00
2009-05-12 11:11:48 +02:00
2009-06-23 12:50:05 -07:00
2009-07-06 13:57:03 -07:00
2009-06-11 08:50:59 -07:00
2009-07-12 15:16:39 -07:00