Skip to content

Commit

Permalink
tracing: move trace point formats to files in include/trace directory
Browse files Browse the repository at this point in the history
Impact: clean up

To further facilitate the ease of adding trace points for developers, this
patch creates include/trace/trace_events.h and
include/trace/trace_event_types.h.

The former file will hold the trace/<type>.h files and the latter will hold
the trace/<type>_event_types.h files.

To create new tracepoints and to have them automatically
appear in the event tracer, a developer makes the trace/<type>.h file
which includes <linux/tracepoint.h> and the trace/<type>_event_types.h file.

The trace/<type>_event_types.h file will hold the TRACE_FORMAT
macros.

Then add the trace/<type>.h file to trace/trace_events.h,
and add the trace/<type>_event_types.h to the trace_event_types.h file.

No need to modify files elsewhere.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
  • Loading branch information
Steven Rostedt committed Feb 28, 2009
1 parent 0cfe824 commit eb594e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 4 additions & 0 deletions include/trace/trace_event_types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* trace/<type>_event_types.h here */

#include <trace/sched_event_types.h>
#include <trace/irq_event_types.h>
4 changes: 4 additions & 0 deletions include/trace/trace_events.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* trace/<type>.h here */

#include <trace/sched.h>
#include <trace/irq.h>
10 changes: 2 additions & 8 deletions kernel/trace/events.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
/*
* This is the place to register all trace points as events.
* Include the trace/<type>.h at the top.
* Include the trace/<type>_event_types.h at the bottom.
*/

/* trace/<type>.h here */
#include <trace/sched.h>
#include <trace/irq.h>
#include <trace/trace_events.h>

#include "trace_events.h"

/* trace/<type>_event_types.h here */
#include <trace/sched_event_types.h>
#include <trace/irq_event_types.h>
#include <trace/trace_event_types.h>

0 comments on commit eb594e4

Please sign in to comment.