public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Theodore Tso <tytso@mit.edu>,
	Arjan van de Ven <arjan@infradead.org>,
	Christoph Hellwig <hch@lst.de>,
	Mathieu Desnoyers <compudj@krystal.dyndns.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Zhaolei <zhaolei@cn.fujitsu.com>, Li Zefan <lizf@cn.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	"Frank Ch. Eigler" <fche@elastic.org>,
	Tom Zanussi <tzanussi@gmail.com>,
	Jiaying Zhang <jiayingz@google.com>,
	Michael Rubin <mrubin@google.com>,
	Martin Bligh <mbligh@google.com>
Subject: [PATCH 0/8] [GIT PULL] TRACE_EVENT for modules
Date: Tue, 14 Apr 2009 13:23:37 -0400	[thread overview]
Message-ID: <20090414172337.280621613@goodmis.org> (raw)


Ingo,

This is the long awaited TRACE_EVENT for modules patch series.

Not only does it allow for modules to use the TRACE_EVENT infrastructure,
but it also cleans up the way TRACE_EVENTS are used in core kernel code.

Some of the clean ups are:

Removal of the two headers per trace system. No need to have
include/trace/sched.h and include/linux/sched_event_types.h
All the changes go into include/trace/sched.h. But note that how that
file is made is important. One could look at the sched.h file, or
skb.h, lockdep.h and kmem.h as an example.

Another clean up is that I got rid of the need to add these files
into include/trace/trace_events.h and include/trace/trace_event_types.h.
Those files have been deleted.

Another clean up is that we do not need to do the DEFINE_TRACE(name)
for every TRACE_EVENT (or TRACE_FORMAT and DECLARE_TRACE) in the
include/trace/ header. One only needs to define a CREATE_TRACE_POINTS
in one C file to do the work for them:

#define CREATE_TRACE_POINTS
#inlude <trace/sched.h>

That will do the DEFINE_TRACE for every defined trace item in sched.h.

I also removed the trace_events_stage_X.h files and combined them
into a include/trace/ftrace.h file.

I made sure that each stage did not break the code. Well, I tested
kmem at each level. kmem seems to be the most complex of the trace events.

At the end I made a module and tested it out as well. I even removed
the module as the trace was running. Note, if you remove the file
and view the trace, you will get something like:

           <...>-4197  [002]   205.524992: Unknown type 47
           <...>-4197  [002]   206.523325: Unknown type 47
           <...>-4197  [002]   207.521665: Unknown type 47
           <...>-4197  [002]   208.520118: Unknown type 47

The unknown type will appear. This is because the format to print the
string is in the module itself. When the code is removed, ftrace has
no way of knowing how to print that string out. But if you had a user
space tool that read the format file first, it could still parse the binary
data just fine.

Please pull the latest tip/tracing/core tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/core


Steven Rostedt (8):
      tracing: consolidate trace and trace_event headers
      tracing: create automated trace defines
      tracing: make trace_seq operations available for core kernel
      tracing/events: move declarations from trace directory to core include
      tracing/events: move the ftrace event tracing code to core
      tracing/events: convert event call sites to use a link list
      tracing/events: add export symbols for trace events in modules
      tracing/events: add support for modules to TRACE_EVENT

----
 include/linux/ftrace_event.h        |  150 +++++++++++
 include/linux/module.h              |    4 +
 include/linux/trace_seq.h           |   91 +++++++
 include/linux/tracepoint.h          |    9 +-
 include/trace/define_trace.h        |   79 ++++++
 include/trace/ftrace.h              |  493 +++++++++++++++++++++++++++++++++++
 include/trace/irq.h                 |   56 ++++-
 include/trace/irq_event_types.h     |   55 ----
 include/trace/kmem.h                |  189 +++++++++++++-
 include/trace/lockdep.h             |   55 ++++-
 include/trace/lockdep_event_types.h |   57 ----
 include/trace/sched.h               |  336 +++++++++++++++++++++++-
 include/trace/sched_event_types.h   |  337 ------------------------
 include/trace/skb.h                 |   39 +++-
 include/trace/skb_event_types.h     |   38 ---
 include/trace/trace_event_types.h   |    7 -
 include/trace/trace_events.h        |    7 -
 kernel/exit.c                       |    4 -
 kernel/fork.c                       |    2 -
 kernel/irq/handle.c                 |    7 +-
 kernel/kthread.c                    |    3 -
 kernel/lockdep.c                    |   12 +-
 kernel/module.c                     |    7 +
 kernel/sched.c                      |   10 +-
 kernel/signal.c                     |    2 -
 kernel/softirq.c                    |    3 -
 kernel/trace/Makefile               |    1 -
 kernel/trace/events.c               |   14 -
 kernel/trace/trace.c                |    3 +
 kernel/trace/trace.h                |  148 +----------
 kernel/trace/trace_event_profile.c  |    4 +-
 kernel/trace/trace_events.c         |  170 +++++++++----
 kernel/trace/trace_events_filter.c  |   10 +-
 kernel/trace/trace_events_stage_1.h |   39 ---
 kernel/trace/trace_events_stage_2.h |  170 ------------
 kernel/trace/trace_events_stage_3.h |  279 --------------------
 kernel/trace/trace_output.c         |    3 +
 kernel/trace/trace_output.h         |   30 +--
 mm/util.c                           |   11 +-
 net/core/net-traces.c               |    4 +-
 40 files changed, 1648 insertions(+), 1290 deletions(-)
-- 

             reply	other threads:[~2009-04-14 17:27 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14 17:23 Steven Rostedt [this message]
2009-04-14 17:23 ` [PATCH 1/8] tracing: consolidate trace and trace_event headers Steven Rostedt
2009-04-14 21:51   ` Frederic Weisbecker
2009-04-14 22:04     ` Steven Rostedt
2009-04-14 17:23 ` [PATCH 2/8] tracing: create automated trace defines Steven Rostedt
2009-04-14 23:44   ` Jeremy Fitzhardinge
2009-04-15  1:45     ` Mathieu Desnoyers
2009-04-15 16:07       ` Jeremy Fitzhardinge
2009-04-16  2:34         ` Mathieu Desnoyers
2009-04-16  2:56           ` Jeremy Fitzhardinge
2009-04-16 23:44             ` Mathieu Desnoyers
2009-04-17  0:03               ` Jeremy Fitzhardinge
2009-04-17  0:13                 ` Mathieu Desnoyers
2009-04-17  0:18                   ` Jeremy Fitzhardinge
2009-04-17  0:28                     ` Mathieu Desnoyers
2009-04-17  0:43                       ` Jeremy Fitzhardinge
2009-04-17  3:05                         ` [PATCH] tracepoints : let subsystem nop-out the tracepoints at build time Mathieu Desnoyers
2009-04-20  7:12               ` [PATCH 2/8] tracing: create automated trace defines Andi Kleen
2009-04-21 15:51                 ` Mathieu Desnoyers
2009-04-21 17:18                   ` Jeremy Fitzhardinge
2009-04-21 17:21                     ` Steven Rostedt
2009-04-21 17:43                       ` Jeremy Fitzhardinge
2009-04-21 20:28                       ` Andi Kleen
2009-04-21 21:17                         ` Steven Rostedt
2009-04-21 21:23                           ` Frank Ch. Eigler
2009-04-21 21:33                             ` Steven Rostedt
2009-04-22  5:47                               ` Mathieu Desnoyers
2009-04-22  6:07                           ` Andi Kleen
2009-04-22  6:24                             ` Steven Rostedt
2009-04-22  7:26                               ` Andi Kleen
2009-04-15  7:04   ` Zhaolei
2009-04-14 17:23 ` [PATCH 3/8] tracing: make trace_seq operations available for core kernel Steven Rostedt
2009-04-14 19:12   ` Peter Zijlstra
2009-04-15  2:19     ` Steven Rostedt
2009-04-14 17:23 ` [PATCH 4/8] tracing/events: move declarations from trace directory to core include Steven Rostedt
2009-04-14 17:23 ` [PATCH 5/8] tracing/events: move the ftrace event tracing code to core Steven Rostedt
2009-04-14 19:23   ` Peter Zijlstra
2009-04-15  2:25     ` Steven Rostedt
2009-04-15  3:40       ` Jiaying Zhang
2009-04-14 17:23 ` [PATCH 6/8] tracing/events: convert event call sites to use a link list Steven Rostedt
2009-04-14 17:23 ` [PATCH 7/8] tracing/events: add export symbols for trace events in modules Steven Rostedt
2009-04-14 17:23 ` [PATCH 8/8] tracing/events: add support for modules to TRACE_EVENT Steven Rostedt
2009-04-15  3:22   ` Rusty Russell
2009-04-14 18:15 ` [PATCH 0/8] [GIT PULL] TRACE_EVENT for modules Ingo Molnar
2009-04-14 18:25   ` Ingo Molnar
2009-04-14 18:21 ` Ingo Molnar
2009-04-14 18:33   ` Steven Rostedt
2009-04-14 18:35     ` Ingo Molnar
2009-04-14 21:04 ` Theodore Tso
2009-04-14 21:23   ` Steven Rostedt
2009-04-14 21:59     ` Steven Rostedt
2009-04-14 21:29   ` Frank Ch. Eigler
2009-04-14 22:00     ` Steven Rostedt
2009-04-16 16:53     ` Christoph Hellwig
2009-04-14 21:48   ` Jeremy Fitzhardinge
2009-04-14 21:55     ` Steven Rostedt
2009-04-14 22:33       ` Jeremy Fitzhardinge
2009-04-15  8:29         ` Ingo Molnar
2009-04-16  2:29           ` Mathieu Desnoyers
2009-04-16 16:52   ` Christoph Hellwig

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=20090414172337.280621613@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=compudj@krystal.dyndns.org \
    --cc=fche@elastic.org \
    --cc=fweisbec@gmail.com \
    --cc=hch@lst.de \
    --cc=jeremy@goop.org \
    --cc=jiayingz@google.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mbligh@google.com \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=mrubin@google.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    --cc=tzanussi@gmail.com \
    --cc=zhaolei@cn.fujitsu.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