public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction
@ 2011-05-02 21:11 Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 02/32] trace event sample remove semicolons, specify need for ifdef around declarations Mathieu Desnoyers
                   ` (31 more replies)
  0 siblings, 32 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt; +Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker

Hi,

I implemented the TRACE_EVENT macros as arrays of fields and arrays of
events in LTTng, and realised that it could benefit Ftrace too by
cutting down its code size. As I know that code size footprint is an
issue Steven has been wanting to tackle for a while, I am sending this
"semicolon removal" patchset, which is a prerequisite to be able to
generate arrays of events.

The main difference between the approaches Ftrace and LTTng have taken
is that Ftrace creates a "ftrace_define_fields_##call" function for each
event which calls trace_define_field for each field of each event. In
LTTng, I did the following (code snippet from [1]):

struct lttng_event_field {
        const char *name;
        const struct lttng_type type;
};

struct lttng_event_desc {
        const struct lttng_event_field *fields;
        const char *name;
        unsigned int nr_fields;
};

#undef DEFINE_EVENT
#define DEFINE_EVENT(_template, _name, _proto, _args)                          \
                {                                                              \
                        .fields = __event_fields___##_template,                \
                        .name = #_name,                                        \
                        .nr_fields = ARRAY_SIZE(__event_fields___##_template), \
                },

#define TP_ID1(_token, _system) _token##_system
#define TP_ID(_token, _system)  TP_ID1(_token, _system)

static const struct lttng_event_desc TP_ID(__event_desc___, TRACE_SYSTEM)[] = {
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
};

And for creation of __event_fields___##_template, which allows to keep
all fields in another array (which should be defined in a phase prior to
the event array definition), I did:

#undef __field
#define __field(_type, _item)                                   \
        { .name = #_item, .type = { .atype = atype_integer, .name = #_type} },

(similar for __field_ext, __array, __dynamic_array, __string)

#undef TP_STRUCT__entry
#define TP_STRUCT__entry(args...) args  /* Only one used in this phase */

#undef DECLARE_EVENT_CLASS
#define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print) \
        static const struct lttng_event_field __event_fields___##_name[] = { \
                _tstruct \
        };

For the declaration of struct lttng_type, which contains the field type
information in a union, see [2].

Best regards,

Mathieu

[1] http://git.lttng.org/?p=lttng-modules.git;a=blob;f=probes/lttng-events.h;h=a05c29d56771b89807ffef035b7cd6df34a0b97f;hb=HEAD
[2] http://git.lttng.org/?p=lttng-modules.git;a=blob;f=probes/lttng-types.h;h=0192bffaf2f321f446f71a13901e2ab09fd69663;hb=HEAD
-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 02/32] trace event sample remove semicolons, specify need for ifdef around declarations
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03 14:31   ` Steven Rostedt
  2011-05-02 21:11 ` [RFC patch 03/32] trace event block remove semicolumns Mathieu Desnoyers
                   ` (30 subsequent siblings)
  31 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Li Zefan

[-- Attachment #1: trace-event-sample-remove-semicolons.patch --]
[-- Type: text/plain, Size: 1704 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Protecting declarations with ifndef _TRACE_SAMPLE_DEF_ is required if we want to
ensure that, e.g., structure forward declarations do not generate extra
semicolons. It's already needed for enumerations and static inline functions
declarations, but not documented, so document it here.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
---
 samples/trace_events/trace-events-sample.h |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Index: linux-2.6-lttng/samples/trace_events/trace-events-sample.h
===================================================================
--- linux-2.6-lttng.orig/samples/trace_events/trace-events-sample.h
+++ linux-2.6-lttng/samples/trace_events/trace-events-sample.h
@@ -41,6 +41,18 @@
  */
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_SAMPLE_DEF_
+#define _TRACE_SAMPLE_DEF_
+
+/*
+ * All static inline functions, enumerations, types and structures declarations,
+ * as well as structure forward declarations, should be surrounded by
+ * _TRACE_SAMPLE_DEF_ preprocessor idefs (where SAMPLE is the name of the trace
+ * system).
+ */
+
+#endif /* _TRACE_SAMPLE_DEF_ */
+
 /*
  * The TRACE_EVENT macro is broken up into 5 parts.
  *
@@ -91,7 +103,7 @@ TRACE_EVENT(foo_bar,
 	),
 
 	TP_printk("foo %s %d", __entry->foo, __entry->bar)
-);
+)
 #endif
 
 /***** NOTICE! The #if protection ends here. *****/


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 03/32] trace event block remove semicolumns
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 02/32] trace event sample remove semicolons, specify need for ifdef around declarations Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 04/32] trace event ext4 remove semicolons Mathieu Desnoyers
                   ` (29 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Jeff Moyer, Jens Axboe, Li Zefan

[-- Attachment #1: trace-event-block-remove-semicolons.patch --]
[-- Type: text/plain, Size: 5865 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Jeff Moyer <jmoyer@redhat.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
---
 include/trace/events/block.h |   44 +++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

Index: linux-2.6-lttng/include/trace/events/block.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/block.h
+++ linux-2.6-lttng/include/trace/events/block.h
@@ -40,7 +40,7 @@ DECLARE_EVENT_CLASS(block_rq_with_error,
 		  __entry->rwbs, __get_str(cmd),
 		  (unsigned long long)__entry->sector,
 		  __entry->nr_sector, __entry->errors)
-);
+)
 
 /**
  * block_rq_abort - abort block operation request
@@ -57,7 +57,7 @@ DEFINE_EVENT(block_rq_with_error, block_
 	TP_PROTO(struct request_queue *q, struct request *rq),
 
 	TP_ARGS(q, rq)
-);
+)
 
 /**
  * block_rq_requeue - place block IO request back on a queue
@@ -73,7 +73,7 @@ DEFINE_EVENT(block_rq_with_error, block_
 	TP_PROTO(struct request_queue *q, struct request *rq),
 
 	TP_ARGS(q, rq)
-);
+)
 
 /**
  * block_rq_complete - block IO operation completed by device driver
@@ -91,7 +91,7 @@ DEFINE_EVENT(block_rq_with_error, block_
 	TP_PROTO(struct request_queue *q, struct request *rq),
 
 	TP_ARGS(q, rq)
-);
+)
 
 DECLARE_EVENT_CLASS(block_rq,
 
@@ -128,7 +128,7 @@ DECLARE_EVENT_CLASS(block_rq,
 		  __entry->rwbs, __entry->bytes, __get_str(cmd),
 		  (unsigned long long)__entry->sector,
 		  __entry->nr_sector, __entry->comm)
-);
+)
 
 /**
  * block_rq_insert - insert block operation request into queue
@@ -145,7 +145,7 @@ DEFINE_EVENT(block_rq, block_rq_insert,
 	TP_PROTO(struct request_queue *q, struct request *rq),
 
 	TP_ARGS(q, rq)
-);
+)
 
 /**
  * block_rq_issue - issue pending block IO request operation to device driver
@@ -160,7 +160,7 @@ DEFINE_EVENT(block_rq, block_rq_issue,
 	TP_PROTO(struct request_queue *q, struct request *rq),
 
 	TP_ARGS(q, rq)
-);
+)
 
 /**
  * block_bio_bounce - used bounce buffer when processing block operation
@@ -200,7 +200,7 @@ TRACE_EVENT(block_bio_bounce,
 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
 		  (unsigned long long)__entry->sector,
 		  __entry->nr_sector, __entry->comm)
-);
+)
 
 /**
  * block_bio_complete - completed all work on the block operation
@@ -237,7 +237,7 @@ TRACE_EVENT(block_bio_complete,
 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
 		  (unsigned long long)__entry->sector,
 		  __entry->nr_sector, __entry->error)
-);
+)
 
 DECLARE_EVENT_CLASS(block_bio,
 
@@ -265,7 +265,7 @@ DECLARE_EVENT_CLASS(block_bio,
 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
 		  (unsigned long long)__entry->sector,
 		  __entry->nr_sector, __entry->comm)
-);
+)
 
 /**
  * block_bio_backmerge - merging block operation to the end of an existing operation
@@ -280,7 +280,7 @@ DEFINE_EVENT(block_bio, block_bio_backme
 	TP_PROTO(struct request_queue *q, struct bio *bio),
 
 	TP_ARGS(q, bio)
-);
+)
 
 /**
  * block_bio_frontmerge - merging block operation to the beginning of an existing operation
@@ -295,7 +295,7 @@ DEFINE_EVENT(block_bio, block_bio_frontm
 	TP_PROTO(struct request_queue *q, struct bio *bio),
 
 	TP_ARGS(q, bio)
-);
+)
 
 /**
  * block_bio_queue - putting new block IO operation in queue
@@ -309,7 +309,7 @@ DEFINE_EVENT(block_bio, block_bio_queue,
 	TP_PROTO(struct request_queue *q, struct bio *bio),
 
 	TP_ARGS(q, bio)
-);
+)
 
 DECLARE_EVENT_CLASS(block_get_rq,
 
@@ -338,7 +338,7 @@ DECLARE_EVENT_CLASS(block_get_rq,
 		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
 		  (unsigned long long)__entry->sector,
 		  __entry->nr_sector, __entry->comm)
-);
+)
 
 /**
  * block_getrq - get a free request entry in queue for block IO operations
@@ -354,7 +354,7 @@ DEFINE_EVENT(block_get_rq, block_getrq,
 	TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
 
 	TP_ARGS(q, bio, rw)
-);
+)
 
 /**
  * block_sleeprq - waiting to get a free request entry in queue for block IO operation
@@ -372,7 +372,7 @@ DEFINE_EVENT(block_get_rq, block_sleeprq
 	TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
 
 	TP_ARGS(q, bio, rw)
-);
+)
 
 /**
  * block_plug - keep operations requests in request queue
@@ -397,7 +397,7 @@ TRACE_EVENT(block_plug,
 	),
 
 	TP_printk("[%s]", __entry->comm)
-);
+)
 
 DECLARE_EVENT_CLASS(block_unplug,
 
@@ -416,7 +416,7 @@ DECLARE_EVENT_CLASS(block_unplug,
 	),
 
 	TP_printk("[%s] %d", __entry->comm, __entry->nr_rq)
-);
+)
 
 /**
  * block_unplug - release of operations requests in request queue
@@ -432,7 +432,7 @@ DEFINE_EVENT(block_unplug, block_unplug,
 	TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit),
 
 	TP_ARGS(q, depth, explicit)
-);
+)
 
 /**
  * block_split - split a single bio struct into two bio structs
@@ -473,7 +473,7 @@ TRACE_EVENT(block_split,
 		  (unsigned long long)__entry->sector,
 		  (unsigned long long)__entry->new_sector,
 		  __entry->comm)
-);
+)
 
 /**
  * block_bio_remap - map request for a logical device to the raw device
@@ -516,7 +516,7 @@ TRACE_EVENT(block_bio_remap,
 		  __entry->nr_sector,
 		  MAJOR(__entry->old_dev), MINOR(__entry->old_dev),
 		  (unsigned long long)__entry->old_sector)
-);
+)
 
 /**
  * block_rq_remap - map request for a block operation request
@@ -560,7 +560,7 @@ TRACE_EVENT(block_rq_remap,
 		  __entry->nr_sector,
 		  MAJOR(__entry->old_dev), MINOR(__entry->old_dev),
 		  (unsigned long long)__entry->old_sector)
-);
+)
 
 #endif /* _TRACE_BLOCK_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 04/32] trace event ext4 remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 02/32] trace event sample remove semicolons, specify need for ifdef around declarations Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 03/32] trace event block remove semicolumns Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 05/32] trace event irq " Mathieu Desnoyers
                   ` (28 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Li Zefan, Theodore Tso

[-- Attachment #1: trace-event-ext4-remove-semicolons.patch --]
[-- Type: text/plain, Size: 18096 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Theodore Ts'o <tytso@mit.edu>
---
 include/trace/events/ext4.h |  143 ++++++++++++++++++++++----------------------
 1 file changed, 74 insertions(+), 69 deletions(-)

Index: linux-2.6-lttng/include/trace/events/ext4.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/ext4.h
+++ linux-2.6-lttng/include/trace/events/ext4.h
@@ -7,6 +7,9 @@
 #include <linux/writeback.h>
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_EXT4_DEF_
+#define _TRACE_EXT4_DEF_
+
 struct ext4_allocation_context;
 struct ext4_allocation_request;
 struct ext4_prealloc_space;
@@ -15,6 +18,8 @@ struct mpage_da_data;
 
 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
 
+#endif /* _TRACE_EXT4_DEF_ */
+
 TRACE_EVENT(ext4_free_inode,
 	TP_PROTO(struct inode *inode),
 
@@ -43,7 +48,7 @@ TRACE_EVENT(ext4_free_inode,
 		  (unsigned long) __entry->ino,
 		  __entry->mode, __entry->uid, __entry->gid,
 		  (unsigned long long) __entry->blocks)
-);
+)
 
 TRACE_EVENT(ext4_request_inode,
 	TP_PROTO(struct inode *dir, int mode),
@@ -65,7 +70,7 @@ TRACE_EVENT(ext4_request_inode,
 	TP_printk("dev %d,%d dir %lu mode 0%o",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->dir, __entry->mode)
-);
+)
 
 TRACE_EVENT(ext4_allocate_inode,
 	TP_PROTO(struct inode *inode, struct inode *dir, int mode),
@@ -90,7 +95,7 @@ TRACE_EVENT(ext4_allocate_inode,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  (unsigned long) __entry->dir, __entry->mode)
-);
+)
 
 TRACE_EVENT(ext4_evict_inode,
 	TP_PROTO(struct inode *inode),
@@ -112,7 +117,7 @@ TRACE_EVENT(ext4_evict_inode,
 	TP_printk("dev %d,%d ino %lu nlink %d",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, __entry->nlink)
-);
+)
 
 TRACE_EVENT(ext4_drop_inode,
 	TP_PROTO(struct inode *inode, int drop),
@@ -134,7 +139,7 @@ TRACE_EVENT(ext4_drop_inode,
 	TP_printk("dev %d,%d ino %lu drop %d",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, __entry->drop)
-);
+)
 
 TRACE_EVENT(ext4_mark_inode_dirty,
 	TP_PROTO(struct inode *inode, unsigned long IP),
@@ -156,7 +161,7 @@ TRACE_EVENT(ext4_mark_inode_dirty,
 	TP_printk("dev %d,%d ino %lu caller %pF",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, (void *)__entry->ip)
-);
+)
 
 TRACE_EVENT(ext4_begin_ordered_truncate,
 	TP_PROTO(struct inode *inode, loff_t new_size),
@@ -179,7 +184,7 @@ TRACE_EVENT(ext4_begin_ordered_truncate,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  (long long) __entry->new_size)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__write_begin,
 
@@ -208,7 +213,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->pos, __entry->len, __entry->flags)
-);
+)
 
 DEFINE_EVENT(ext4__write_begin, ext4_write_begin,
 
@@ -216,7 +221,7 @@ DEFINE_EVENT(ext4__write_begin, ext4_wri
 		 unsigned int flags),
 
 	TP_ARGS(inode, pos, len, flags)
-);
+)
 
 DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin,
 
@@ -224,7 +229,7 @@ DEFINE_EVENT(ext4__write_begin, ext4_da_
 		 unsigned int flags),
 
 	TP_ARGS(inode, pos, len, flags)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__write_end,
 	TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
@@ -252,7 +257,7 @@ DECLARE_EVENT_CLASS(ext4__write_end,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->pos, __entry->len, __entry->copied)
-);
+)
 
 DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end,
 
@@ -260,7 +265,7 @@ DEFINE_EVENT(ext4__write_end, ext4_order
 		 unsigned int copied),
 
 	TP_ARGS(inode, pos, len, copied)
-);
+)
 
 DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end,
 
@@ -268,7 +273,7 @@ DEFINE_EVENT(ext4__write_end, ext4_write
 		 unsigned int copied),
 
 	TP_ARGS(inode, pos, len, copied)
-);
+)
 
 DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end,
 
@@ -276,7 +281,7 @@ DEFINE_EVENT(ext4__write_end, ext4_journ
 		 unsigned int copied),
 
 	TP_ARGS(inode, pos, len, copied)
-);
+)
 
 DEFINE_EVENT(ext4__write_end, ext4_da_write_end,
 
@@ -284,7 +289,7 @@ DEFINE_EVENT(ext4__write_end, ext4_da_wr
 		 unsigned int copied),
 
 	TP_ARGS(inode, pos, len, copied)
-);
+)
 
 TRACE_EVENT(ext4_writepage,
 	TP_PROTO(struct inode *inode, struct page *page),
@@ -307,7 +312,7 @@ TRACE_EVENT(ext4_writepage,
 	TP_printk("dev %d,%d ino %lu page_index %lu",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, __entry->index)
-);
+)
 
 TRACE_EVENT(ext4_da_writepages,
 	TP_PROTO(struct inode *inode, struct writeback_control *wbc),
@@ -349,7 +354,7 @@ TRACE_EVENT(ext4_da_writepages,
 		  __entry->range_end, __entry->sync_mode,
 		  __entry->for_kupdate, __entry->range_cyclic,
 		  (unsigned long) __entry->writeback_index)
-);
+)
 
 TRACE_EVENT(ext4_da_write_pages,
 	TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
@@ -389,7 +394,7 @@ TRACE_EVENT(ext4_da_write_pages,
 		  __entry->io_done, __entry->pages_written,
 		  __entry->sync_mode
                   )
-);
+)
 
 TRACE_EVENT(ext4_da_writepages_result,
 	TP_PROTO(struct inode *inode, struct writeback_control *wbc,
@@ -426,7 +431,7 @@ TRACE_EVENT(ext4_da_writepages_result,
 		  __entry->pages_written, __entry->pages_skipped,
 		  __entry->more_io, __entry->sync_mode,
 		  (unsigned long) __entry->writeback_index)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__page_op,
 	TP_PROTO(struct page *page),
@@ -450,21 +455,21 @@ DECLARE_EVENT_CLASS(ext4__page_op,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->index)
-);
+)
 
 DEFINE_EVENT(ext4__page_op, ext4_readpage,
 
 	TP_PROTO(struct page *page),
 
 	TP_ARGS(page)
-);
+)
 
 DEFINE_EVENT(ext4__page_op, ext4_releasepage,
 
 	TP_PROTO(struct page *page),
 
 	TP_ARGS(page)
-);
+)
 
 TRACE_EVENT(ext4_invalidatepage,
 	TP_PROTO(struct page *page, unsigned long offset),
@@ -490,7 +495,7 @@ TRACE_EVENT(ext4_invalidatepage,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->index, __entry->offset)
-);
+)
 
 TRACE_EVENT(ext4_discard_blocks,
 	TP_PROTO(struct super_block *sb, unsigned long long blk,
@@ -514,7 +519,7 @@ TRACE_EVENT(ext4_discard_blocks,
 	TP_printk("dev %d,%d blk %llu count %llu",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  __entry->blk, __entry->count)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__mb_new_pa,
 	TP_PROTO(struct ext4_allocation_context *ac,
@@ -543,7 +548,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
-);
+)
 
 DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
 
@@ -551,7 +556,7 @@ DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_ne
 		 struct ext4_prealloc_space *pa),
 
 	TP_ARGS(ac, pa)
-);
+)
 
 DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
 
@@ -559,7 +564,7 @@ DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_ne
 		 struct ext4_prealloc_space *pa),
 
 	TP_ARGS(ac, pa)
-);
+)
 
 TRACE_EVENT(ext4_mb_release_inode_pa,
 	TP_PROTO(struct super_block *sb,
@@ -588,7 +593,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->block, __entry->count)
-);
+)
 
 TRACE_EVENT(ext4_mb_release_group_pa,
 	TP_PROTO(struct super_block *sb,
@@ -612,7 +617,7 @@ TRACE_EVENT(ext4_mb_release_group_pa,
 	TP_printk("dev %d,%d pstart %llu len %u",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  __entry->pa_pstart, __entry->pa_len)
-);
+)
 
 TRACE_EVENT(ext4_discard_preallocations,
 	TP_PROTO(struct inode *inode),
@@ -633,7 +638,7 @@ TRACE_EVENT(ext4_discard_preallocations,
 	TP_printk("dev %d,%d ino %lu",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino)
-);
+)
 
 TRACE_EVENT(ext4_mb_discard_preallocations,
 	TP_PROTO(struct super_block *sb, int needed),
@@ -654,7 +659,7 @@ TRACE_EVENT(ext4_mb_discard_preallocatio
 	TP_printk("dev %d,%d needed %d",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  __entry->needed)
-);
+)
 
 TRACE_EVENT(ext4_request_blocks,
 	TP_PROTO(struct ext4_allocation_request *ar),
@@ -698,7 +703,7 @@ TRACE_EVENT(ext4_request_blocks,
 		  (unsigned long long) __entry->lright,
 		  (unsigned long long) __entry->pleft,
 		  (unsigned long long) __entry->pright)
-);
+)
 
 TRACE_EVENT(ext4_allocate_blocks,
 	TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block),
@@ -744,7 +749,7 @@ TRACE_EVENT(ext4_allocate_blocks,
 		  (unsigned long long) __entry->lright,
 		  (unsigned long long) __entry->pleft,
 		  (unsigned long long) __entry->pright)
-);
+)
 
 TRACE_EVENT(ext4_free_blocks,
 	TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
@@ -775,7 +780,7 @@ TRACE_EVENT(ext4_free_blocks,
 		  (unsigned long) __entry->ino,
 		  __entry->mode, __entry->block, __entry->count,
 		  __entry->flags)
-);
+)
 
 TRACE_EVENT(ext4_sync_file_enter,
 	TP_PROTO(struct file *file, int datasync),
@@ -802,7 +807,7 @@ TRACE_EVENT(ext4_sync_file_enter,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  (unsigned long) __entry->parent, __entry->datasync)
-);
+)
 
 TRACE_EVENT(ext4_sync_file_exit,
 	TP_PROTO(struct inode *inode, int ret),
@@ -825,7 +830,7 @@ TRACE_EVENT(ext4_sync_file_exit,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->ret)
-);
+)
 
 TRACE_EVENT(ext4_sync_fs,
 	TP_PROTO(struct super_block *sb, int wait),
@@ -846,7 +851,7 @@ TRACE_EVENT(ext4_sync_fs,
 	TP_printk("dev %d,%d wait %d",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  __entry->wait)
-);
+)
 
 TRACE_EVENT(ext4_alloc_da_blocks,
 	TP_PROTO(struct inode *inode),
@@ -871,7 +876,7 @@ TRACE_EVENT(ext4_alloc_da_blocks,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->data_blocks, __entry->meta_blocks)
-);
+)
 
 TRACE_EVENT(ext4_mballoc_alloc,
 	TP_PROTO(struct ext4_allocation_context *ac),
@@ -938,7 +943,7 @@ TRACE_EVENT(ext4_mballoc_alloc,
 		  __entry->found, __entry->groups, __entry->cr,
 		  __entry->flags, __entry->tail,
 		  __entry->buddy ? 1 << __entry->buddy : 0)
-);
+)
 
 TRACE_EVENT(ext4_mballoc_prealloc,
 	TP_PROTO(struct ext4_allocation_context *ac),
@@ -978,7 +983,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
 		  __entry->orig_len, __entry->orig_logical,
 		  __entry->result_group, __entry->result_start,
 		  __entry->result_len, __entry->result_logical)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__mballoc,
 	TP_PROTO(struct super_block *sb,
@@ -1010,7 +1015,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
 		  (unsigned long) __entry->ino,
 		  __entry->result_group, __entry->result_start,
 		  __entry->result_len)
-);
+)
 
 DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard,
 
@@ -1021,7 +1026,7 @@ DEFINE_EVENT(ext4__mballoc, ext4_mballoc
 		 ext4_grpblk_t len),
 
 	TP_ARGS(sb, inode, group, start, len)
-);
+)
 
 DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free,
 
@@ -1032,7 +1037,7 @@ DEFINE_EVENT(ext4__mballoc, ext4_mballoc
 		 ext4_grpblk_t len),
 
 	TP_ARGS(sb, inode, group, start, len)
-);
+)
 
 TRACE_EVENT(ext4_forget,
 	TP_PROTO(struct inode *inode, int is_metadata, __u64 block),
@@ -1059,7 +1064,7 @@ TRACE_EVENT(ext4_forget,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->mode, __entry->is_metadata, __entry->block)
-);
+)
 
 TRACE_EVENT(ext4_da_update_reserve_space,
 	TP_PROTO(struct inode *inode, int used_blocks),
@@ -1096,7 +1101,7 @@ TRACE_EVENT(ext4_da_update_reserve_space
 		  __entry->mode,  (unsigned long long) __entry->i_blocks,
 		  __entry->used_blocks, __entry->reserved_data_blocks,
 		  __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
-);
+)
 
 TRACE_EVENT(ext4_da_reserve_space,
 	TP_PROTO(struct inode *inode, int md_needed),
@@ -1130,7 +1135,7 @@ TRACE_EVENT(ext4_da_reserve_space,
 		  __entry->mode, (unsigned long long) __entry->i_blocks,
 		  __entry->md_needed, __entry->reserved_data_blocks,
 		  __entry->reserved_meta_blocks)
-);
+)
 
 TRACE_EVENT(ext4_da_release_space,
 	TP_PROTO(struct inode *inode, int freed_blocks),
@@ -1167,7 +1172,7 @@ TRACE_EVENT(ext4_da_release_space,
 		  __entry->mode, (unsigned long long) __entry->i_blocks,
 		  __entry->freed_blocks, __entry->reserved_data_blocks,
 		  __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__bitmap_load,
 	TP_PROTO(struct super_block *sb, unsigned long group),
@@ -1188,35 +1193,35 @@ DECLARE_EVENT_CLASS(ext4__bitmap_load,
 	TP_printk("dev %d,%d group %u",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  __entry->group)
-);
+)
 
 DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
 
 	TP_PROTO(struct super_block *sb, unsigned long group),
 
 	TP_ARGS(sb, group)
-);
+)
 
 DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
 
 	TP_PROTO(struct super_block *sb, unsigned long group),
 
 	TP_ARGS(sb, group)
-);
+)
 
 DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load,
 
 	TP_PROTO(struct super_block *sb, unsigned long group),
 
 	TP_ARGS(sb, group)
-);
+)
 
 DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap,
 
 	TP_PROTO(struct super_block *sb, unsigned long group),
 
 	TP_ARGS(sb, group)
-);
+)
 
 TRACE_EVENT(ext4_direct_IO_enter,
 	TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
@@ -1243,7 +1248,7 @@ TRACE_EVENT(ext4_direct_IO_enter,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  (unsigned long long) __entry->pos, __entry->len, __entry->rw)
-);
+)
 
 TRACE_EVENT(ext4_direct_IO_exit,
 	TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw, int ret),
@@ -1273,7 +1278,7 @@ TRACE_EVENT(ext4_direct_IO_exit,
 		  (unsigned long) __entry->ino,
 		  (unsigned long long) __entry->pos, __entry->len,
 		  __entry->rw, __entry->ret)
-);
+)
 
 TRACE_EVENT(ext4_fallocate_enter,
 	TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
@@ -1301,7 +1306,7 @@ TRACE_EVENT(ext4_fallocate_enter,
 		  (unsigned long) __entry->ino,
 		  (unsigned long long) __entry->pos,
 		  (unsigned long long) __entry->len, __entry->mode)
-);
+)
 
 TRACE_EVENT(ext4_fallocate_exit,
 	TP_PROTO(struct inode *inode, loff_t offset, unsigned int max_blocks, int ret),
@@ -1329,7 +1334,7 @@ TRACE_EVENT(ext4_fallocate_exit,
 		  (unsigned long) __entry->ino,
 		  (unsigned long long) __entry->pos, __entry->blocks,
 		  __entry->ret)
-);
+)
 
 TRACE_EVENT(ext4_unlink_enter,
 	TP_PROTO(struct inode *parent, struct dentry *dentry),
@@ -1354,7 +1359,7 @@ TRACE_EVENT(ext4_unlink_enter,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, __entry->size,
 		  (unsigned long) __entry->parent)
-);
+)
 
 TRACE_EVENT(ext4_unlink_exit,
 	TP_PROTO(struct dentry *dentry, int ret),
@@ -1377,7 +1382,7 @@ TRACE_EVENT(ext4_unlink_exit,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  __entry->ret)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__truncate,
 	TP_PROTO(struct inode *inode),
@@ -1399,21 +1404,21 @@ DECLARE_EVENT_CLASS(ext4__truncate,
 	TP_printk("dev %d,%d ino %lu blocks %lu",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino, (unsigned long) __entry->blocks)
-);
+)
 
 DEFINE_EVENT(ext4__truncate, ext4_truncate_enter,
 
 	TP_PROTO(struct inode *inode),
 
 	TP_ARGS(inode)
-);
+)
 
 DEFINE_EVENT(ext4__truncate, ext4_truncate_exit,
 
 	TP_PROTO(struct inode *inode),
 
 	TP_ARGS(inode)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
 	TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
@@ -1441,21 +1446,21 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_ent
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  (unsigned) __entry->lblk, __entry->len, __entry->flags)
-);
+)
 
 DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
 	TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
 		 unsigned len, unsigned flags),
 
 	TP_ARGS(inode, lblk, len, flags)
-);
+)
 
 DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
 	TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
 		 unsigned len, unsigned flags),
 
 	TP_ARGS(inode, lblk, len, flags)
-);
+)
 
 DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
 	TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
@@ -1486,21 +1491,21 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_exi
 		  (unsigned long) __entry->ino,
 		  (unsigned) __entry->lblk, (unsigned long long) __entry->pblk,
 		  __entry->len, __entry->ret)
-);
+)
 
 DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
 	TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
 		 ext4_fsblk_t pblk, unsigned len, int ret),
 
 	TP_ARGS(inode, lblk, pblk, len, ret)
-);
+)
 
 DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
 	TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
 		 ext4_fsblk_t pblk, unsigned len, int ret),
 
 	TP_ARGS(inode, lblk, pblk, len, ret)
-);
+)
 
 TRACE_EVENT(ext4_ext_load_extent,
 	TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
@@ -1525,7 +1530,7 @@ TRACE_EVENT(ext4_ext_load_extent,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino,
 		  (unsigned) __entry->lblk, (unsigned long long) __entry->pblk)
-);
+)
 
 TRACE_EVENT(ext4_load_inode,
 	TP_PROTO(struct inode *inode),
@@ -1545,7 +1550,7 @@ TRACE_EVENT(ext4_load_inode,
 	TP_printk("dev %d,%d ino %ld",
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  (unsigned long) __entry->ino)
-);
+)
 
 #endif /* _TRACE_EXT4_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 05/32] trace event irq remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (2 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 04/32] trace event ext4 remove semicolons Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 06/32] trace event jbd2 " Mathieu Desnoyers
                   ` (27 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers

[-- Attachment #1: trace-event-irq-remove-semicolons.patch --]
[-- Type: text/plain, Size: 2199 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
---
 include/trace/events/irq.h |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Index: linux-2.6-lttng/include/trace/events/irq.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/irq.h
+++ linux-2.6-lttng/include/trace/events/irq.h
@@ -6,6 +6,9 @@
 
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_IRQ_DEF_
+#define _TRACE_IRQ_DEF_
+
 struct irqaction;
 struct softirq_action;
 
@@ -23,6 +26,8 @@ struct softirq_action;
 			 softirq_name(HRTIMER),		\
 			 softirq_name(RCU))
 
+#endif /* _TRACE_IRQ_DEF_ */
+
 /**
  * irq_handler_entry - called immediately before the irq action handler
  * @irq: irq number
@@ -51,7 +56,7 @@ TRACE_EVENT(irq_handler_entry,
 	),
 
 	TP_printk("irq=%d name=%s", __entry->irq, __get_str(name))
-);
+)
 
 /**
  * irq_handler_exit - called immediately after the irq action handler returns
@@ -82,7 +87,7 @@ TRACE_EVENT(irq_handler_exit,
 
 	TP_printk("irq=%d ret=%s",
 		  __entry->irq, __entry->ret ? "handled" : "unhandled")
-);
+)
 
 DECLARE_EVENT_CLASS(softirq,
 
@@ -100,7 +105,7 @@ DECLARE_EVENT_CLASS(softirq,
 
 	TP_printk("vec=%u [action=%s]", __entry->vec,
 		  show_softirq_name(__entry->vec))
-);
+)
 
 /**
  * softirq_entry - called immediately before the softirq handler
@@ -114,7 +119,7 @@ DEFINE_EVENT(softirq, softirq_entry,
 	TP_PROTO(unsigned int vec_nr),
 
 	TP_ARGS(vec_nr)
-);
+)
 
 /**
  * softirq_exit - called immediately after the softirq handler returns
@@ -128,7 +133,7 @@ DEFINE_EVENT(softirq, softirq_exit,
 	TP_PROTO(unsigned int vec_nr),
 
 	TP_ARGS(vec_nr)
-);
+)
 
 /**
  * softirq_raise - called immediately when a softirq is raised
@@ -142,7 +147,7 @@ DEFINE_EVENT(softirq, softirq_raise,
 	TP_PROTO(unsigned int vec_nr),
 
 	TP_ARGS(vec_nr)
-);
+)
 
 #endif /*  _TRACE_IRQ_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 06/32] trace event jbd2 remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (3 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 05/32] trace event irq " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 07/32] trace event kmem " Mathieu Desnoyers
                   ` (26 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Li Zefan, Theodore Tso

[-- Attachment #1: trace-event-jbd2-remove-semicolons.patch --]
[-- Type: text/plain, Size: 3518 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Theodore Ts'o <tytso@mit.edu>
---
 include/trace/events/jbd2.h |   27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

Index: linux-2.6-lttng/include/trace/events/jbd2.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/jbd2.h
+++ linux-2.6-lttng/include/trace/events/jbd2.h
@@ -7,9 +7,14 @@
 #include <linux/jbd2.h>
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_JBD2_DEF_
+#define _TRACE_JBD2_DEF_
+
 struct transaction_chp_stats_s;
 struct transaction_run_stats_s;
 
+#endif /* _TRACE_JBD2_DEF_ */
+
 TRACE_EVENT(jbd2_checkpoint,
 
 	TP_PROTO(journal_t *journal, int result),
@@ -28,7 +33,7 @@ TRACE_EVENT(jbd2_checkpoint,
 
 	TP_printk("dev %s result %d",
 		  jbd2_dev_to_name(__entry->dev), __entry->result)
-);
+)
 
 DECLARE_EVENT_CLASS(jbd2_commit,
 
@@ -51,35 +56,35 @@ DECLARE_EVENT_CLASS(jbd2_commit,
 	TP_printk("dev %s transaction %d sync %d",
 		  jbd2_dev_to_name(__entry->dev), __entry->transaction,
 		  __entry->sync_commit)
-);
+)
 
 DEFINE_EVENT(jbd2_commit, jbd2_start_commit,
 
 	TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
 
 	TP_ARGS(journal, commit_transaction)
-);
+)
 
 DEFINE_EVENT(jbd2_commit, jbd2_commit_locking,
 
 	TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
 
 	TP_ARGS(journal, commit_transaction)
-);
+)
 
 DEFINE_EVENT(jbd2_commit, jbd2_commit_flushing,
 
 	TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
 
 	TP_ARGS(journal, commit_transaction)
-);
+)
 
 DEFINE_EVENT(jbd2_commit, jbd2_commit_logging,
 
 	TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
 
 	TP_ARGS(journal, commit_transaction)
-);
+)
 
 TRACE_EVENT(jbd2_end_commit,
 	TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
@@ -103,7 +108,7 @@ TRACE_EVENT(jbd2_end_commit,
 	TP_printk("dev %s transaction %d sync %d head %d",
 		  jbd2_dev_to_name(__entry->dev), __entry->transaction,
 		  __entry->sync_commit, __entry->head)
-);
+)
 
 TRACE_EVENT(jbd2_submit_inode_data,
 	TP_PROTO(struct inode *inode),
@@ -122,7 +127,7 @@ TRACE_EVENT(jbd2_submit_inode_data,
 
 	TP_printk("dev %s ino %lu",
 		  jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino)
-);
+)
 
 TRACE_EVENT(jbd2_run_stats,
 	TP_PROTO(dev_t dev, unsigned long tid,
@@ -166,7 +171,7 @@ TRACE_EVENT(jbd2_run_stats,
 		  jiffies_to_msecs(__entry->logging),
 		  __entry->handle_count, __entry->blocks,
 		  __entry->blocks_logged)
-);
+)
 
 TRACE_EVENT(jbd2_checkpoint_stats,
 	TP_PROTO(dev_t dev, unsigned long tid,
@@ -197,7 +202,7 @@ TRACE_EVENT(jbd2_checkpoint_stats,
 		  jbd2_dev_to_name(__entry->dev), __entry->tid,
 		  jiffies_to_msecs(__entry->chp_time),
 		  __entry->forced_to_close, __entry->written, __entry->dropped)
-);
+)
 
 TRACE_EVENT(jbd2_cleanup_journal_tail,
 
@@ -225,7 +230,7 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
 	TP_printk("dev %s from %u to %u offset %lu freed %lu",
 		  jbd2_dev_to_name(__entry->dev), __entry->tail_sequence,
 		  __entry->first_tid, __entry->block_nr, __entry->freed)
-);
+)
 
 #endif /* _TRACE_JBD2_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 07/32] trace event kmem remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (4 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 06/32] trace event jbd2 " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 08/32] trace event kvm " Mathieu Desnoyers
                   ` (25 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Li Zefan, Mel Gorman, Rik van Riel,
	Larry Woodman, KOSAKI Motohiro

[-- Attachment #1: trace-event-kmem-remove-semicolons.patch --]
[-- Type: text/plain, Size: 3930 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Mel Gorman <mel@csn.ul.ie>
CC: Rik van Riel <riel@redhat.com>
CC: Larry Woodman <lwoodman@redhat.com>
CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 include/trace/events/kmem.h |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Index: linux-2.6-lttng/include/trace/events/kmem.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/kmem.h
+++ linux-2.6-lttng/include/trace/events/kmem.h
@@ -40,7 +40,7 @@ DECLARE_EVENT_CLASS(kmem_alloc,
 		__entry->bytes_req,
 		__entry->bytes_alloc,
 		show_gfp_flags(__entry->gfp_flags))
-);
+)
 
 DEFINE_EVENT(kmem_alloc, kmalloc,
 
@@ -48,7 +48,7 @@ DEFINE_EVENT(kmem_alloc, kmalloc,
 		 size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags),
 
 	TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags)
-);
+)
 
 DEFINE_EVENT(kmem_alloc, kmem_cache_alloc,
 
@@ -56,7 +56,7 @@ DEFINE_EVENT(kmem_alloc, kmem_cache_allo
 		 size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags),
 
 	TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags)
-);
+)
 
 DECLARE_EVENT_CLASS(kmem_alloc_node,
 
@@ -94,7 +94,7 @@ DECLARE_EVENT_CLASS(kmem_alloc_node,
 		__entry->bytes_alloc,
 		show_gfp_flags(__entry->gfp_flags),
 		__entry->node)
-);
+)
 
 DEFINE_EVENT(kmem_alloc_node, kmalloc_node,
 
@@ -103,7 +103,7 @@ DEFINE_EVENT(kmem_alloc_node, kmalloc_no
 		 gfp_t gfp_flags, int node),
 
 	TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node)
-);
+)
 
 DEFINE_EVENT(kmem_alloc_node, kmem_cache_alloc_node,
 
@@ -112,7 +112,7 @@ DEFINE_EVENT(kmem_alloc_node, kmem_cache
 		 gfp_t gfp_flags, int node),
 
 	TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node)
-);
+)
 
 DECLARE_EVENT_CLASS(kmem_free,
 
@@ -131,21 +131,21 @@ DECLARE_EVENT_CLASS(kmem_free,
 	),
 
 	TP_printk("call_site=%lx ptr=%p", __entry->call_site, __entry->ptr)
-);
+)
 
 DEFINE_EVENT(kmem_free, kfree,
 
 	TP_PROTO(unsigned long call_site, const void *ptr),
 
 	TP_ARGS(call_site, ptr)
-);
+)
 
 DEFINE_EVENT(kmem_free, kmem_cache_free,
 
 	TP_PROTO(unsigned long call_site, const void *ptr),
 
 	TP_ARGS(call_site, ptr)
-);
+)
 
 TRACE_EVENT(mm_page_free_direct,
 
@@ -167,7 +167,7 @@ TRACE_EVENT(mm_page_free_direct,
 			__entry->page,
 			page_to_pfn(__entry->page),
 			__entry->order)
-);
+)
 
 TRACE_EVENT(mm_pagevec_free,
 
@@ -189,7 +189,7 @@ TRACE_EVENT(mm_pagevec_free,
 			__entry->page,
 			page_to_pfn(__entry->page),
 			__entry->cold)
-);
+)
 
 TRACE_EVENT(mm_page_alloc,
 
@@ -218,7 +218,7 @@ TRACE_EVENT(mm_page_alloc,
 		__entry->order,
 		__entry->migratetype,
 		show_gfp_flags(__entry->gfp_flags))
-);
+)
 
 DECLARE_EVENT_CLASS(mm_page,
 
@@ -244,14 +244,14 @@ DECLARE_EVENT_CLASS(mm_page,
 		__entry->order,
 		__entry->migratetype,
 		__entry->order == 0)
-);
+)
 
 DEFINE_EVENT(mm_page, mm_page_alloc_zone_locked,
 
 	TP_PROTO(struct page *page, unsigned int order, int migratetype),
 
 	TP_ARGS(page, order, migratetype)
-);
+)
 
 DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain,
 
@@ -262,7 +262,7 @@ DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu
 	TP_printk("page=%p pfn=%lu order=%d migratetype=%d",
 		__entry->page, page_to_pfn(__entry->page),
 		__entry->order, __entry->migratetype)
-);
+)
 
 TRACE_EVENT(mm_page_alloc_extfrag,
 
@@ -300,7 +300,7 @@ TRACE_EVENT(mm_page_alloc_extfrag,
 		__entry->fallback_migratetype,
 		__entry->fallback_order < pageblock_order,
 		__entry->alloc_migratetype == __entry->fallback_migratetype)
-);
+)
 
 #endif /* _TRACE_KMEM_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 08/32] trace event kvm remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (5 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 07/32] trace event kmem " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 09/32] trace event lock " Mathieu Desnoyers
                   ` (24 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Gleb Natapov, Avi Kivity, Marcelo Tosatti,
	Alexander Graf, Joerg Roedel, Vadim Rozenfeld

[-- Attachment #1: trace-event-kvm-remove-semicolons.patch --]
[-- Type: text/plain, Size: 15761 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Gleb Natapov <gleb@redhat.com>
CC: Avi Kivity <avi@redhat.com>
CC: Marcelo Tosatti <mtosatti@redhat.com>
CC: Alexander Graf <agraf@suse.de>
CC: Joerg Roedel <joerg.roedel@amd.com>
CC: Vadim Rozenfeld <vrozenfe@redhat.com>
---
 arch/powerpc/kvm/trace.h   |   28 ++++++++++++++--------------
 arch/x86/kvm/mmutrace.h    |   24 ++++++++++++------------
 arch/x86/kvm/trace.h       |   44 ++++++++++++++++++++++----------------------
 include/trace/events/kvm.h |   30 +++++++++++++++---------------
 4 files changed, 63 insertions(+), 63 deletions(-)

Index: linux-2.6-lttng/include/trace/events/kvm.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/kvm.h
+++ linux-2.6-lttng/include/trace/events/kvm.h
@@ -34,7 +34,7 @@ TRACE_EVENT(kvm_userspace_exit,
 		  (__entry->errno == -EINTR ? "restart" : "error") :
 		  __print_symbolic(__entry->reason, kvm_trace_exit_reason),
 		  __entry->errno < 0 ? -__entry->errno : __entry->reason)
-);
+)
 
 #if defined(__KVM_HAVE_IOAPIC)
 TRACE_EVENT(kvm_set_irq,
@@ -55,7 +55,7 @@ TRACE_EVENT(kvm_set_irq,
 
 	TP_printk("gsi %u level %d source %d",
 		  __entry->gsi, __entry->level, __entry->irq_source_id)
-);
+)
 
 #define kvm_deliver_mode		\
 	{0x0, "Fixed"},			\
@@ -90,7 +90,7 @@ TRACE_EVENT(kvm_ioapic_set_irq,
 		  (__entry->e & (1<<15)) ? "level" : "edge",
 		  (__entry->e & (1<<16)) ? "|masked" : "",
 		  __entry->coalesced ? " (coalesced)" : "")
-);
+)
 
 TRACE_EVENT(kvm_msi_set_irq,
 	    TP_PROTO(__u64 address, __u64 data),
@@ -112,7 +112,7 @@ TRACE_EVENT(kvm_msi_set_irq,
 		  (__entry->address & (1<<2)) ? "logical" : "physical",
 		  (__entry->data & (1<<15)) ? "level" : "edge",
 		  (__entry->address & (1<<3)) ? "|rh" : "")
-);
+)
 
 #define kvm_irqchips						\
 	{KVM_IRQCHIP_PIC_MASTER,	"PIC master"},		\
@@ -136,7 +136,7 @@ TRACE_EVENT(kvm_ack_irq,
 	TP_printk("irqchip %s pin %u",
 		  __print_symbolic(__entry->irqchip, kvm_irqchips),
 		 __entry->pin)
-);
+)
 
 
 
@@ -172,7 +172,7 @@ TRACE_EVENT(kvm_mmio,
 	TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx",
 		  __print_symbolic(__entry->type, kvm_trace_symbol_mmio),
 		  __entry->len, __entry->gpa, __entry->val)
-);
+)
 
 #define kvm_fpu_load_symbol	\
 	{0, "unload"},		\
@@ -191,7 +191,7 @@ TRACE_EVENT(kvm_fpu,
 	),
 
 	TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol))
-);
+)
 
 TRACE_EVENT(kvm_age_page,
 	TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref),
@@ -213,7 +213,7 @@ TRACE_EVENT(kvm_age_page,
 	TP_printk("hva %llx gfn %llx %s",
 		  __entry->hva, __entry->gfn,
 		  __entry->referenced ? "YOUNG" : "OLD")
-);
+)
 
 #ifdef CONFIG_KVM_ASYNC_PF
 DECLARE_EVENT_CLASS(kvm_async_get_page_class,
@@ -233,21 +233,21 @@ DECLARE_EVENT_CLASS(kvm_async_get_page_c
 	),
 
 	TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn)
-);
+)
 
 DEFINE_EVENT(kvm_async_get_page_class, kvm_try_async_get_page,
 
 	TP_PROTO(u64 gva, u64 gfn),
 
 	TP_ARGS(gva, gfn)
-);
+)
 
 DEFINE_EVENT(kvm_async_get_page_class, kvm_async_pf_doublefault,
 
 	TP_PROTO(u64 gva, u64 gfn),
 
 	TP_ARGS(gva, gfn)
-);
+)
 
 DECLARE_EVENT_CLASS(kvm_async_pf_nopresent_ready,
 
@@ -267,21 +267,21 @@ DECLARE_EVENT_CLASS(kvm_async_pf_noprese
 
 	TP_printk("token %#llx gva %#llx", __entry->token, __entry->gva)
 
-);
+)
 
 DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_not_present,
 
 	TP_PROTO(u64 token, u64 gva),
 
 	TP_ARGS(token, gva)
-);
+)
 
 DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_ready,
 
 	TP_PROTO(u64 token, u64 gva),
 
 	TP_ARGS(token, gva)
-);
+)
 
 TRACE_EVENT(
 	kvm_async_pf_completed,
@@ -302,7 +302,7 @@ TRACE_EVENT(
 
 	TP_printk("gva %#llx address %#lx pfn %#llx",  __entry->gva,
 		  __entry->address, __entry->pfn)
-);
+)
 
 #endif
 
Index: linux-2.6-lttng/arch/powerpc/kvm/trace.h
===================================================================
--- linux-2.6-lttng.orig/arch/powerpc/kvm/trace.h
+++ linux-2.6-lttng/arch/powerpc/kvm/trace.h
@@ -29,7 +29,7 @@ TRACE_EVENT(kvm_ppc_instr,
 
 	TP_printk("inst %u pc 0x%lx emulate %u\n",
 		  __entry->inst, __entry->pc, __entry->emulate)
-);
+)
 
 TRACE_EVENT(kvm_stlb_inval,
 	TP_PROTO(unsigned int stlb_index),
@@ -44,7 +44,7 @@ TRACE_EVENT(kvm_stlb_inval,
 	),
 
 	TP_printk("stlb_index %u", __entry->stlb_index)
-);
+)
 
 TRACE_EVENT(kvm_stlb_write,
 	TP_PROTO(unsigned int victim, unsigned int tid, unsigned int word0,
@@ -70,7 +70,7 @@ TRACE_EVENT(kvm_stlb_write,
 	TP_printk("victim %u tid %u w0 %u w1 %u w2 %u",
 		__entry->victim, __entry->tid, __entry->word0,
 		__entry->word1, __entry->word2)
-);
+)
 
 TRACE_EVENT(kvm_gtlb_write,
 	TP_PROTO(unsigned int gtlb_index, unsigned int tid, unsigned int word0,
@@ -96,7 +96,7 @@ TRACE_EVENT(kvm_gtlb_write,
 	TP_printk("gtlb_index %u tid %u w0 %u w1 %u w2 %u",
 		__entry->gtlb_index, __entry->tid, __entry->word0,
 		__entry->word1, __entry->word2)
-);
+)
 
 
 /*************************************************************************
@@ -128,7 +128,7 @@ TRACE_EVENT(kvm_book3s_exit,
 	TP_printk("exit=0x%x | pc=0x%lx | msr=0x%lx | dar=0x%lx | srr1=0x%lx",
 		  __entry->exit_nr, __entry->pc, __entry->msr, __entry->dar,
 		  __entry->srr1)
-);
+)
 
 TRACE_EVENT(kvm_book3s_reenter,
 	TP_PROTO(int r, struct kvm_vcpu *vcpu),
@@ -145,7 +145,7 @@ TRACE_EVENT(kvm_book3s_reenter,
 	),
 
 	TP_printk("reentry r=%d | pc=0x%lx", __entry->r, __entry->pc)
-);
+)
 
 #ifdef CONFIG_PPC_BOOK3S_64
 
@@ -177,7 +177,7 @@ TRACE_EVENT(kvm_book3s_64_mmu_map,
 	TP_printk("KVM: %c%c Map 0x%lx: [%lx] 0x%lx (0x%llx) -> %lx",
 		  __entry->flag_w, __entry->flag_x, __entry->eaddr,
 		  __entry->hpteg, __entry->va, __entry->vpage, __entry->hpaddr)
-);
+)
 
 #endif /* CONFIG_PPC_BOOK3S_64 */
 
@@ -208,7 +208,7 @@ TRACE_EVENT(kvm_book3s_mmu_map,
 	TP_printk("Map: hva=%llx pfn=%llx ea=%lx vp=%llx ra=%lx [%x]",
 		  __entry->host_va, __entry->pfn, __entry->eaddr,
 		  __entry->vpage, __entry->raddr, __entry->flags)
-);
+)
 
 TRACE_EVENT(kvm_book3s_mmu_invalidate,
 	TP_PROTO(struct hpte_cache *pte),
@@ -237,7 +237,7 @@ TRACE_EVENT(kvm_book3s_mmu_invalidate,
 	TP_printk("Flush: hva=%llx pfn=%llx ea=%lx vp=%llx ra=%lx [%x]",
 		  __entry->host_va, __entry->pfn, __entry->eaddr,
 		  __entry->vpage, __entry->raddr, __entry->flags)
-);
+)
 
 TRACE_EVENT(kvm_book3s_mmu_flush,
 	TP_PROTO(const char *type, struct kvm_vcpu *vcpu, unsigned long long p1,
@@ -260,7 +260,7 @@ TRACE_EVENT(kvm_book3s_mmu_flush,
 
 	TP_printk("Flush %d %sPTEs: %llx - %llx",
 		  __entry->count, __entry->type, __entry->p1, __entry->p2)
-);
+)
 
 TRACE_EVENT(kvm_book3s_slb_found,
 	TP_PROTO(unsigned long long gvsid, unsigned long long hvsid),
@@ -277,7 +277,7 @@ TRACE_EVENT(kvm_book3s_slb_found,
 	),
 
 	TP_printk("%llx -> %llx", __entry->gvsid, __entry->hvsid)
-);
+)
 
 TRACE_EVENT(kvm_book3s_slb_fail,
 	TP_PROTO(u16 sid_map_mask, unsigned long long gvsid),
@@ -295,7 +295,7 @@ TRACE_EVENT(kvm_book3s_slb_fail,
 
 	TP_printk("%x/%x: %llx", __entry->sid_map_mask,
 		  SID_MAP_MASK - __entry->sid_map_mask, __entry->gvsid)
-);
+)
 
 TRACE_EVENT(kvm_book3s_slb_map,
 	TP_PROTO(u16 sid_map_mask, unsigned long long gvsid,
@@ -316,7 +316,7 @@ TRACE_EVENT(kvm_book3s_slb_map,
 
 	TP_printk("%x: %llx -> %llx", __entry->sid_map_mask,
 		  __entry->guest_vsid, __entry->host_vsid)
-);
+)
 
 TRACE_EVENT(kvm_book3s_slbmte,
 	TP_PROTO(u64 slb_vsid, u64 slb_esid),
@@ -333,7 +333,7 @@ TRACE_EVENT(kvm_book3s_slbmte,
 	),
 
 	TP_printk("%llx, %llx", __entry->slb_vsid, __entry->slb_esid)
-);
+)
 
 #endif /* CONFIG_PPC_BOOK3S */
 
Index: linux-2.6-lttng/arch/x86/kvm/trace.h
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kvm/trace.h
+++ linux-2.6-lttng/arch/x86/kvm/trace.h
@@ -22,7 +22,7 @@ TRACE_EVENT(kvm_entry,
 	),
 
 	TP_printk("vcpu %u", __entry->vcpu_id)
-);
+)
 
 /*
  * Tracepoint for hypercall.
@@ -51,7 +51,7 @@ TRACE_EVENT(kvm_hypercall,
 	TP_printk("nr 0x%lx a0 0x%lx a1 0x%lx a2 0x%lx a3 0x%lx",
 		 __entry->nr, __entry->a0, __entry->a1,  __entry->a2,
 		 __entry->a3)
-);
+)
 
 /*
  * Tracepoint for hypercall.
@@ -83,7 +83,7 @@ TRACE_EVENT(kvm_hv_hypercall,
 		  __entry->code, __entry->fast ? "fast" : "slow",
 		  __entry->rep_cnt, __entry->rep_idx,  __entry->ingpa,
 		  __entry->outgpa)
-);
+)
 
 /*
  * Tracepoint for PIO.
@@ -110,7 +110,7 @@ TRACE_EVENT(kvm_pio,
 	TP_printk("pio_%s at 0x%x size %d count %d",
 		  __entry->rw ? "write" : "read",
 		  __entry->port, __entry->size, __entry->count)
-);
+)
 
 /*
  * Tracepoint for cpuid.
@@ -139,7 +139,7 @@ TRACE_EVENT(kvm_cpuid,
 	TP_printk("func %x rax %lx rbx %lx rcx %lx rdx %lx",
 		  __entry->function, __entry->rax,
 		  __entry->rbx, __entry->rcx, __entry->rdx)
-);
+)
 
 #define AREG(x) { APIC_##x, "APIC_" #x }
 
@@ -173,7 +173,7 @@ TRACE_EVENT(kvm_apic,
 		  __entry->rw ? "write" : "read",
 		  __print_symbolic(__entry->reg, kvm_trace_symbol_apic),
 		  __entry->val)
-);
+)
 
 #define trace_kvm_apic_read(reg, val)		trace_kvm_apic(0, reg, val)
 #define trace_kvm_apic_write(reg, val)		trace_kvm_apic(1, reg, val)
@@ -208,7 +208,7 @@ TRACE_EVENT(kvm_exit,
 		 ftrace_print_symbols_seq(p, __entry->exit_reason,
 					  kvm_x86_ops->exit_reasons_str),
 		 __entry->guest_rip, __entry->info1, __entry->info2)
-);
+)
 
 /*
  * Tracepoint for kvm interrupt injection:
@@ -226,7 +226,7 @@ TRACE_EVENT(kvm_inj_virq,
 	),
 
 	TP_printk("irq %u", __entry->irq)
-);
+)
 
 #define EXS(x) { x##_VECTOR, "#" #x }
 
@@ -258,7 +258,7 @@ TRACE_EVENT(kvm_inj_exception,
 		  __print_symbolic(__entry->exception, kvm_trace_sym_exc),
 		  /* FIXME: don't print error_code if not present */
 		  __entry->has_error ? __entry->error_code : 0)
-);
+)
 
 /*
  * Tracepoint for page fault.
@@ -279,7 +279,7 @@ TRACE_EVENT(kvm_page_fault,
 
 	TP_printk("address %lx error_code %x",
 		  __entry->fault_address, __entry->error_code)
-);
+)
 
 /*
  * Tracepoint for guest MSR access.
@@ -306,7 +306,7 @@ TRACE_EVENT(kvm_msr,
 		  __entry->write ? "write" : "read",
 		  __entry->ecx, __entry->data,
 		  __entry->exception ? " (#GP)" : "")
-);
+)
 
 #define trace_kvm_msr_read(ecx, data)      trace_kvm_msr(0, ecx, data, false)
 #define trace_kvm_msr_write(ecx, data)     trace_kvm_msr(1, ecx, data, false)
@@ -335,7 +335,7 @@ TRACE_EVENT(kvm_cr,
 	TP_printk("cr_%s %x = 0x%lx",
 		  __entry->rw ? "write" : "read",
 		  __entry->cr, __entry->val)
-);
+)
 
 #define trace_kvm_cr_read(cr, val)		trace_kvm_cr(0, cr, val)
 #define trace_kvm_cr_write(cr, val)		trace_kvm_cr(1, cr, val)
@@ -365,7 +365,7 @@ TRACE_EVENT(kvm_pic_set_irq,
 		  (__entry->elcr & (1 << __entry->pin)) ? "level":"edge",
 		  (__entry->imr & (1 << __entry->pin)) ? "|masked":"",
 		  __entry->coalesced ? " (coalesced)" : "")
-);
+)
 
 #define kvm_apic_dst_shorthand		\
 	{0x0, "dst"},			\
@@ -396,7 +396,7 @@ TRACE_EVENT(kvm_apic_ipi,
 		  (__entry->icr_low & (1<<15)) ? "level" : "edge",
 		  __print_symbolic((__entry->icr_low >> 18 & 0x3),
 				   kvm_apic_dst_shorthand))
-);
+)
 
 TRACE_EVENT(kvm_apic_accept_irq,
 	    TP_PROTO(__u32 apicid, __u16 dm, __u8 tm, __u8 vec, bool coalesced),
@@ -423,7 +423,7 @@ TRACE_EVENT(kvm_apic_accept_irq,
 		  __print_symbolic((__entry->dm >> 8 & 0x7), kvm_deliver_mode),
 		  __entry->tm ? "level" : "edge",
 		  __entry->coalesced ? " (coalesced)" : "")
-);
+)
 
 /*
  * Tracepoint for nested VMRUN
@@ -456,7 +456,7 @@ TRACE_EVENT(kvm_nested_vmrun,
 		__entry->rip, __entry->vmcb, __entry->nested_rip,
 		__entry->int_ctl, __entry->event_inj,
 		__entry->npt ? "on" : "off")
-);
+)
 
 TRACE_EVENT(kvm_nested_intercepts,
 	    TP_PROTO(__u16 cr_read, __u16 cr_write, __u32 exceptions, __u64 intercept),
@@ -479,7 +479,7 @@ TRACE_EVENT(kvm_nested_intercepts,
 	TP_printk("cr_read: %04x cr_write: %04x excp: %08x intercept: %016llx",
 		__entry->cr_read, __entry->cr_write, __entry->exceptions,
 		__entry->intercept)
-);
+)
 /*
  * Tracepoint for #VMEXIT while nested
  */
@@ -514,7 +514,7 @@ TRACE_EVENT(kvm_nested_vmexit,
 					   kvm_x86_ops->exit_reasons_str),
 		  __entry->exit_info1, __entry->exit_info2,
 		  __entry->exit_int_info, __entry->exit_int_info_err)
-);
+)
 
 /*
  * Tracepoint for #VMEXIT reinjected to the guest
@@ -548,7 +548,7 @@ TRACE_EVENT(kvm_nested_vmexit_inject,
 					   kvm_x86_ops->exit_reasons_str),
 		__entry->exit_info1, __entry->exit_info2,
 		__entry->exit_int_info, __entry->exit_int_info_err)
-);
+)
 
 /*
  * Tracepoint for nested #vmexit because of interrupt pending
@@ -566,7 +566,7 @@ TRACE_EVENT(kvm_nested_intr_vmexit,
 	),
 
 	TP_printk("rip: 0x%016llx", __entry->rip)
-);
+)
 
 /*
  * Tracepoint for nested #vmexit because of interrupt pending
@@ -589,7 +589,7 @@ TRACE_EVENT(kvm_invlpga,
 
 	TP_printk("rip: 0x%016llx asid: %d address: 0x%016llx",
 		  __entry->rip, __entry->asid, __entry->address)
-);
+)
 
 /*
  * Tracepoint for nested #vmexit because of interrupt pending
@@ -610,7 +610,7 @@ TRACE_EVENT(kvm_skinit,
 
 	TP_printk("rip: 0x%016llx slb: 0x%08x",
 		  __entry->rip, __entry->slb)
-);
+)
 
 #define __print_insn(insn, ilen) ({		                 \
 	int i;							 \
Index: linux-2.6-lttng/arch/x86/kvm/mmutrace.h
===================================================================
--- linux-2.6-lttng.orig/arch/x86/kvm/mmutrace.h
+++ linux-2.6-lttng/arch/x86/kvm/mmutrace.h
@@ -70,7 +70,7 @@ TRACE_EVENT(
 
 	TP_printk("addr %llx pferr %x %s", __entry->addr, __entry->pferr,
 		  __print_flags(__entry->pferr, "|", kvm_mmu_trace_pferr_flags))
-);
+)
 
 
 /* We just walked a paging element */
@@ -90,7 +90,7 @@ TRACE_EVENT(
 		),
 
 	TP_printk("pte %llx level %u", __entry->pte, __entry->level)
-);
+)
 
 DECLARE_EVENT_CLASS(kvm_mmu_set_bit_class,
 
@@ -108,7 +108,7 @@ DECLARE_EVENT_CLASS(kvm_mmu_set_bit_clas
 		),
 
 	TP_printk("gpa %llx", __entry->gpa)
-);
+)
 
 /* We set a pte accessed bit */
 DEFINE_EVENT(kvm_mmu_set_bit_class, kvm_mmu_set_accessed_bit,
@@ -116,7 +116,7 @@ DEFINE_EVENT(kvm_mmu_set_bit_class, kvm_
 	TP_PROTO(unsigned long table_gfn, unsigned index, unsigned size),
 
 	TP_ARGS(table_gfn, index, size)
-);
+)
 
 /* We set a pte dirty bit */
 DEFINE_EVENT(kvm_mmu_set_bit_class, kvm_mmu_set_dirty_bit,
@@ -124,7 +124,7 @@ DEFINE_EVENT(kvm_mmu_set_bit_class, kvm_
 	TP_PROTO(unsigned long table_gfn, unsigned index, unsigned size),
 
 	TP_ARGS(table_gfn, index, size)
-);
+)
 
 TRACE_EVENT(
 	kvm_mmu_walker_error,
@@ -141,7 +141,7 @@ TRACE_EVENT(
 
 	TP_printk("pferr %x %s", __entry->pferr,
 		  __print_flags(__entry->pferr, "|", kvm_mmu_trace_pferr_flags))
-);
+)
 
 TRACE_EVENT(
 	kvm_mmu_get_page,
@@ -160,7 +160,7 @@ TRACE_EVENT(
 
 	TP_printk("%s %s", KVM_MMU_PAGE_PRINTK(),
 		  __entry->created ? "new" : "existing")
-);
+)
 
 DECLARE_EVENT_CLASS(kvm_mmu_page_class,
 
@@ -176,25 +176,25 @@ DECLARE_EVENT_CLASS(kvm_mmu_page_class,
 	),
 
 	TP_printk("%s", KVM_MMU_PAGE_PRINTK())
-);
+)
 
 DEFINE_EVENT(kvm_mmu_page_class, kvm_mmu_sync_page,
 	TP_PROTO(struct kvm_mmu_page *sp),
 
 	TP_ARGS(sp)
-);
+)
 
 DEFINE_EVENT(kvm_mmu_page_class, kvm_mmu_unsync_page,
 	TP_PROTO(struct kvm_mmu_page *sp),
 
 	TP_ARGS(sp)
-);
+)
 
 DEFINE_EVENT(kvm_mmu_page_class, kvm_mmu_prepare_zap_page,
 	TP_PROTO(struct kvm_mmu_page *sp),
 
 	TP_ARGS(sp)
-);
+)
 
 TRACE_EVENT(
 	kvm_mmu_audit,
@@ -213,7 +213,7 @@ TRACE_EVENT(
 
 	TP_printk("vcpu:%d %s", __entry->vcpu->cpu,
 		  audit_point_name[__entry->audit_point])
-);
+)
 #endif /* _TRACE_KVMMMU_H */
 
 #undef TRACE_INCLUDE_PATH


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 09/32] trace event lock remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (6 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 08/32] trace event kvm " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 10/32] trace event mce " Mathieu Desnoyers
                   ` (23 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Peter Zijlstra

[-- Attachment #1: trace-event-lock-remove-semicolons.patch --]
[-- Type: text/plain, Size: 1465 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Peter Zijlstra <peterz@infradead.org>
---
 include/trace/events/lock.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6-lttng/include/trace/events/lock.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/lock.h
+++ linux-2.6-lttng/include/trace/events/lock.h
@@ -33,7 +33,7 @@ TRACE_EVENT(lock_acquire,
 		  (__entry->flags & 1) ? "try " : "",
 		  (__entry->flags & 2) ? "read " : "",
 		  __get_str(name))
-);
+)
 
 DECLARE_EVENT_CLASS(lock,
 
@@ -52,14 +52,14 @@ DECLARE_EVENT_CLASS(lock,
 	),
 
 	TP_printk("%p %s",  __entry->lockdep_addr, __get_str(name))
-);
+)
 
 DEFINE_EVENT(lock, lock_release,
 
 	TP_PROTO(struct lockdep_map *lock, unsigned long ip),
 
 	TP_ARGS(lock, ip)
-);
+)
 
 #ifdef CONFIG_LOCK_STAT
 
@@ -68,14 +68,14 @@ DEFINE_EVENT(lock, lock_contended,
 	TP_PROTO(struct lockdep_map *lock, unsigned long ip),
 
 	TP_ARGS(lock, ip)
-);
+)
 
 DEFINE_EVENT(lock, lock_acquired,
 
 	TP_PROTO(struct lockdep_map *lock, unsigned long ip),
 
 	TP_ARGS(lock, ip)
-);
+)
 
 #endif
 #endif


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 10/32] trace event mce remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (7 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 09/32] trace event lock " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 11/32] trace event module " Mathieu Desnoyers
                   ` (22 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Hidetoshi Seto

[-- Attachment #1: trace-event-mce-remove-semicolons.patch --]
[-- Type: text/plain, Size: 861 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
 include/trace/events/mce.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-lttng/include/trace/events/mce.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/mce.h
+++ linux-2.6-lttng/include/trace/events/mce.h
@@ -61,7 +61,7 @@ TRACE_EVENT(mce_record,
 		__entry->walltime,
 		__entry->socketid,
 		__entry->apicid)
-);
+)
 
 #endif /* _TRACE_MCE_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 11/32] trace event module remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (8 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 10/32] trace event mce " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 12/32] trace event napi " Mathieu Desnoyers
                   ` (21 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Li Zefan, Rusty Russell

[-- Attachment #1: trace-event-module-remove-semicolons.patch --]
[-- Type: text/plain, Size: 2196 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
---
 include/trace/events/module.h |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Index: linux-2.6-lttng/include/trace/events/module.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/module.h
+++ linux-2.6-lttng/include/trace/events/module.h
@@ -18,6 +18,9 @@
 
 #ifdef CONFIG_MODULES
 
+#ifndef _TRACE_MODULE_DEF_
+#define _TRACE_MODULE_DEF_
+
 struct module;
 
 #define show_module_flags(flags) __print_flags(flags, "",	\
@@ -25,6 +28,8 @@ struct module;
 	{ (1UL << TAINT_FORCED_MODULE),		"F" },		\
 	{ (1UL << TAINT_CRAP),			"C" })
 
+#endif /* _TRACE_MODULE_DEF_ */
+
 TRACE_EVENT(module_load,
 
 	TP_PROTO(struct module *mod),
@@ -42,7 +47,7 @@ TRACE_EVENT(module_load,
 	),
 
 	TP_printk("%s %s", __get_str(name), show_module_flags(__entry->taints))
-);
+)
 
 TRACE_EVENT(module_free,
 
@@ -59,7 +64,7 @@ TRACE_EVENT(module_free,
 	),
 
 	TP_printk("%s", __get_str(name))
-);
+)
 
 #ifdef CONFIG_MODULE_UNLOAD
 /* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */
@@ -84,21 +89,21 @@ DECLARE_EVENT_CLASS(module_refcnt,
 
 	TP_printk("%s call_site=%pf refcnt=%d",
 		  __get_str(name), (void *)__entry->ip, __entry->refcnt)
-);
+)
 
 DEFINE_EVENT(module_refcnt, module_get,
 
 	TP_PROTO(struct module *mod, unsigned long ip),
 
 	TP_ARGS(mod, ip)
-);
+)
 
 DEFINE_EVENT(module_refcnt, module_put,
 
 	TP_PROTO(struct module *mod, unsigned long ip),
 
 	TP_ARGS(mod, ip)
-);
+)
 #endif /* CONFIG_MODULE_UNLOAD */
 
 TRACE_EVENT(module_request,
@@ -121,7 +126,7 @@ TRACE_EVENT(module_request,
 
 	TP_printk("%s wait=%d call_site=%pf",
 		  __get_str(name), (int)__entry->wait, (void *)__entry->ip)
-);
+)
 
 #endif /* CONFIG_MODULES */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 12/32] trace event napi remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (9 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 11/32] trace event module " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03 12:26   ` Neil Horman
  2011-05-02 21:11 ` [RFC patch 13/32] trace event net " Mathieu Desnoyers
                   ` (20 subsequent siblings)
  31 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Neil Horman, David S. Miller, Koki Sanagi

[-- Attachment #1: trace-event-napi-remove-semicolons.patch --]
[-- Type: text/plain, Size: 962 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Neil Horman <nhorman@tuxdriver.com>
CC: David S. Miller <davem@davemloft.net>
CC: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
---
 include/trace/events/napi.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6-lttng/include/trace/events/napi.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/napi.h
+++ linux-2.6-lttng/include/trace/events/napi.h
@@ -28,7 +28,7 @@ TRACE_EVENT(napi_poll,
 
 	TP_printk("napi poll on napi struct %p for device %s",
 		__entry->napi, __get_str(dev_name))
-);
+)
 
 #undef NO_DEV
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 13/32] trace event net remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (10 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 12/32] trace event napi " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03 12:27   ` Neil Horman
  2011-05-02 21:11 ` [RFC patch 14/32] trace event power " Mathieu Desnoyers
                   ` (19 subsequent siblings)
  31 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Neil Horman, David S. Miller, Koki Sanagi

[-- Attachment #1: trace-event-net-remove-semicolons.patch --]
[-- Type: text/plain, Size: 1414 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Neil Horman <nhorman@tuxdriver.com>
CC: David S. Miller <davem@davemloft.net>
CC: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
---
 include/trace/events/net.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6-lttng/include/trace/events/net.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/net.h
+++ linux-2.6-lttng/include/trace/events/net.h
@@ -32,7 +32,7 @@ TRACE_EVENT(net_dev_xmit,
 
 	TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
 		__get_str(name), __entry->skbaddr, __entry->len, __entry->rc)
-);
+)
 
 DECLARE_EVENT_CLASS(net_dev_template,
 
@@ -61,21 +61,21 @@ DEFINE_EVENT(net_dev_template, net_dev_q
 	TP_PROTO(struct sk_buff *skb),
 
 	TP_ARGS(skb)
-);
+)
 
 DEFINE_EVENT(net_dev_template, netif_receive_skb,
 
 	TP_PROTO(struct sk_buff *skb),
 
 	TP_ARGS(skb)
-);
+)
 
 DEFINE_EVENT(net_dev_template, netif_rx,
 
 	TP_PROTO(struct sk_buff *skb),
 
 	TP_ARGS(skb)
-);
+)
 #endif /* _TRACE_NET_H */
 
 /* This part must be outside protection */


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 14/32] trace event power remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (11 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 13/32] trace event net " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03 12:59   ` Pihet-XID, Jean
  2011-05-02 21:11 ` [RFC patch 15/32] trace event sched remove trailing semicolon Mathieu Desnoyers
                   ` (18 subsequent siblings)
  31 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Jean Pihet, Arjan van de Ven, Thomas Renninger,
	Len Brown

[-- Attachment #1: trace-event-power-remove-semicolons.patch --]
[-- Type: text/plain, Size: 3581 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Jean Pihet <j-pihet@ti.com>
CC: Arjan van de Ven <arjan@linux.intel.com>
CC: Thomas Renninger <trenn@suse.de>
CC: Len Brown <len.brown@intel.com>
---
 include/trace/events/power.h |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

Index: linux-2.6-lttng/include/trace/events/power.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/power.h
+++ linux-2.6-lttng/include/trace/events/power.h
@@ -25,14 +25,14 @@ DECLARE_EVENT_CLASS(cpu,
 
 	TP_printk("state=%lu cpu_id=%lu", (unsigned long)__entry->state,
 		  (unsigned long)__entry->cpu_id)
-);
+)
 
 DEFINE_EVENT(cpu, cpu_idle,
 
 	TP_PROTO(unsigned int state, unsigned int cpu_id),
 
 	TP_ARGS(state, cpu_id)
-);
+)
 
 /* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */
 #ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING
@@ -46,7 +46,7 @@ DEFINE_EVENT(cpu, cpu_frequency,
 	TP_PROTO(unsigned int frequency, unsigned int cpu_id),
 
 	TP_ARGS(frequency, cpu_id)
-);
+)
 
 TRACE_EVENT(machine_suspend,
 
@@ -63,7 +63,7 @@ TRACE_EVENT(machine_suspend,
 	),
 
 	TP_printk("state=%lu", (unsigned long)__entry->state)
-);
+)
 
 /* This code will be removed after deprecation time exceeded (2.6.41) */
 #ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED
@@ -92,21 +92,21 @@ DECLARE_EVENT_CLASS(power,
 
 	TP_printk("type=%lu state=%lu cpu_id=%lu", (unsigned long)__entry->type,
 		(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
-);
+)
 
 DEFINE_EVENT(power, power_start,
 
 	TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
 
 	TP_ARGS(type, state, cpu_id)
-);
+)
 
 DEFINE_EVENT(power, power_frequency,
 
 	TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
 
 	TP_ARGS(type, state, cpu_id)
-);
+)
 
 TRACE_EVENT(power_end,
 
@@ -124,7 +124,7 @@ TRACE_EVENT(power_end,
 
 	TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id)
 
-);
+)
 
 /* Deprecated dummy functions must be protected against multi-declartion */
 #ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED
@@ -180,28 +180,28 @@ DECLARE_EVENT_CLASS(clock,
 
 	TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
 		(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
-);
+)
 
 DEFINE_EVENT(clock, clock_enable,
 
 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
 
 	TP_ARGS(name, state, cpu_id)
-);
+)
 
 DEFINE_EVENT(clock, clock_disable,
 
 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
 
 	TP_ARGS(name, state, cpu_id)
-);
+)
 
 DEFINE_EVENT(clock, clock_set_rate,
 
 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
 
 	TP_ARGS(name, state, cpu_id)
-);
+)
 
 /*
  * The power domain events are used for power domains transitions
@@ -226,14 +226,14 @@ DECLARE_EVENT_CLASS(power_domain,
 
 	TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
 		(unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
-);
+)
 
 DEFINE_EVENT(power_domain, power_domain_target,
 
 	TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
 
 	TP_ARGS(name, state, cpu_id)
-);
+)
 #endif /* _TRACE_POWER_H */
 
 /* This part must be outside protection */


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 15/32] trace event sched remove trailing semicolon
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (12 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 14/32] trace event power " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 16/32] trace event scsi remove semicolons Mathieu Desnoyers
                   ` (17 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Peter Zijlstra

[-- Attachment #1: trace-event-sched-remove-semicolons.patch --]
[-- Type: text/plain, Size: 6318 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes. Remove the trailing
semicolons at the end of TRACE_EVENT() and DEFINE_EVENT() in scheduler
instrumentation. Put __trace_sched_switch_state() static inline declaration
within ifdef protection so the preprocessor output is not polluted when creating
an array of events.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Peter Zijlstra <peterz@infradead.org>
---
 include/trace/events/sched.h |   77 ++++++++++++++++++++++---------------------
 1 file changed, 41 insertions(+), 36 deletions(-)

Index: linux-2.6-lttng/include/trace/events/sched.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/sched.h
+++ linux-2.6-lttng/include/trace/events/sched.h
@@ -7,6 +7,28 @@
 #include <linux/sched.h>
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_SCHED_DEF_
+#define _TRACE_SCHED_DEF_
+
+#ifdef CREATE_TRACE_POINTS
+static inline long __trace_sched_switch_state(struct task_struct *p)
+{
+	long state = p->state;
+
+#ifdef CONFIG_PREEMPT
+	/*
+	 * For all intents and purposes a preempted task is a running task.
+	 */
+	if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
+		state = TASK_RUNNING;
+#endif
+
+	return state;
+}
+#endif
+
+#endif /* _TRACE_SCHED_DEF_ */
+
 /*
  * Tracepoint for calling kthread_stop, performed to end a kthread:
  */
@@ -27,7 +49,7 @@ TRACE_EVENT(sched_kthread_stop,
 	),
 
 	TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid)
-);
+)
 
 /*
  * Tracepoint for the return value of the kthread stopping:
@@ -47,7 +69,7 @@ TRACE_EVENT(sched_kthread_stop_ret,
 	),
 
 	TP_printk("ret=%d", __entry->ret)
-);
+)
 
 /*
  * Tracepoint for waking up a task:
@@ -77,35 +99,18 @@ DECLARE_EVENT_CLASS(sched_wakeup_templat
 	TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d",
 		  __entry->comm, __entry->pid, __entry->prio,
 		  __entry->success, __entry->target_cpu)
-);
+)
 
 DEFINE_EVENT(sched_wakeup_template, sched_wakeup,
 	     TP_PROTO(struct task_struct *p, int success),
-	     TP_ARGS(p, success));
+	     TP_ARGS(p, success))
 
 /*
  * Tracepoint for waking up a new task:
  */
 DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new,
 	     TP_PROTO(struct task_struct *p, int success),
-	     TP_ARGS(p, success));
-
-#ifdef CREATE_TRACE_POINTS
-static inline long __trace_sched_switch_state(struct task_struct *p)
-{
-	long state = p->state;
-
-#ifdef CONFIG_PREEMPT
-	/*
-	 * For all intents and purposes a preempted task is a running task.
-	 */
-	if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
-		state = TASK_RUNNING;
-#endif
-
-	return state;
-}
-#endif
+	     TP_ARGS(p, success))
 
 /*
  * Tracepoint for task switches, performed by the scheduler:
@@ -145,7 +150,7 @@ TRACE_EVENT(sched_switch,
 				{ 16, "Z" }, { 32, "X" }, { 64, "x" },
 				{ 128, "W" }) : "R",
 		__entry->next_comm, __entry->next_pid, __entry->next_prio)
-);
+)
 
 /*
  * Tracepoint for a task being migrated:
@@ -175,7 +180,7 @@ TRACE_EVENT(sched_migrate_task,
 	TP_printk("comm=%s pid=%d prio=%d orig_cpu=%d dest_cpu=%d",
 		  __entry->comm, __entry->pid, __entry->prio,
 		  __entry->orig_cpu, __entry->dest_cpu)
-);
+)
 
 DECLARE_EVENT_CLASS(sched_process_template,
 
@@ -197,14 +202,14 @@ DECLARE_EVENT_CLASS(sched_process_templa
 
 	TP_printk("comm=%s pid=%d prio=%d",
 		  __entry->comm, __entry->pid, __entry->prio)
-);
+)
 
 /*
  * Tracepoint for freeing a task:
  */
 DEFINE_EVENT(sched_process_template, sched_process_free,
 	     TP_PROTO(struct task_struct *p),
-	     TP_ARGS(p));
+	     TP_ARGS(p))
 	     
 
 /*
@@ -212,14 +217,14 @@ DEFINE_EVENT(sched_process_template, sch
  */
 DEFINE_EVENT(sched_process_template, sched_process_exit,
 	     TP_PROTO(struct task_struct *p),
-	     TP_ARGS(p));
+	     TP_ARGS(p))
 
 /*
  * Tracepoint for waiting on task to unschedule:
  */
 DEFINE_EVENT(sched_process_template, sched_wait_task,
 	TP_PROTO(struct task_struct *p),
-	TP_ARGS(p));
+	TP_ARGS(p))
 
 /*
  * Tracepoint for a waiting task:
@@ -244,7 +249,7 @@ TRACE_EVENT(sched_process_wait,
 
 	TP_printk("comm=%s pid=%d prio=%d",
 		  __entry->comm, __entry->pid, __entry->prio)
-);
+)
 
 /*
  * Tracepoint for do_fork:
@@ -272,7 +277,7 @@ TRACE_EVENT(sched_process_fork,
 	TP_printk("comm=%s pid=%d child_comm=%s child_pid=%d",
 		__entry->parent_comm, __entry->parent_pid,
 		__entry->child_comm, __entry->child_pid)
-);
+)
 
 /*
  * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE
@@ -302,7 +307,7 @@ DECLARE_EVENT_CLASS(sched_stat_template,
 	TP_printk("comm=%s pid=%d delay=%Lu [ns]",
 			__entry->comm, __entry->pid,
 			(unsigned long long)__entry->delay)
-);
+)
 
 
 /*
@@ -311,7 +316,7 @@ DECLARE_EVENT_CLASS(sched_stat_template,
  */
 DEFINE_EVENT(sched_stat_template, sched_stat_wait,
 	     TP_PROTO(struct task_struct *tsk, u64 delay),
-	     TP_ARGS(tsk, delay));
+	     TP_ARGS(tsk, delay))
 
 /*
  * Tracepoint for accounting sleep time (time the task is not runnable,
@@ -319,7 +324,7 @@ DEFINE_EVENT(sched_stat_template, sched_
  */
 DEFINE_EVENT(sched_stat_template, sched_stat_sleep,
 	     TP_PROTO(struct task_struct *tsk, u64 delay),
-	     TP_ARGS(tsk, delay));
+	     TP_ARGS(tsk, delay))
 
 /*
  * Tracepoint for accounting iowait time (time the task is not runnable
@@ -327,7 +332,7 @@ DEFINE_EVENT(sched_stat_template, sched_
  */
 DEFINE_EVENT(sched_stat_template, sched_stat_iowait,
 	     TP_PROTO(struct task_struct *tsk, u64 delay),
-	     TP_ARGS(tsk, delay));
+	     TP_ARGS(tsk, delay))
 
 /*
  * Tracepoint for accounting runtime (time the task is executing
@@ -360,7 +365,7 @@ TRACE_EVENT(sched_stat_runtime,
 			__entry->comm, __entry->pid,
 			(unsigned long long)__entry->runtime,
 			(unsigned long long)__entry->vruntime)
-);
+)
 
 /*
  * Tracepoint for showing priority inheritance modifying a tasks
@@ -389,7 +394,7 @@ TRACE_EVENT(sched_pi_setprio,
 	TP_printk("comm=%s pid=%d oldprio=%d newprio=%d",
 			__entry->comm, __entry->pid,
 			__entry->oldprio, __entry->newprio)
-);
+)
 
 #endif /* _TRACE_SCHED_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 16/32] trace event scsi remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (13 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 15/32] trace event sched remove trailing semicolon Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 17/32] trace event signal " Mathieu Desnoyers
                   ` (16 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Xiao Guangrong, Tomohiro Kusumi, Kei Tokunaga,
	James Bottomley, Martin K. Petersen

[-- Attachment #1: trace-event-scsi-remove-semicolons.patch --]
[-- Type: text/plain, Size: 2723 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
CC: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
CC: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
CC: James Bottomley <James.Bottomley@suse.de>
CC: Martin K. Petersen <martin.petersen@oracle.com>
---
 include/trace/events/scsi.h |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

Index: linux-2.6-lttng/include/trace/events/scsi.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/scsi.h
+++ linux-2.6-lttng/include/trace/events/scsi.h
@@ -9,6 +9,9 @@
 #include <linux/tracepoint.h>
 #include <linux/trace_seq.h>
 
+#ifndef _TRACE_SCSI_DEF_
+#define _TRACE_SCSI_DEF_
+
 #define scsi_opcode_name(opcode)	{ opcode, #opcode }
 #define show_opcode_name(val)					\
 	__print_symbolic(val,					\
@@ -198,6 +201,8 @@
 const char *scsi_trace_parse_cdb(struct trace_seq*, unsigned char*, int);
 #define __parse_cdb(cdb, len) scsi_trace_parse_cdb(p, cdb, len)
 
+#endif /* _TRACE_SCSI_DEF_ */
+
 TRACE_EVENT(scsi_dispatch_cmd_start,
 
 	TP_PROTO(struct scsi_cmnd *cmd),
@@ -238,7 +243,7 @@ TRACE_EVENT(scsi_dispatch_cmd_start,
 		  show_opcode_name(__entry->opcode),
 		  __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len),
 		  __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len))
-);
+)
 
 TRACE_EVENT(scsi_dispatch_cmd_error,
 
@@ -283,7 +288,7 @@ TRACE_EVENT(scsi_dispatch_cmd_error,
 		  __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len),
 		  __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len),
 		  __entry->rtn)
-);
+)
 
 DECLARE_EVENT_CLASS(scsi_cmd_done_timeout_template,
 
@@ -332,15 +337,15 @@ DECLARE_EVENT_CLASS(scsi_cmd_done_timeou
 		  show_hostbyte_name(((__entry->result) >> 16) & 0xff),
 		  show_msgbyte_name(((__entry->result) >> 8) & 0xff),
 		  show_statusbyte_name(__entry->result & 0xff))
-);
+)
 
 DEFINE_EVENT(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_done,
 	     TP_PROTO(struct scsi_cmnd *cmd),
-	     TP_ARGS(cmd));
+	     TP_ARGS(cmd))
 
 DEFINE_EVENT(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_timeout,
 	     TP_PROTO(struct scsi_cmnd *cmd),
-	     TP_ARGS(cmd));
+	     TP_ARGS(cmd))
 
 TRACE_EVENT(scsi_eh_wakeup,
 
@@ -357,7 +362,7 @@ TRACE_EVENT(scsi_eh_wakeup,
 	),
 
 	TP_printk("host_no=%u", __entry->host_no)
-);
+)
 
 #endif /*  _TRACE_SCSI_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 17/32] trace event signal remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (14 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 16/32] trace event scsi remove semicolons Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 18/32] trace event skb " Mathieu Desnoyers
                   ` (15 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Li Zefan, Masami Hiramatsu, Roland McGrath,
	Oleg Nesterov

[-- Attachment #1: trace-event-signal-remove-semicolons.patch --]
[-- Type: text/plain, Size: 2009 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Masami Hiramatsu <mhiramat@redhat.com>
CC: Roland McGrath <roland@redhat.com>
CC: Oleg Nesterov <oleg@redhat.com>
---
 include/trace/events/signal.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6-lttng/include/trace/events/signal.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/signal.h
+++ linux-2.6-lttng/include/trace/events/signal.h
@@ -59,7 +59,7 @@ TRACE_EVENT(signal_generate,
 	TP_printk("sig=%d errno=%d code=%d comm=%s pid=%d",
 		  __entry->sig, __entry->errno, __entry->code,
 		  __entry->comm, __entry->pid)
-);
+)
 
 /**
  * signal_deliver - called when a signal is delivered
@@ -99,7 +99,7 @@ TRACE_EVENT(signal_deliver,
 	TP_printk("sig=%d errno=%d code=%d sa_handler=%lx sa_flags=%lx",
 		  __entry->sig, __entry->errno, __entry->code,
 		  __entry->sa_handler, __entry->sa_flags)
-);
+)
 
 DECLARE_EVENT_CLASS(signal_queue_overflow,
 
@@ -122,7 +122,7 @@ DECLARE_EVENT_CLASS(signal_queue_overflo
 
 	TP_printk("sig=%d group=%d errno=%d code=%d",
 		  __entry->sig, __entry->group, __entry->errno, __entry->code)
-);
+)
 
 /**
  * signal_overflow_fail - called when signal queue is overflow
@@ -140,7 +140,7 @@ DEFINE_EVENT(signal_queue_overflow, sign
 	TP_PROTO(int sig, int group, struct siginfo *info),
 
 	TP_ARGS(sig, group, info)
-);
+)
 
 /**
  * signal_lose_info - called when siginfo is lost
@@ -158,7 +158,7 @@ DEFINE_EVENT(signal_queue_overflow, sign
 	TP_PROTO(int sig, int group, struct siginfo *info),
 
 	TP_ARGS(sig, group, info)
-);
+)
 
 #endif /* _TRACE_SIGNAL_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 18/32] trace event skb remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (15 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 17/32] trace event signal " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03 12:27   ` Neil Horman
  2011-05-02 21:11 ` [RFC patch 19/32] trace event syscalls " Mathieu Desnoyers
                   ` (14 subsequent siblings)
  31 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Koki Sanagi, Neil Horman, David S. Miller

[-- Attachment #1: trace-event-skb-remove-semicolons.patch --]
[-- Type: text/plain, Size: 1296 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
CC: Neil Horman <nhorman@tuxdriver.com>
CC: David S. Miller <davem@davemloft.net>
---
 include/trace/events/skb.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6-lttng/include/trace/events/skb.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/skb.h
+++ linux-2.6-lttng/include/trace/events/skb.h
@@ -31,7 +31,7 @@ TRACE_EVENT(kfree_skb,
 
 	TP_printk("skbaddr=%p protocol=%u location=%p",
 		__entry->skbaddr, __entry->protocol, __entry->location)
-);
+)
 
 TRACE_EVENT(consume_skb,
 
@@ -48,7 +48,7 @@ TRACE_EVENT(consume_skb,
 	),
 
 	TP_printk("skbaddr=%p", __entry->skbaddr)
-);
+)
 
 TRACE_EVENT(skb_copy_datagram_iovec,
 
@@ -67,7 +67,7 @@ TRACE_EVENT(skb_copy_datagram_iovec,
 	),
 
 	TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len)
-);
+)
 
 #endif /* _TRACE_SKB_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 19/32] trace event syscalls remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (16 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 18/32] trace event skb " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 20/32] trace event timer " Mathieu Desnoyers
                   ` (13 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Josh Stone

[-- Attachment #1: trace-event-syscalls-remove-semicolons.patch --]
[-- Type: text/plain, Size: 1428 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Josh Stone <jistone@redhat.com>
---
 include/trace/events/syscalls.h |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6-lttng/include/trace/events/syscalls.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/syscalls.h
+++ linux-2.6-lttng/include/trace/events/syscalls.h
@@ -13,9 +13,14 @@
 
 #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
 
+#ifndef _TRACE_SYSCALLS_DEF_
+#define _TRACE_SYSCALLS_DEF_
+
 extern void syscall_regfunc(void);
 extern void syscall_unregfunc(void);
 
+#endif /* _TRACE_SYSCALLS_DEF_ */
+
 TRACE_EVENT_FN(sys_enter,
 
 	TP_PROTO(struct pt_regs *regs, long id),
@@ -38,7 +43,7 @@ TRACE_EVENT_FN(sys_enter,
 		  __entry->args[3], __entry->args[4], __entry->args[5]),
 
 	syscall_regfunc, syscall_unregfunc
-);
+)
 
 TRACE_EVENT_FLAGS(sys_enter, TRACE_EVENT_FL_CAP_ANY)
 
@@ -62,7 +67,7 @@ TRACE_EVENT_FN(sys_exit,
 		  __entry->id, __entry->ret),
 
 	syscall_regfunc, syscall_unregfunc
-);
+)
 
 TRACE_EVENT_FLAGS(sys_exit, TRACE_EVENT_FL_CAP_ANY)
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 20/32] trace event timer remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (17 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 19/32] trace event syscalls " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 21/32] trace event vmscan " Mathieu Desnoyers
                   ` (12 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Xiao Guangrong, Li Zefan, Arjan van de Ven

[-- Attachment #1: trace-event-timer-remove-semicolons.patch --]
[-- Type: text/plain, Size: 3903 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Arjan van de Ven <arjan@linux.intel.com>
---
 include/trace/events/timer.h |   28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

Index: linux-2.6-lttng/include/trace/events/timer.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/timer.h
+++ linux-2.6-lttng/include/trace/events/timer.h
@@ -23,7 +23,7 @@ DECLARE_EVENT_CLASS(timer_class,
 	),
 
 	TP_printk("timer=%p", __entry->timer)
-);
+)
 
 /**
  * timer_init - called when the timer is initialized
@@ -34,7 +34,7 @@ DEFINE_EVENT(timer_class, timer_init,
 	TP_PROTO(struct timer_list *timer),
 
 	TP_ARGS(timer)
-);
+)
 
 /**
  * timer_start - called when the timer is started
@@ -64,7 +64,7 @@ TRACE_EVENT(timer_start,
 	TP_printk("timer=%p function=%pf expires=%lu [timeout=%ld]",
 		  __entry->timer, __entry->function, __entry->expires,
 		  (long)__entry->expires - __entry->now)
-);
+)
 
 /**
  * timer_expire_entry - called immediately before the timer callback
@@ -91,7 +91,7 @@ TRACE_EVENT(timer_expire_entry,
 	),
 
 	TP_printk("timer=%p function=%pf now=%lu", __entry->timer, __entry->function,__entry->now)
-);
+)
 
 /**
  * timer_expire_exit - called immediately after the timer callback returns
@@ -108,7 +108,7 @@ DEFINE_EVENT(timer_class, timer_expire_e
 	TP_PROTO(struct timer_list *timer),
 
 	TP_ARGS(timer)
-);
+)
 
 /**
  * timer_cancel - called when the timer is canceled
@@ -119,7 +119,7 @@ DEFINE_EVENT(timer_class, timer_cancel,
 	TP_PROTO(struct timer_list *timer),
 
 	TP_ARGS(timer)
-);
+)
 
 /**
  * hrtimer_init - called when the hrtimer is initialized
@@ -151,7 +151,7 @@ TRACE_EVENT(hrtimer_init,
 			"CLOCK_REALTIME" : "CLOCK_MONOTONIC",
 		  __entry->mode == HRTIMER_MODE_ABS ?
 			"HRTIMER_MODE_ABS" : "HRTIMER_MODE_REL")
-);
+)
 
 /**
  * hrtimer_start - called when the hrtimer is started
@@ -183,7 +183,7 @@ TRACE_EVENT(hrtimer_start,
 				  .tv64 = __entry->expires }),
 		  (unsigned long long)ktime_to_ns((ktime_t) {
 				  .tv64 = __entry->softexpires }))
-);
+)
 
 /**
  * htimmer_expire_entry - called immediately before the hrtimer callback
@@ -213,7 +213,7 @@ TRACE_EVENT(hrtimer_expire_entry,
 
 	TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function,
 		  (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now }))
- );
+)
 
 DECLARE_EVENT_CLASS(hrtimer_class,
 
@@ -230,7 +230,7 @@ DECLARE_EVENT_CLASS(hrtimer_class,
 	),
 
 	TP_printk("hrtimer=%p", __entry->hrtimer)
-);
+)
 
 /**
  * hrtimer_expire_exit - called immediately after the hrtimer callback returns
@@ -244,7 +244,7 @@ DEFINE_EVENT(hrtimer_class, hrtimer_expi
 	TP_PROTO(struct hrtimer *hrtimer),
 
 	TP_ARGS(hrtimer)
-);
+)
 
 /**
  * hrtimer_cancel - called when the hrtimer is canceled
@@ -255,7 +255,7 @@ DEFINE_EVENT(hrtimer_class, hrtimer_canc
 	TP_PROTO(struct hrtimer *hrtimer),
 
 	TP_ARGS(hrtimer)
-);
+)
 
 /**
  * itimer_state - called when itimer is started or canceled
@@ -293,7 +293,7 @@ TRACE_EVENT(itimer_state,
 		  __entry->which, (unsigned long long)__entry->expires,
 		  __entry->value_sec, __entry->value_usec,
 		  __entry->interval_sec, __entry->interval_usec)
-);
+)
 
 /**
  * itimer_expire - called when itimer expires
@@ -321,7 +321,7 @@ TRACE_EVENT(itimer_expire,
 
 	TP_printk("which=%d pid=%d now=%llu", __entry->which,
 		  (int) __entry->pid, (unsigned long long)__entry->now)
-);
+)
 
 #endif /*  _TRACE_TIMER_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 21/32] trace event vmscan remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (18 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 20/32] trace event timer " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 22/32] trace event workqueue " Mathieu Desnoyers
                   ` (11 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Mel Gorman, Rik van Riel, Larry Woodman,
	KOSAKI Motohiro

[-- Attachment #1: trace-event-vmscan-remove-semicolons.patch --]
[-- Type: text/plain, Size: 4013 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Mel Gorman <mel@csn.ul.ie>
CC: Rik van Riel <riel@redhat.com>
CC: Larry Woodman <lwoodman@redhat.com>
CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 include/trace/events/vmscan.h |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Index: linux-2.6-lttng/include/trace/events/vmscan.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/vmscan.h
+++ linux-2.6-lttng/include/trace/events/vmscan.h
@@ -49,7 +49,7 @@ TRACE_EVENT(mm_vmscan_kswapd_sleep,
 	),
 
 	TP_printk("nid=%d", __entry->nid)
-);
+)
 
 TRACE_EVENT(mm_vmscan_kswapd_wake,
 
@@ -68,7 +68,7 @@ TRACE_EVENT(mm_vmscan_kswapd_wake,
 	),
 
 	TP_printk("nid=%d order=%d", __entry->nid, __entry->order)
-);
+)
 
 TRACE_EVENT(mm_vmscan_wakeup_kswapd,
 
@@ -92,7 +92,7 @@ TRACE_EVENT(mm_vmscan_wakeup_kswapd,
 		__entry->nid,
 		__entry->zid,
 		__entry->order)
-);
+)
 
 DECLARE_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template,
 
@@ -116,28 +116,28 @@ DECLARE_EVENT_CLASS(mm_vmscan_direct_rec
 		__entry->order,
 		__entry->may_writepage,
 		show_gfp_flags(__entry->gfp_flags))
-);
+)
 
 DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin,
 
 	TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
 
 	TP_ARGS(order, may_writepage, gfp_flags)
-);
+)
 
 DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin,
 
 	TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
 
 	TP_ARGS(order, may_writepage, gfp_flags)
-);
+)
 
 DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin,
 
 	TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
 
 	TP_ARGS(order, may_writepage, gfp_flags)
-);
+)
 
 DECLARE_EVENT_CLASS(mm_vmscan_direct_reclaim_end_template,
 
@@ -154,28 +154,28 @@ DECLARE_EVENT_CLASS(mm_vmscan_direct_rec
 	),
 
 	TP_printk("nr_reclaimed=%lu", __entry->nr_reclaimed)
-);
+)
 
 DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_direct_reclaim_end,
 
 	TP_PROTO(unsigned long nr_reclaimed),
 
 	TP_ARGS(nr_reclaimed)
-);
+)
 
 DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_reclaim_end,
 
 	TP_PROTO(unsigned long nr_reclaimed),
 
 	TP_ARGS(nr_reclaimed)
-);
+)
 
 DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_reclaim_end,
 
 	TP_PROTO(unsigned long nr_reclaimed),
 
 	TP_ARGS(nr_reclaimed)
-);
+)
 
 
 DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template,
@@ -222,7 +222,7 @@ DECLARE_EVENT_CLASS(mm_vmscan_lru_isolat
 		__entry->nr_lumpy_taken,
 		__entry->nr_lumpy_dirty,
 		__entry->nr_lumpy_failed)
-);
+)
 
 DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
 
@@ -237,7 +237,7 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_templ
 
 	TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode)
 
-);
+)
 
 DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
 
@@ -252,7 +252,7 @@ DEFINE_EVENT(mm_vmscan_lru_isolate_templ
 
 	TP_ARGS(order, nr_requested, nr_scanned, nr_taken, nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed, isolate_mode)
 
-);
+)
 
 TRACE_EVENT(mm_vmscan_writepage,
 
@@ -275,7 +275,7 @@ TRACE_EVENT(mm_vmscan_writepage,
 		__entry->page,
 		page_to_pfn(__entry->page),
 		show_reclaim_flags(__entry->reclaim_flags))
-);
+)
 
 TRACE_EVENT(mm_vmscan_lru_shrink_inactive,
 
@@ -308,7 +308,7 @@ TRACE_EVENT(mm_vmscan_lru_shrink_inactiv
 		__entry->nr_scanned, __entry->nr_reclaimed,
 		__entry->priority,
 		show_reclaim_flags(__entry->reclaim_flags))
-);
+)
 
 
 #endif /* _TRACE_VMSCAN_H */


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 22/32] trace event workqueue remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (19 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 21/32] trace event vmscan " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03  8:25   ` Tejun Heo
  2011-05-02 21:11 ` [RFC patch 23/32] trace event writeback " Mathieu Desnoyers
                   ` (10 subsequent siblings)
  31 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Tejun Heo, Arjan van de Ven

[-- Attachment #1: trace-event-workqueue-remove-semicolons.patch --]
[-- Type: text/plain, Size: 1862 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Tejun Heo <tj@kernel.org>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Arjan van de Ven <arjan@linux.intel.com>
---
 include/trace/events/workqueue.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6-lttng/include/trace/events/workqueue.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/workqueue.h
+++ linux-2.6-lttng/include/trace/events/workqueue.h
@@ -22,7 +22,7 @@ DECLARE_EVENT_CLASS(workqueue_work,
 	),
 
 	TP_printk("work struct %p", __entry->work)
-);
+)
 
 /**
  * workqueue_queue_work - called when a work gets queued
@@ -60,7 +60,7 @@ TRACE_EVENT(workqueue_queue_work,
 	TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u",
 		  __entry->work, __entry->function, __entry->workqueue,
 		  __entry->req_cpu, __entry->cpu)
-);
+)
 
 /**
  * workqueue_activate_work - called when a work gets activated
@@ -75,7 +75,7 @@ DEFINE_EVENT(workqueue_work, workqueue_a
 	TP_PROTO(struct work_struct *work),
 
 	TP_ARGS(work)
-);
+)
 
 /**
  * workqueue_execute_start - called immediately before the workqueue callback
@@ -100,7 +100,7 @@ TRACE_EVENT(workqueue_execute_start,
 	),
 
 	TP_printk("work struct %p: function %pf", __entry->work, __entry->function)
-);
+)
 
 /**
  * workqueue_execute_end - called immediately before the workqueue callback
@@ -113,7 +113,7 @@ DEFINE_EVENT(workqueue_work, workqueue_e
 	TP_PROTO(struct work_struct *work),
 
 	TP_ARGS(work)
-);
+)
 
 #endif /*  _TRACE_WORKQUEUE_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 23/32] trace event writeback remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (20 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 22/32] trace event workqueue " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 24/32] trace event wireless " Mathieu Desnoyers
                   ` (9 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Mel Gorman, Dave Chinner, Jens Axboe,
	Jeff Moyer

[-- Attachment #1: trace-event-writeback-remove-semicolons.patch --]
[-- Type: text/plain, Size: 4653 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Mel Gorman <mel@csn.ul.ie>
CC: Dave Chinner <dchinner@redhat.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Jeff Moyer <jmoyer@redhat.com>
---
 include/trace/events/writeback.h |   53 +++++++++++++++++++++------------------
 1 file changed, 29 insertions(+), 24 deletions(-)

Index: linux-2.6-lttng/include/trace/events/writeback.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/writeback.h
+++ linux-2.6-lttng/include/trace/events/writeback.h
@@ -8,8 +8,13 @@
 #include <linux/device.h>
 #include <linux/writeback.h>
 
+#ifndef _TRACE_WRITEBACK_DEF_
+#define _TRACE_WRITEBACK_DEF_
+
 struct wb_writeback_work;
 
+#endif /* _TRACE_WRITEBACK_DEF_ */
+
 DECLARE_EVENT_CLASS(writeback_work_class,
 	TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work),
 	TP_ARGS(bdi, work),
@@ -41,14 +46,14 @@ DECLARE_EVENT_CLASS(writeback_work_class
 		  __entry->range_cyclic,
 		  __entry->for_background
 	)
-);
+)
 #define DEFINE_WRITEBACK_WORK_EVENT(name) \
 DEFINE_EVENT(writeback_work_class, name, \
 	TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \
 	TP_ARGS(bdi, work))
-DEFINE_WRITEBACK_WORK_EVENT(writeback_nothread);
-DEFINE_WRITEBACK_WORK_EVENT(writeback_queue);
-DEFINE_WRITEBACK_WORK_EVENT(writeback_exec);
+DEFINE_WRITEBACK_WORK_EVENT(writeback_nothread)
+DEFINE_WRITEBACK_WORK_EVENT(writeback_queue)
+DEFINE_WRITEBACK_WORK_EVENT(writeback_exec)
 
 TRACE_EVENT(writeback_pages_written,
 	TP_PROTO(long pages_written),
@@ -60,7 +65,7 @@ TRACE_EVENT(writeback_pages_written,
 		__entry->pages		= pages_written;
 	),
 	TP_printk("%ld", __entry->pages)
-);
+)
 
 DECLARE_EVENT_CLASS(writeback_class,
 	TP_PROTO(struct backing_dev_info *bdi),
@@ -74,20 +79,20 @@ DECLARE_EVENT_CLASS(writeback_class,
 	TP_printk("bdi %s",
 		  __entry->name
 	)
-);
+)
 #define DEFINE_WRITEBACK_EVENT(name) \
 DEFINE_EVENT(writeback_class, name, \
 	TP_PROTO(struct backing_dev_info *bdi), \
 	TP_ARGS(bdi))
 
-DEFINE_WRITEBACK_EVENT(writeback_nowork);
-DEFINE_WRITEBACK_EVENT(writeback_wake_background);
-DEFINE_WRITEBACK_EVENT(writeback_wake_thread);
-DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread);
-DEFINE_WRITEBACK_EVENT(writeback_bdi_register);
-DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister);
-DEFINE_WRITEBACK_EVENT(writeback_thread_start);
-DEFINE_WRITEBACK_EVENT(writeback_thread_stop);
+DEFINE_WRITEBACK_EVENT(writeback_nowork)
+DEFINE_WRITEBACK_EVENT(writeback_wake_background)
+DEFINE_WRITEBACK_EVENT(writeback_wake_thread)
+DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread)
+DEFINE_WRITEBACK_EVENT(writeback_bdi_register)
+DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister)
+DEFINE_WRITEBACK_EVENT(writeback_thread_start)
+DEFINE_WRITEBACK_EVENT(writeback_thread_stop)
 
 DECLARE_EVENT_CLASS(wbc_class,
 	TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi),
@@ -144,13 +149,13 @@ DECLARE_EVENT_CLASS(wbc_class,
 DEFINE_EVENT(wbc_class, name, \
 	TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), \
 	TP_ARGS(wbc, bdi))
-DEFINE_WBC_EVENT(wbc_writeback_start);
-DEFINE_WBC_EVENT(wbc_writeback_written);
-DEFINE_WBC_EVENT(wbc_writeback_wait);
-DEFINE_WBC_EVENT(wbc_balance_dirty_start);
-DEFINE_WBC_EVENT(wbc_balance_dirty_written);
-DEFINE_WBC_EVENT(wbc_balance_dirty_wait);
-DEFINE_WBC_EVENT(wbc_writepage);
+DEFINE_WBC_EVENT(wbc_writeback_start)
+DEFINE_WBC_EVENT(wbc_writeback_written)
+DEFINE_WBC_EVENT(wbc_writeback_wait)
+DEFINE_WBC_EVENT(wbc_balance_dirty_start)
+DEFINE_WBC_EVENT(wbc_balance_dirty_written)
+DEFINE_WBC_EVENT(wbc_balance_dirty_wait)
+DEFINE_WBC_EVENT(wbc_writepage)
 
 DECLARE_EVENT_CLASS(writeback_congest_waited_template,
 
@@ -171,21 +176,21 @@ DECLARE_EVENT_CLASS(writeback_congest_wa
 	TP_printk("usec_timeout=%u usec_delayed=%u",
 			__entry->usec_timeout,
 			__entry->usec_delayed)
-);
+)
 
 DEFINE_EVENT(writeback_congest_waited_template, writeback_congestion_wait,
 
 	TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
 
 	TP_ARGS(usec_timeout, usec_delayed)
-);
+)
 
 DEFINE_EVENT(writeback_congest_waited_template, writeback_wait_iff_congested,
 
 	TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
 
 	TP_ARGS(usec_timeout, usec_delayed)
-);
+)
 
 #endif /* _TRACE_WRITEBACK_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 24/32] trace event wireless remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (21 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 23/32] trace event writeback " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 25/32] trace event video gpu " Mathieu Desnoyers
                   ` (8 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Zhu Yi, Johannes Berg, Reinette Chatre,
	John W. Linville

[-- Attachment #1: trace-event-wireless-remove-semicolons.patch --]
[-- Type: text/plain, Size: 17661 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Zhu Yi <yi.zhu@intel.com>
CC: Johannes Berg <johannes@sipsolutions.net>
CC: Reinette Chatre <reinette.chatre@intel.com>
CC: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/iwlwifi/iwl-devtrace.h |   20 ++--
 drivers/net/wireless/iwmc3200wifi/trace.h   |   14 +--
 net/mac80211/driver-trace.h                 |  118 ++++++++++++++--------------
 3 files changed, 76 insertions(+), 76 deletions(-)

Index: linux-2.6-lttng/drivers/net/wireless/iwlwifi/iwl-devtrace.h
===================================================================
--- linux-2.6-lttng.orig/drivers/net/wireless/iwlwifi/iwl-devtrace.h
+++ linux-2.6-lttng/drivers/net/wireless/iwlwifi/iwl-devtrace.h
@@ -55,7 +55,7 @@ TRACE_EVENT(iwlwifi_dev_ioread32,
 		__entry->val = val;
 	),
 	TP_printk("[%p] read io[%#x] = %#x", __entry->priv, __entry->offs, __entry->val)
-);
+)
 
 TRACE_EVENT(iwlwifi_dev_iowrite8,
 	TP_PROTO(struct iwl_priv *priv, u32 offs, u8 val),
@@ -71,7 +71,7 @@ TRACE_EVENT(iwlwifi_dev_iowrite8,
 		__entry->val = val;
 	),
 	TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val)
-);
+)
 
 TRACE_EVENT(iwlwifi_dev_iowrite32,
 	TP_PROTO(struct iwl_priv *priv, u32 offs, u32 val),
@@ -87,7 +87,7 @@ TRACE_EVENT(iwlwifi_dev_iowrite32,
 		__entry->val = val;
 	),
 	TP_printk("[%p] write io[%#x] = %#x)", __entry->priv, __entry->offs, __entry->val)
-);
+)
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM iwlwifi_ucode
@@ -110,7 +110,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_cont_event
 	),
 	TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u",
 		  __entry->priv, __entry->time, __entry->data, __entry->ev)
-);
+)
 
 TRACE_EVENT(iwlwifi_dev_ucode_wrap_event,
 	TP_PROTO(struct iwl_priv *priv, u32 wraps, u32 n_entry, u32 p_entry),
@@ -131,7 +131,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_wrap_event
 	TP_printk("[%p] wraps=#%02d n=0x%X p=0x%X",
 		  __entry->priv, __entry->wraps, __entry->n_entry,
 		  __entry->p_entry)
-);
+)
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM iwlwifi
@@ -152,7 +152,7 @@ TRACE_EVENT(iwlwifi_dev_hcmd,
 	TP_printk("[%p] hcmd %#.2x (%ssync)",
 		  __entry->priv, ((u8 *)__get_dynamic_array(hcmd))[0],
 		  __entry->flags & CMD_ASYNC ? "a" : "")
-);
+)
 
 TRACE_EVENT(iwlwifi_dev_rx,
 	TP_PROTO(struct iwl_priv *priv, void *rxbuf, size_t len),
@@ -167,7 +167,7 @@ TRACE_EVENT(iwlwifi_dev_rx,
 	),
 	TP_printk("[%p] RX cmd %#.2x",
 		  __entry->priv, ((u8 *)__get_dynamic_array(rxbuf))[4])
-);
+)
 
 TRACE_EVENT(iwlwifi_dev_tx,
 	TP_PROTO(struct iwl_priv *priv, void *tfd, size_t tfdlen,
@@ -199,7 +199,7 @@ TRACE_EVENT(iwlwifi_dev_tx,
 		  __entry->priv,
 		  ((u8 *)__get_dynamic_array(buf0))[0],
 		  __entry->framelen)
-);
+)
 
 TRACE_EVENT(iwlwifi_dev_ucode_error,
 	TP_PROTO(struct iwl_priv *priv, u32 desc, u32 time,
@@ -236,7 +236,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_error,
 		  __entry->priv, __entry->desc, __entry->time, __entry->data1,
 		  __entry->data2, __entry->line, __entry->blink1,
 		  __entry->blink2, __entry->ilink1, __entry->ilink2)
-);
+)
 
 TRACE_EVENT(iwlwifi_dev_ucode_event,
 	TP_PROTO(struct iwl_priv *priv, u32 time, u32 data, u32 ev),
@@ -256,7 +256,7 @@ TRACE_EVENT(iwlwifi_dev_ucode_event,
 	),
 	TP_printk("[%p] EVT_LOGT:%010u:0x%08x:%04u",
 		  __entry->priv, __entry->time, __entry->data, __entry->ev)
-);
+)
 #endif /* __IWLWIFI_DEVICE_TRACE */
 
 #undef TRACE_INCLUDE_PATH
Index: linux-2.6-lttng/drivers/net/wireless/iwmc3200wifi/trace.h
===================================================================
--- linux-2.6-lttng.orig/drivers/net/wireless/iwmc3200wifi/trace.h
+++ linux-2.6-lttng/drivers/net/wireless/iwmc3200wifi/trace.h
@@ -53,7 +53,7 @@ TRACE_EVENT(iwm_tx_nonwifi_cmd,
 		__entry->hw, __entry->seq, __entry->addr, __entry->op1,
 		__entry->op2
 	)
-);
+)
 
 TRACE_EVENT(iwm_tx_wifi_cmd,
 	TP_PROTO(struct iwm_priv *iwm, struct iwm_umac_wifi_out_hdr *hdr),
@@ -96,7 +96,7 @@ TRACE_EVENT(iwm_tx_wifi_cmd,
 		__entry->resp, __entry->eot, __entry->seq, __entry->color,
 		__entry->ra_tid, __entry->credit_group
 	)
-);
+)
 
 TRACE_EVENT(iwm_tx_packets,
 	TP_PROTO(struct iwm_priv *iwm, u8 *buf, int len),
@@ -149,7 +149,7 @@ TRACE_EVENT(iwm_tx_packets,
 		__entry->eot, __entry->seq, __entry->color, __entry->ra_tid,
 		__entry->credit_group, __entry->npkt, __entry->bytes
 	)
-);
+)
 
 TRACE_EVENT(iwm_rx_nonwifi_cmd,
 	TP_PROTO(struct iwm_priv *iwm, void *buf, int len),
@@ -176,7 +176,7 @@ TRACE_EVENT(iwm_rx_nonwifi_cmd,
 		IWM_PR_FMT " Rx TARGET RESP: opcode 0x%x, seq 0x%x, len 0x%x",
 		IWM_PR_ARG, __entry->opcode, __entry->seq, __entry->len
 	)
-);
+)
 
 TRACE_EVENT(iwm_rx_wifi_cmd,
 	TP_PROTO(struct iwm_priv *iwm, struct iwm_umac_wifi_in_hdr *hdr),
@@ -205,7 +205,7 @@ TRACE_EVENT(iwm_rx_wifi_cmd,
 		__entry->source == UMAC_HDI_IN_SOURCE_FW ? "UMAC" : "UDMA",
 		__entry->cmd, __entry->seq, __entry->count
 	)
-);
+)
 
 #define iwm_ticket_action_symbol		\
 	{ IWM_RX_TICKET_DROP, "DROP" },		\
@@ -245,7 +245,7 @@ TRACE_EVENT(iwm_rx_ticket,
 		__entry->reason ? __entry->reason : __entry->flags,
 		__entry->flags & IWM_RX_TICKET_AMSDU_MSK ? ", AMSDU frame" : ""
 	)
-);
+)
 
 TRACE_EVENT(iwm_rx_packet,
 	TP_PROTO(struct iwm_priv *iwm, void *buf, int len),
@@ -273,7 +273,7 @@ TRACE_EVENT(iwm_rx_packet,
 		IWM_PR_ARG, __entry->source == UMAC_HDI_IN_SOURCE_FHRX ?
 		"LMAC" : "UMAC", __entry->id, __entry->len
 	)
-);
+)
 #endif
 
 #undef TRACE_INCLUDE_PATH
Index: linux-2.6-lttng/net/mac80211/driver-trace.h
===================================================================
--- linux-2.6-lttng.orig/net/mac80211/driver-trace.h
+++ linux-2.6-lttng/net/mac80211/driver-trace.h
@@ -53,12 +53,12 @@ DECLARE_EVENT_CLASS(local_only_evt,
 		LOCAL_ASSIGN;
 	),
 	TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_return_void,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 TRACE_EVENT(drv_return_int,
 	TP_PROTO(struct ieee80211_local *local, int ret),
@@ -72,7 +72,7 @@ TRACE_EVENT(drv_return_int,
 		__entry->ret = ret;
 	),
 	TP_printk(LOCAL_PR_FMT " - %d", LOCAL_PR_ARG, __entry->ret)
-);
+)
 
 TRACE_EVENT(drv_return_u64,
 	TP_PROTO(struct ieee80211_local *local, u64 ret),
@@ -86,17 +86,17 @@ TRACE_EVENT(drv_return_u64,
 		__entry->ret = ret;
 	),
 	TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_start,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_stop,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 TRACE_EVENT(drv_add_interface,
 	TP_PROTO(struct ieee80211_local *local,
@@ -120,7 +120,7 @@ TRACE_EVENT(drv_add_interface,
 		LOCAL_PR_FMT  VIF_PR_FMT " addr:%pM",
 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
 	)
-);
+)
 
 TRACE_EVENT(drv_change_interface,
 	TP_PROTO(struct ieee80211_local *local,
@@ -148,7 +148,7 @@ TRACE_EVENT(drv_change_interface,
 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->new_type,
 		__entry->new_p2p ? "/p2p" : ""
 	)
-);
+)
 
 TRACE_EVENT(drv_remove_interface,
 	TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata),
@@ -171,7 +171,7 @@ TRACE_EVENT(drv_remove_interface,
 		LOCAL_PR_FMT  VIF_PR_FMT " addr:%pM",
 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->addr
 	)
-);
+)
 
 TRACE_EVENT(drv_config,
 	TP_PROTO(struct ieee80211_local *local,
@@ -213,7 +213,7 @@ TRACE_EVENT(drv_config,
 		LOCAL_PR_FMT " ch:%#x freq:%d",
 		LOCAL_PR_ARG, __entry->changed, __entry->center_freq
 	)
-);
+)
 
 TRACE_EVENT(drv_bss_info_changed,
 	TP_PROTO(struct ieee80211_local *local,
@@ -263,7 +263,7 @@ TRACE_EVENT(drv_bss_info_changed,
 		LOCAL_PR_FMT  VIF_PR_FMT " changed:%#x",
 		LOCAL_PR_ARG, VIF_PR_ARG, __entry->changed
 	)
-);
+)
 
 TRACE_EVENT(drv_prepare_multicast,
 	TP_PROTO(struct ieee80211_local *local, int mc_count),
@@ -284,7 +284,7 @@ TRACE_EVENT(drv_prepare_multicast,
 		LOCAL_PR_FMT " prepare mc (%d)",
 		LOCAL_PR_ARG, __entry->mc_count
 	)
-);
+)
 
 TRACE_EVENT(drv_configure_filter,
 	TP_PROTO(struct ieee80211_local *local,
@@ -312,7 +312,7 @@ TRACE_EVENT(drv_configure_filter,
 		LOCAL_PR_FMT " changed:%#x total:%#x",
 		LOCAL_PR_ARG, __entry->changed, __entry->total
 	)
-);
+)
 
 TRACE_EVENT(drv_set_tim,
 	TP_PROTO(struct ieee80211_local *local,
@@ -336,7 +336,7 @@ TRACE_EVENT(drv_set_tim,
 		LOCAL_PR_FMT STA_PR_FMT " set:%d",
 		LOCAL_PR_ARG, STA_PR_FMT, __entry->set
 	)
-);
+)
 
 TRACE_EVENT(drv_set_key,
 	TP_PROTO(struct ieee80211_local *local,
@@ -370,7 +370,7 @@ TRACE_EVENT(drv_set_key,
 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
 	)
-);
+)
 
 TRACE_EVENT(drv_update_tkip_key,
 	TP_PROTO(struct ieee80211_local *local,
@@ -398,7 +398,7 @@ TRACE_EVENT(drv_update_tkip_key,
 		LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " iv32:%#x",
 		LOCAL_PR_ARG,VIF_PR_ARG,STA_PR_ARG, __entry->iv32
 	)
-);
+)
 
 TRACE_EVENT(drv_hw_scan,
 	TP_PROTO(struct ieee80211_local *local,
@@ -421,17 +421,17 @@ TRACE_EVENT(drv_hw_scan,
 		LOCAL_PR_FMT VIF_PR_FMT,
 		LOCAL_PR_ARG,VIF_PR_ARG
 	)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 TRACE_EVENT(drv_get_stats,
 	TP_PROTO(struct ieee80211_local *local,
@@ -462,7 +462,7 @@ TRACE_EVENT(drv_get_stats,
 		LOCAL_PR_FMT " ret:%d",
 		LOCAL_PR_ARG, __entry->ret
 	)
-);
+)
 
 TRACE_EVENT(drv_get_tkip_seq,
 	TP_PROTO(struct ieee80211_local *local,
@@ -487,7 +487,7 @@ TRACE_EVENT(drv_get_tkip_seq,
 	TP_printk(
 		LOCAL_PR_FMT, LOCAL_PR_ARG
 	)
-);
+)
 
 TRACE_EVENT(drv_set_frag_threshold,
 	TP_PROTO(struct ieee80211_local *local, u32 value),
@@ -508,7 +508,7 @@ TRACE_EVENT(drv_set_frag_threshold,
 		LOCAL_PR_FMT " value:%d",
 		LOCAL_PR_ARG, __entry->value
 	)
-);
+)
 
 TRACE_EVENT(drv_set_rts_threshold,
 	TP_PROTO(struct ieee80211_local *local, u32 value),
@@ -529,7 +529,7 @@ TRACE_EVENT(drv_set_rts_threshold,
 		LOCAL_PR_FMT " value:%d",
 		LOCAL_PR_ARG, __entry->value
 	)
-);
+)
 
 TRACE_EVENT(drv_set_coverage_class,
 	TP_PROTO(struct ieee80211_local *local, u8 value),
@@ -550,7 +550,7 @@ TRACE_EVENT(drv_set_coverage_class,
 		LOCAL_PR_FMT " value:%d",
 		LOCAL_PR_ARG, __entry->value
 	)
-);
+)
 
 TRACE_EVENT(drv_sta_notify,
 	TP_PROTO(struct ieee80211_local *local,
@@ -578,7 +578,7 @@ TRACE_EVENT(drv_sta_notify,
 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT " cmd:%d",
 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->cmd
 	)
-);
+)
 
 TRACE_EVENT(drv_sta_add,
 	TP_PROTO(struct ieee80211_local *local,
@@ -603,7 +603,7 @@ TRACE_EVENT(drv_sta_add,
 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
 	)
-);
+)
 
 TRACE_EVENT(drv_sta_remove,
 	TP_PROTO(struct ieee80211_local *local,
@@ -628,7 +628,7 @@ TRACE_EVENT(drv_sta_remove,
 		LOCAL_PR_FMT  VIF_PR_FMT  STA_PR_FMT,
 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
 	)
-);
+)
 
 TRACE_EVENT(drv_conf_tx,
 	TP_PROTO(struct ieee80211_local *local, u16 queue,
@@ -658,12 +658,12 @@ TRACE_EVENT(drv_conf_tx,
 		LOCAL_PR_FMT " queue:%d",
 		LOCAL_PR_ARG, __entry->queue
 	)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_get_tsf,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 TRACE_EVENT(drv_set_tsf,
 	TP_PROTO(struct ieee80211_local *local, u64 tsf),
@@ -684,17 +684,17 @@ TRACE_EVENT(drv_set_tsf,
 		LOCAL_PR_FMT " tsf:%llu",
 		LOCAL_PR_ARG, (unsigned long long)__entry->tsf
 	)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_reset_tsf,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 TRACE_EVENT(drv_ampdu_action,
 	TP_PROTO(struct ieee80211_local *local,
@@ -730,7 +730,7 @@ TRACE_EVENT(drv_ampdu_action,
 		LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action,
 		__entry->tid, __entry->buf_size
 	)
-);
+)
 
 TRACE_EVENT(drv_get_survey,
 	TP_PROTO(struct ieee80211_local *local, int idx,
@@ -752,7 +752,7 @@ TRACE_EVENT(drv_get_survey,
 		LOCAL_PR_FMT " idx:%d",
 		LOCAL_PR_ARG, __entry->idx
 	)
-);
+)
 
 TRACE_EVENT(drv_flush,
 	TP_PROTO(struct ieee80211_local *local, bool drop),
@@ -773,7 +773,7 @@ TRACE_EVENT(drv_flush,
 		LOCAL_PR_FMT " drop:%d",
 		LOCAL_PR_ARG, __entry->drop
 	)
-);
+)
 
 TRACE_EVENT(drv_channel_switch,
 	TP_PROTO(struct ieee80211_local *local,
@@ -801,7 +801,7 @@ TRACE_EVENT(drv_channel_switch,
 		LOCAL_PR_FMT " new freq:%u count:%d",
 		LOCAL_PR_ARG, __entry->freq, __entry->count
 	)
-);
+)
 
 TRACE_EVENT(drv_set_antenna,
 	TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
@@ -826,7 +826,7 @@ TRACE_EVENT(drv_set_antenna,
 		LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
 		LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
 	)
-);
+)
 
 TRACE_EVENT(drv_get_antenna,
 	TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
@@ -851,7 +851,7 @@ TRACE_EVENT(drv_get_antenna,
 		LOCAL_PR_FMT " tx_ant:%d rx_ant:%d ret:%d",
 		LOCAL_PR_ARG, __entry->tx_ant, __entry->rx_ant, __entry->ret
 	)
-);
+)
 
 TRACE_EVENT(drv_remain_on_channel,
 	TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
@@ -877,12 +877,12 @@ TRACE_EVENT(drv_remain_on_channel,
 		LOCAL_PR_FMT " freq:%dMHz duration:%dms",
 		LOCAL_PR_ARG, __entry->center_freq, __entry->duration
 	)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 TRACE_EVENT(drv_offchannel_tx,
 	TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
@@ -910,7 +910,7 @@ TRACE_EVENT(drv_offchannel_tx,
 		LOCAL_PR_FMT " freq:%dMHz, wait:%dms",
 		LOCAL_PR_ARG, __entry->center_freq, __entry->wait
 	)
-);
+)
 
 TRACE_EVENT(drv_set_ringparam,
 	TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
@@ -933,7 +933,7 @@ TRACE_EVENT(drv_set_ringparam,
 		LOCAL_PR_FMT " tx:%d rx %d",
 		LOCAL_PR_ARG, __entry->tx, __entry->rx
 	)
-);
+)
 
 TRACE_EVENT(drv_get_ringparam,
 	TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
@@ -962,12 +962,12 @@ TRACE_EVENT(drv_get_ringparam,
 		LOCAL_PR_ARG,
 		__entry->tx, __entry->tx_max, __entry->rx, __entry->rx_max
 	)
-);
+)
 
 DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 /*
  * Tracing for API calls that drivers call.
@@ -992,7 +992,7 @@ TRACE_EVENT(api_start_tx_ba_session,
 		STA_PR_FMT " tid:%d",
 		STA_PR_ARG, __entry->tid
 	)
-);
+)
 
 TRACE_EVENT(api_start_tx_ba_cb,
 	TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
@@ -1015,7 +1015,7 @@ TRACE_EVENT(api_start_tx_ba_cb,
 		VIF_PR_FMT " ra:%pM tid:%d",
 		VIF_PR_ARG, __entry->ra, __entry->tid
 	)
-);
+)
 
 TRACE_EVENT(api_stop_tx_ba_session,
 	TP_PROTO(struct ieee80211_sta *sta, u16 tid),
@@ -1036,7 +1036,7 @@ TRACE_EVENT(api_stop_tx_ba_session,
 		STA_PR_FMT " tid:%d",
 		STA_PR_ARG, __entry->tid
 	)
-);
+)
 
 TRACE_EVENT(api_stop_tx_ba_cb,
 	TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
@@ -1059,12 +1059,12 @@ TRACE_EVENT(api_stop_tx_ba_cb,
 		VIF_PR_FMT " ra:%pM tid:%d",
 		VIF_PR_ARG, __entry->ra, __entry->tid
 	)
-);
+)
 
 DEFINE_EVENT(local_only_evt, api_restart_hw,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 TRACE_EVENT(api_beacon_loss,
 	TP_PROTO(struct ieee80211_sub_if_data *sdata),
@@ -1083,7 +1083,7 @@ TRACE_EVENT(api_beacon_loss,
 		VIF_PR_FMT,
 		VIF_PR_ARG
 	)
-);
+)
 
 TRACE_EVENT(api_connection_loss,
 	TP_PROTO(struct ieee80211_sub_if_data *sdata),
@@ -1102,7 +1102,7 @@ TRACE_EVENT(api_connection_loss,
 		VIF_PR_FMT,
 		VIF_PR_ARG
 	)
-);
+)
 
 TRACE_EVENT(api_cqm_rssi_notify,
 	TP_PROTO(struct ieee80211_sub_if_data *sdata,
@@ -1124,7 +1124,7 @@ TRACE_EVENT(api_cqm_rssi_notify,
 		VIF_PR_FMT " event:%d",
 		VIF_PR_ARG, __entry->rssi_event
 	)
-);
+)
 
 TRACE_EVENT(api_scan_completed,
 	TP_PROTO(struct ieee80211_local *local, bool aborted),
@@ -1145,7 +1145,7 @@ TRACE_EVENT(api_scan_completed,
 		LOCAL_PR_FMT " aborted:%d",
 		LOCAL_PR_ARG, __entry->aborted
 	)
-);
+)
 
 TRACE_EVENT(api_sta_block_awake,
 	TP_PROTO(struct ieee80211_local *local,
@@ -1169,7 +1169,7 @@ TRACE_EVENT(api_sta_block_awake,
 		LOCAL_PR_FMT STA_PR_FMT " block:%d",
 		LOCAL_PR_ARG, STA_PR_FMT, __entry->block
 	)
-);
+)
 
 TRACE_EVENT(api_chswitch_done,
 	TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
@@ -1190,17 +1190,17 @@ TRACE_EVENT(api_chswitch_done,
 		VIF_PR_FMT " success=%d",
 		VIF_PR_ARG, __entry->success
 	)
-);
+)
 
 DEFINE_EVENT(local_only_evt, api_ready_on_channel,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
 	TP_PROTO(struct ieee80211_local *local),
 	TP_ARGS(local)
-);
+)
 
 /*
  * Tracing for internal functions
@@ -1229,7 +1229,7 @@ TRACE_EVENT(wake_queue,
 		LOCAL_PR_FMT " queue:%d, reason:%d",
 		LOCAL_PR_ARG, __entry->queue, __entry->reason
 	)
-);
+)
 
 TRACE_EVENT(stop_queue,
 	TP_PROTO(struct ieee80211_local *local, u16 queue,
@@ -1253,7 +1253,7 @@ TRACE_EVENT(stop_queue,
 		LOCAL_PR_FMT " queue:%d, reason:%d",
 		LOCAL_PR_ARG, __entry->queue, __entry->reason
 	)
-);
+)
 #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
 
 #undef TRACE_INCLUDE_PATH


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 25/32] trace event video gpu remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (22 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 24/32] trace event wireless " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 26/32] trace event gfs2 " Mathieu Desnoyers
                   ` (7 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Jesse Barnes, Dave Airlie, Chris Wilson,
	Li Zefan

[-- Attachment #1: trace-event-video-gpu-remove-semicolons.patch --]
[-- Type: text/plain, Size: 7615 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Dave Airlie <airlied@redhat.com>
CC: Chris Wilson <chris@chris-wilson.co.uk>
CC: Li Zefan <lizf@cn.fujitsu.com>
---
 drivers/gpu/drm/drm_trace.h       |    6 ++--
 drivers/gpu/drm/i915/i915_trace.h |   52 +++++++++++++++++++-------------------
 2 files changed, 29 insertions(+), 29 deletions(-)

Index: linux-2.6-lttng/drivers/gpu/drm/drm_trace.h
===================================================================
--- linux-2.6-lttng.orig/drivers/gpu/drm/drm_trace.h
+++ linux-2.6-lttng/drivers/gpu/drm/drm_trace.h
@@ -22,7 +22,7 @@ TRACE_EVENT(drm_vblank_event,
 		    __entry->seq = seq;
 		    ),
 	    TP_printk("crtc=%d, seq=%d", __entry->crtc, __entry->seq)
-);
+)
 
 TRACE_EVENT(drm_vblank_event_queued,
 	    TP_PROTO(pid_t pid, int crtc, unsigned int seq),
@@ -39,7 +39,7 @@ TRACE_EVENT(drm_vblank_event_queued,
 		    ),
 	    TP_printk("pid=%d, crtc=%d, seq=%d", __entry->pid, __entry->crtc, \
 		      __entry->seq)
-);
+)
 
 TRACE_EVENT(drm_vblank_event_delivered,
 	    TP_PROTO(pid_t pid, int crtc, unsigned int seq),
@@ -56,7 +56,7 @@ TRACE_EVENT(drm_vblank_event_delivered,
 		    ),
 	    TP_printk("pid=%d, crtc=%d, seq=%d", __entry->pid, __entry->crtc, \
 		      __entry->seq)
-);
+)
 
 #endif /* _DRM_TRACE_H_ */
 
Index: linux-2.6-lttng/drivers/gpu/drm/i915/i915_trace.h
===================================================================
--- linux-2.6-lttng.orig/drivers/gpu/drm/i915/i915_trace.h
+++ linux-2.6-lttng/drivers/gpu/drm/i915/i915_trace.h
@@ -31,7 +31,7 @@ TRACE_EVENT(i915_gem_object_create,
 			   ),
 
 	    TP_printk("obj=%p, size=%u", __entry->obj, __entry->size)
-);
+)
 
 TRACE_EVENT(i915_gem_object_bind,
 	    TP_PROTO(struct drm_i915_gem_object *obj, bool mappable),
@@ -54,7 +54,7 @@ TRACE_EVENT(i915_gem_object_bind,
 	    TP_printk("obj=%p, offset=%08x size=%x%s",
 		      __entry->obj, __entry->offset, __entry->size,
 		      __entry->mappable ? ", mappable" : "")
-);
+)
 
 TRACE_EVENT(i915_gem_object_unbind,
 	    TP_PROTO(struct drm_i915_gem_object *obj),
@@ -74,7 +74,7 @@ TRACE_EVENT(i915_gem_object_unbind,
 
 	    TP_printk("obj=%p, offset=%08x size=%x",
 		      __entry->obj, __entry->offset, __entry->size)
-);
+)
 
 TRACE_EVENT(i915_gem_object_change_domain,
 	    TP_PROTO(struct drm_i915_gem_object *obj, u32 old_read, u32 old_write),
@@ -98,7 +98,7 @@ TRACE_EVENT(i915_gem_object_change_domai
 		      __entry->read_domains & 0xffff,
 		      __entry->write_domain >> 16,
 		      __entry->write_domain & 0xffff)
-);
+)
 
 TRACE_EVENT(i915_gem_object_pwrite,
 	    TP_PROTO(struct drm_i915_gem_object *obj, u32 offset, u32 len),
@@ -118,7 +118,7 @@ TRACE_EVENT(i915_gem_object_pwrite,
 
 	    TP_printk("obj=%p, offset=%u, len=%u",
 		      __entry->obj, __entry->offset, __entry->len)
-);
+)
 
 TRACE_EVENT(i915_gem_object_pread,
 	    TP_PROTO(struct drm_i915_gem_object *obj, u32 offset, u32 len),
@@ -138,7 +138,7 @@ TRACE_EVENT(i915_gem_object_pread,
 
 	    TP_printk("obj=%p, offset=%u, len=%u",
 		      __entry->obj, __entry->offset, __entry->len)
-);
+)
 
 TRACE_EVENT(i915_gem_object_fault,
 	    TP_PROTO(struct drm_i915_gem_object *obj, u32 index, bool gtt, bool write),
@@ -163,7 +163,7 @@ TRACE_EVENT(i915_gem_object_fault,
 		      __entry->gtt ? "GTT" : "CPU",
 		      __entry->index,
 		      __entry->write ? ", writable" : "")
-);
+)
 
 DECLARE_EVENT_CLASS(i915_gem_object,
 	    TP_PROTO(struct drm_i915_gem_object *obj),
@@ -178,17 +178,17 @@ DECLARE_EVENT_CLASS(i915_gem_object,
 			   ),
 
 	    TP_printk("obj=%p", __entry->obj)
-);
+)
 
 DEFINE_EVENT(i915_gem_object, i915_gem_object_clflush,
 	     TP_PROTO(struct drm_i915_gem_object *obj),
 	     TP_ARGS(obj)
-);
+)
 
 DEFINE_EVENT(i915_gem_object, i915_gem_object_destroy,
 	    TP_PROTO(struct drm_i915_gem_object *obj),
 	    TP_ARGS(obj)
-);
+)
 
 TRACE_EVENT(i915_gem_evict,
 	    TP_PROTO(struct drm_device *dev, u32 size, u32 align, bool mappable),
@@ -211,7 +211,7 @@ TRACE_EVENT(i915_gem_evict,
 	    TP_printk("dev=%d, size=%d, align=%d %s",
 		      __entry->dev, __entry->size, __entry->align,
 		      __entry->mappable ? ", mappable" : "")
-);
+)
 
 TRACE_EVENT(i915_gem_evict_everything,
 	    TP_PROTO(struct drm_device *dev, bool purgeable),
@@ -230,7 +230,7 @@ TRACE_EVENT(i915_gem_evict_everything,
 	    TP_printk("dev=%d%s",
 		      __entry->dev,
 		      __entry->purgeable ? ", purgeable only" : "")
-);
+)
 
 TRACE_EVENT(i915_gem_ring_dispatch,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
@@ -251,7 +251,7 @@ TRACE_EVENT(i915_gem_ring_dispatch,
 
 	    TP_printk("dev=%u, ring=%u, seqno=%u",
 		      __entry->dev, __entry->ring, __entry->seqno)
-);
+)
 
 TRACE_EVENT(i915_gem_ring_flush,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 invalidate, u32 flush),
@@ -274,7 +274,7 @@ TRACE_EVENT(i915_gem_ring_flush,
 	    TP_printk("dev=%u, ring=%x, invalidate=%04x, flush=%04x",
 		      __entry->dev, __entry->ring,
 		      __entry->invalidate, __entry->flush)
-);
+)
 
 DECLARE_EVENT_CLASS(i915_gem_request,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
@@ -294,32 +294,32 @@ DECLARE_EVENT_CLASS(i915_gem_request,
 
 	    TP_printk("dev=%u, ring=%u, seqno=%u",
 		      __entry->dev, __entry->ring, __entry->seqno)
-);
+)
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
 	    TP_ARGS(ring, seqno)
-);
+)
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_complete,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
 	    TP_ARGS(ring, seqno)
-);
+)
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_retire,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
 	    TP_ARGS(ring, seqno)
-);
+)
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_wait_begin,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
 	    TP_ARGS(ring, seqno)
-);
+)
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_wait_end,
 	    TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
 	    TP_ARGS(ring, seqno)
-);
+)
 
 DECLARE_EVENT_CLASS(i915_ring,
 	    TP_PROTO(struct intel_ring_buffer *ring),
@@ -336,17 +336,17 @@ DECLARE_EVENT_CLASS(i915_ring,
 			   ),
 
 	    TP_printk("dev=%u, ring=%u", __entry->dev, __entry->ring)
-);
+)
 
 DEFINE_EVENT(i915_ring, i915_ring_wait_begin,
 	    TP_PROTO(struct intel_ring_buffer *ring),
 	    TP_ARGS(ring)
-);
+)
 
 DEFINE_EVENT(i915_ring, i915_ring_wait_end,
 	    TP_PROTO(struct intel_ring_buffer *ring),
 	    TP_ARGS(ring)
-);
+)
 
 TRACE_EVENT(i915_flip_request,
 	    TP_PROTO(int plane, struct drm_i915_gem_object *obj),
@@ -364,7 +364,7 @@ TRACE_EVENT(i915_flip_request,
 		    ),
 
 	    TP_printk("plane=%d, obj=%p", __entry->plane, __entry->obj)
-);
+)
 
 TRACE_EVENT(i915_flip_complete,
 	    TP_PROTO(int plane, struct drm_i915_gem_object *obj),
@@ -382,7 +382,7 @@ TRACE_EVENT(i915_flip_complete,
 		    ),
 
 	    TP_printk("plane=%d, obj=%p", __entry->plane, __entry->obj)
-);
+)
 
 TRACE_EVENT(i915_reg_rw,
            TP_PROTO(bool write, u32 reg, u64 val, int len),
@@ -408,7 +408,7 @@ TRACE_EVENT(i915_reg_rw,
 		     __entry->reg, __entry->len,
 		     (u32)(__entry->val & 0xffffffff),
 		     (u32)(__entry->val >> 32))
-);
+)
 
 #endif /* _I915_TRACE_H_ */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 26/32] trace event gfs2 remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (23 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 25/32] trace event video gpu " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03 10:14   ` Steven Whitehouse
  2011-05-02 21:11 ` [RFC patch 27/32] trace event xfs " Mathieu Desnoyers
                   ` (6 subsequent siblings)
  31 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Steven Whitehouse

[-- Attachment #1: trace-event-gfs2-remove-semicolons.patch --]
[-- Type: text/plain, Size: 3508 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.  Remove extra trailing
semicolons at the end of GFS2 trace event declarations.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
---
 fs/gfs2/trace_gfs2.h |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

Index: linux-2.6-lttng/fs/gfs2/trace_gfs2.h
===================================================================
--- linux-2.6-lttng.orig/fs/gfs2/trace_gfs2.h
+++ linux-2.6-lttng/fs/gfs2/trace_gfs2.h
@@ -42,8 +42,8 @@
 	{(1UL << GLF_FROZEN),			"F" },		\
 	{(1UL << GLF_QUEUED),			"q" })
 
-#ifndef NUMPTY
-#define NUMPTY
+#ifndef _TRACE_GFS2_DEF_
+#define _TRACE_GFS2_DEF_
 static inline u8 glock_trace_state(unsigned int state)
 {
 	switch(state) {
@@ -56,7 +56,7 @@ static inline u8 glock_trace_state(unsig
 	}
 	return DLM_LOCK_NL;
 }
-#endif
+#endif /* _TRACE_GFS2_DEF_ */
 
 /* Section 1 - Locking
  *
@@ -105,7 +105,7 @@ TRACE_EVENT(gfs2_glock_state_change,
 		  glock_trace_name(__entry->tgt_state),
 		  glock_trace_name(__entry->dmt_state),
 		  show_glock_flags(__entry->flags))
-);
+)
 
 /* State change -> unlocked, glock is being deallocated */
 TRACE_EVENT(gfs2_glock_put,
@@ -137,7 +137,7 @@ TRACE_EVENT(gfs2_glock_put,
 		  glock_trace_name(DLM_LOCK_IV),
 		  show_glock_flags(__entry->flags))
 
-);
+)
 
 /* Callback (local or remote) requesting lock demotion */
 TRACE_EVENT(gfs2_demote_rq,
@@ -171,7 +171,7 @@ TRACE_EVENT(gfs2_demote_rq,
                   glock_trace_name(__entry->dmt_state),
 		  show_glock_flags(__entry->flags))
 
-);
+)
 
 /* Promotion/grant of a glock */
 TRACE_EVENT(gfs2_promote,
@@ -201,7 +201,7 @@ TRACE_EVENT(gfs2_promote,
 		  (unsigned long long)__entry->glnum,
 		  __entry->first ? "first": "other",
 		  glock_trace_name(__entry->state))
-);
+)
 
 /* Queue/dequeue a lock request */
 TRACE_EVENT(gfs2_glock_queue,
@@ -231,7 +231,7 @@ TRACE_EVENT(gfs2_glock_queue,
 		  (unsigned long long)__entry->glnum,
 		  __entry->queue ? "" : "de",
 		  glock_trace_name(__entry->state))
-);
+)
 
 /* Section 2 - Log/journal
  *
@@ -270,7 +270,7 @@ TRACE_EVENT(gfs2_pin,
 		  (unsigned long long)__entry->block,
 		  (unsigned long)__entry->len,
 		  (unsigned long long)__entry->ino)
-);
+)
 
 /* Flushing the log */
 TRACE_EVENT(gfs2_log_flush,
@@ -295,7 +295,7 @@ TRACE_EVENT(gfs2_log_flush,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  __entry->start ? "start" : "end",
 		  (unsigned long long)__entry->log_seq)
-);
+)
 
 /* Reserving/releasing blocks in the log */
 TRACE_EVENT(gfs2_log_blocks,
@@ -316,7 +316,7 @@ TRACE_EVENT(gfs2_log_blocks,
 
 	TP_printk("%u,%u log reserve %d", MAJOR(__entry->dev),
 		  MINOR(__entry->dev), __entry->blocks)
-);
+)
 
 /* Section 3 - bmap
  *
@@ -364,7 +364,7 @@ TRACE_EVENT(gfs2_bmap,
 		  (unsigned long long)__entry->pblock,
 		  __entry->state, __entry->create ? "create " : "nocreate",
 		  __entry->errno)
-);
+)
 
 /* Keep track of blocks as they are allocated/freed */
 TRACE_EVENT(gfs2_block_alloc,
@@ -396,7 +396,7 @@ TRACE_EVENT(gfs2_block_alloc,
 		  (unsigned long long)__entry->start,
 		  (unsigned long)__entry->len,
 		  block_state_name(__entry->block_state))
-);
+)
 
 #endif /* _TRACE_GFS2_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 27/32] trace event xfs remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (24 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 26/32] trace event gfs2 " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 28/32] trace event powerpc " Mathieu Desnoyers
                   ` (5 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Dave Chinner, Christoph Hellwig, Alex Elder,
	Li Zefan

[-- Attachment #1: trace-event-xfs-remove-semicolons.patch --]
[-- Type: text/plain, Size: 32947 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.  Remove extra trailing
semicolons at the end of XFS trace event declarations.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Dave Chinner <david@fromorbit.com>
CC: Christoph Hellwig <hch@lst.de>
CC: Alex Elder <aelder@sgi.com>
CC: Li Zefan <lizf@cn.fujitsu.com>
---
 fs/xfs/linux-2.6/xfs_trace.h |  539 +++++++++++++++++++++----------------------
 1 file changed, 272 insertions(+), 267 deletions(-)

Index: linux-2.6-lttng/fs/xfs/linux-2.6/xfs_trace.h
===================================================================
--- linux-2.6-lttng.orig/fs/xfs/linux-2.6/xfs_trace.h
+++ linux-2.6-lttng/fs/xfs/linux-2.6/xfs_trace.h
@@ -23,6 +23,9 @@
 
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_XFS_DEF_
+#define _TRACE_XFS_DEF_
+
 struct xfs_agf;
 struct xfs_alloc_arg;
 struct xfs_attr_list_context;
@@ -37,6 +40,8 @@ struct xlog_recover_item;
 struct xfs_buf_log_format;
 struct xfs_inode_log_format;
 
+#endif /* _TRACE_XFS_DEF_ */
+
 DECLARE_EVENT_CLASS(xfs_attr_list_class,
 	TP_PROTO(struct xfs_attr_list_context *ctx),
 	TP_ARGS(ctx),
@@ -86,14 +91,14 @@ DECLARE_EVENT_CLASS(xfs_attr_list_class,
 DEFINE_EVENT(xfs_attr_list_class, name, \
 	TP_PROTO(struct xfs_attr_list_context *ctx), \
 	TP_ARGS(ctx))
-DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf);
-DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf_all);
-DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf);
-DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf_end);
-DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full);
-DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add);
-DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk);
-DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound);
+DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf)
+DEFINE_ATTR_LIST_EVENT(xfs_attr_list_sf_all)
+DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf)
+DEFINE_ATTR_LIST_EVENT(xfs_attr_list_leaf_end)
+DEFINE_ATTR_LIST_EVENT(xfs_attr_list_full)
+DEFINE_ATTR_LIST_EVENT(xfs_attr_list_add)
+DEFINE_ATTR_LIST_EVENT(xfs_attr_list_wrong_blk)
+DEFINE_ATTR_LIST_EVENT(xfs_attr_list_notfound)
 
 DECLARE_EVENT_CLASS(xfs_perag_class,
 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount,
@@ -116,18 +121,18 @@ DECLARE_EVENT_CLASS(xfs_perag_class,
 		  __entry->agno,
 		  __entry->refcount,
 		  (char *)__entry->caller_ip)
-);
+)
 
 #define DEFINE_PERAG_REF_EVENT(name)	\
 DEFINE_EVENT(xfs_perag_class, name,	\
 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount,	\
 		 unsigned long caller_ip),					\
 	TP_ARGS(mp, agno, refcount, caller_ip))
-DEFINE_PERAG_REF_EVENT(xfs_perag_get);
-DEFINE_PERAG_REF_EVENT(xfs_perag_get_tag);
-DEFINE_PERAG_REF_EVENT(xfs_perag_put);
-DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim);
-DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim);
+DEFINE_PERAG_REF_EVENT(xfs_perag_get)
+DEFINE_PERAG_REF_EVENT(xfs_perag_get_tag)
+DEFINE_PERAG_REF_EVENT(xfs_perag_put)
+DEFINE_PERAG_REF_EVENT(xfs_perag_set_reclaim)
+DEFINE_PERAG_REF_EVENT(xfs_perag_clear_reclaim)
 
 TRACE_EVENT(xfs_attr_list_node_descend,
 	TP_PROTO(struct xfs_attr_list_context *ctx,
@@ -179,7 +184,7 @@ TRACE_EVENT(xfs_attr_list_node_descend,
 		   __print_flags(__entry->flags, "|", XFS_ATTR_FLAGS),
 		   __entry->bt_hashval,
 		   __entry->bt_before)
-);
+)
 
 TRACE_EVENT(xfs_iext_insert,
 	TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx,
@@ -218,7 +223,7 @@ TRACE_EVENT(xfs_iext_insert,
 		  __entry->blockcount,
 		  __entry->state,
 		  (char *)__entry->caller_ip)
-);
+)
 
 DECLARE_EVENT_CLASS(xfs_bmap_class,
 	TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state,
@@ -269,10 +274,10 @@ DEFINE_EVENT(xfs_bmap_class, name, \
 	TP_PROTO(struct xfs_inode *ip, xfs_extnum_t idx, int state, \
 		 unsigned long caller_ip), \
 	TP_ARGS(ip, idx, state, caller_ip))
-DEFINE_BMAP_EVENT(xfs_iext_remove);
-DEFINE_BMAP_EVENT(xfs_bmap_pre_update);
-DEFINE_BMAP_EVENT(xfs_bmap_post_update);
-DEFINE_BMAP_EVENT(xfs_extlist);
+DEFINE_BMAP_EVENT(xfs_iext_remove)
+DEFINE_BMAP_EVENT(xfs_bmap_pre_update)
+DEFINE_BMAP_EVENT(xfs_bmap_post_update)
+DEFINE_BMAP_EVENT(xfs_extlist)
 
 DECLARE_EVENT_CLASS(xfs_buf_class,
 	TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip),
@@ -313,37 +318,37 @@ DECLARE_EVENT_CLASS(xfs_buf_class,
 DEFINE_EVENT(xfs_buf_class, name, \
 	TP_PROTO(struct xfs_buf *bp, unsigned long caller_ip), \
 	TP_ARGS(bp, caller_ip))
-DEFINE_BUF_EVENT(xfs_buf_init);
-DEFINE_BUF_EVENT(xfs_buf_free);
-DEFINE_BUF_EVENT(xfs_buf_hold);
-DEFINE_BUF_EVENT(xfs_buf_rele);
-DEFINE_BUF_EVENT(xfs_buf_iodone);
-DEFINE_BUF_EVENT(xfs_buf_iorequest);
-DEFINE_BUF_EVENT(xfs_buf_bawrite);
-DEFINE_BUF_EVENT(xfs_buf_bdwrite);
-DEFINE_BUF_EVENT(xfs_buf_lock);
-DEFINE_BUF_EVENT(xfs_buf_lock_done);
-DEFINE_BUF_EVENT(xfs_buf_cond_lock);
-DEFINE_BUF_EVENT(xfs_buf_unlock);
-DEFINE_BUF_EVENT(xfs_buf_iowait);
-DEFINE_BUF_EVENT(xfs_buf_iowait_done);
-DEFINE_BUF_EVENT(xfs_buf_delwri_queue);
-DEFINE_BUF_EVENT(xfs_buf_delwri_dequeue);
-DEFINE_BUF_EVENT(xfs_buf_delwri_split);
-DEFINE_BUF_EVENT(xfs_buf_get_uncached);
-DEFINE_BUF_EVENT(xfs_bdstrat_shut);
-DEFINE_BUF_EVENT(xfs_buf_item_relse);
-DEFINE_BUF_EVENT(xfs_buf_item_iodone);
-DEFINE_BUF_EVENT(xfs_buf_item_iodone_async);
-DEFINE_BUF_EVENT(xfs_buf_error_relse);
-DEFINE_BUF_EVENT(xfs_trans_read_buf_io);
-DEFINE_BUF_EVENT(xfs_trans_read_buf_shut);
+DEFINE_BUF_EVENT(xfs_buf_init)
+DEFINE_BUF_EVENT(xfs_buf_free)
+DEFINE_BUF_EVENT(xfs_buf_hold)
+DEFINE_BUF_EVENT(xfs_buf_rele)
+DEFINE_BUF_EVENT(xfs_buf_iodone)
+DEFINE_BUF_EVENT(xfs_buf_iorequest)
+DEFINE_BUF_EVENT(xfs_buf_bawrite)
+DEFINE_BUF_EVENT(xfs_buf_bdwrite)
+DEFINE_BUF_EVENT(xfs_buf_lock)
+DEFINE_BUF_EVENT(xfs_buf_lock_done)
+DEFINE_BUF_EVENT(xfs_buf_cond_lock)
+DEFINE_BUF_EVENT(xfs_buf_unlock)
+DEFINE_BUF_EVENT(xfs_buf_iowait)
+DEFINE_BUF_EVENT(xfs_buf_iowait_done)
+DEFINE_BUF_EVENT(xfs_buf_delwri_queue)
+DEFINE_BUF_EVENT(xfs_buf_delwri_dequeue)
+DEFINE_BUF_EVENT(xfs_buf_delwri_split)
+DEFINE_BUF_EVENT(xfs_buf_get_uncached)
+DEFINE_BUF_EVENT(xfs_bdstrat_shut)
+DEFINE_BUF_EVENT(xfs_buf_item_relse)
+DEFINE_BUF_EVENT(xfs_buf_item_iodone)
+DEFINE_BUF_EVENT(xfs_buf_item_iodone_async)
+DEFINE_BUF_EVENT(xfs_buf_error_relse)
+DEFINE_BUF_EVENT(xfs_trans_read_buf_io)
+DEFINE_BUF_EVENT(xfs_trans_read_buf_shut)
 
 /* not really buffer traces, but the buf provides useful information */
-DEFINE_BUF_EVENT(xfs_btree_corrupt);
-DEFINE_BUF_EVENT(xfs_da_btree_corrupt);
-DEFINE_BUF_EVENT(xfs_reset_dqcounts);
-DEFINE_BUF_EVENT(xfs_inode_item_push);
+DEFINE_BUF_EVENT(xfs_btree_corrupt)
+DEFINE_BUF_EVENT(xfs_da_btree_corrupt)
+DEFINE_BUF_EVENT(xfs_reset_dqcounts)
+DEFINE_BUF_EVENT(xfs_inode_item_push)
 
 /* pass flags explicitly */
 DECLARE_EVENT_CLASS(xfs_buf_flags_class,
@@ -385,9 +390,9 @@ DECLARE_EVENT_CLASS(xfs_buf_flags_class,
 DEFINE_EVENT(xfs_buf_flags_class, name, \
 	TP_PROTO(struct xfs_buf *bp, unsigned flags, unsigned long caller_ip), \
 	TP_ARGS(bp, flags, caller_ip))
-DEFINE_BUF_FLAGS_EVENT(xfs_buf_find);
-DEFINE_BUF_FLAGS_EVENT(xfs_buf_get);
-DEFINE_BUF_FLAGS_EVENT(xfs_buf_read);
+DEFINE_BUF_FLAGS_EVENT(xfs_buf_find)
+DEFINE_BUF_FLAGS_EVENT(xfs_buf_get)
+DEFINE_BUF_FLAGS_EVENT(xfs_buf_read)
 
 TRACE_EVENT(xfs_buf_ioerror,
 	TP_PROTO(struct xfs_buf *bp, int error, unsigned long caller_ip),
@@ -425,7 +430,7 @@ TRACE_EVENT(xfs_buf_ioerror,
 		  __entry->error,
 		  __print_flags(__entry->flags, "|", XFS_BUF_FLAGS),
 		  (void *)__entry->caller_ip)
-);
+)
 
 DECLARE_EVENT_CLASS(xfs_buf_item_class,
 	TP_PROTO(struct xfs_buf_log_item *bip),
@@ -479,31 +484,31 @@ DECLARE_EVENT_CLASS(xfs_buf_item_class,
 DEFINE_EVENT(xfs_buf_item_class, name, \
 	TP_PROTO(struct xfs_buf_log_item *bip), \
 	TP_ARGS(bip))
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_stale);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format_stale);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_trylock);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock_stale);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push);
-DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pushbuf);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb_recur);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release);
-DEFINE_BUF_ITEM_EVENT(xfs_trans_binval);
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_size_stale)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_format_stale)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pin)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unpin_stale)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_trylock)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_unlock_stale)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_committed)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_push)
+DEFINE_BUF_ITEM_EVENT(xfs_buf_item_pushbuf)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_get_buf_recur)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_getsb_recur)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_read_buf_recur)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_log_buf)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_brelse)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_bjoin)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_bhold_release)
+DEFINE_BUF_ITEM_EVENT(xfs_trans_binval)
 
 DECLARE_EVENT_CLASS(xfs_lock_class,
 	TP_PROTO(struct xfs_inode *ip, unsigned lock_flags,
@@ -533,10 +538,10 @@ DEFINE_EVENT(xfs_lock_class, name, \
 	TP_PROTO(struct xfs_inode *ip, unsigned lock_flags, \
 		 unsigned long caller_ip), \
 	TP_ARGS(ip,  lock_flags, caller_ip))
-DEFINE_LOCK_EVENT(xfs_ilock);
-DEFINE_LOCK_EVENT(xfs_ilock_nowait);
-DEFINE_LOCK_EVENT(xfs_ilock_demote);
-DEFINE_LOCK_EVENT(xfs_iunlock);
+DEFINE_LOCK_EVENT(xfs_ilock)
+DEFINE_LOCK_EVENT(xfs_ilock_nowait)
+DEFINE_LOCK_EVENT(xfs_ilock_demote)
+DEFINE_LOCK_EVENT(xfs_iunlock)
 
 DECLARE_EVENT_CLASS(xfs_inode_class,
 	TP_PROTO(struct xfs_inode *ip),
@@ -558,32 +563,32 @@ DECLARE_EVENT_CLASS(xfs_inode_class,
 DEFINE_EVENT(xfs_inode_class, name, \
 	TP_PROTO(struct xfs_inode *ip), \
 	TP_ARGS(ip))
-DEFINE_INODE_EVENT(xfs_iget_skip);
-DEFINE_INODE_EVENT(xfs_iget_reclaim);
-DEFINE_INODE_EVENT(xfs_iget_reclaim_fail);
-DEFINE_INODE_EVENT(xfs_iget_hit);
-DEFINE_INODE_EVENT(xfs_iget_miss);
-
-DEFINE_INODE_EVENT(xfs_getattr);
-DEFINE_INODE_EVENT(xfs_setattr);
-DEFINE_INODE_EVENT(xfs_readlink);
-DEFINE_INODE_EVENT(xfs_alloc_file_space);
-DEFINE_INODE_EVENT(xfs_free_file_space);
-DEFINE_INODE_EVENT(xfs_readdir);
+DEFINE_INODE_EVENT(xfs_iget_skip)
+DEFINE_INODE_EVENT(xfs_iget_reclaim)
+DEFINE_INODE_EVENT(xfs_iget_reclaim_fail)
+DEFINE_INODE_EVENT(xfs_iget_hit)
+DEFINE_INODE_EVENT(xfs_iget_miss)
+
+DEFINE_INODE_EVENT(xfs_getattr)
+DEFINE_INODE_EVENT(xfs_setattr)
+DEFINE_INODE_EVENT(xfs_readlink)
+DEFINE_INODE_EVENT(xfs_alloc_file_space)
+DEFINE_INODE_EVENT(xfs_free_file_space)
+DEFINE_INODE_EVENT(xfs_readdir)
 #ifdef CONFIG_XFS_POSIX_ACL
-DEFINE_INODE_EVENT(xfs_check_acl);
+DEFINE_INODE_EVENT(xfs_check_acl)
 #endif
-DEFINE_INODE_EVENT(xfs_vm_bmap);
-DEFINE_INODE_EVENT(xfs_file_ioctl);
-DEFINE_INODE_EVENT(xfs_file_compat_ioctl);
-DEFINE_INODE_EVENT(xfs_ioctl_setattr);
-DEFINE_INODE_EVENT(xfs_file_fsync);
-DEFINE_INODE_EVENT(xfs_destroy_inode);
-DEFINE_INODE_EVENT(xfs_write_inode);
-DEFINE_INODE_EVENT(xfs_evict_inode);
+DEFINE_INODE_EVENT(xfs_vm_bmap)
+DEFINE_INODE_EVENT(xfs_file_ioctl)
+DEFINE_INODE_EVENT(xfs_file_compat_ioctl)
+DEFINE_INODE_EVENT(xfs_ioctl_setattr)
+DEFINE_INODE_EVENT(xfs_file_fsync)
+DEFINE_INODE_EVENT(xfs_destroy_inode)
+DEFINE_INODE_EVENT(xfs_write_inode)
+DEFINE_INODE_EVENT(xfs_evict_inode)
 
-DEFINE_INODE_EVENT(xfs_dquot_dqalloc);
-DEFINE_INODE_EVENT(xfs_dquot_dqdetach);
+DEFINE_INODE_EVENT(xfs_dquot_dqalloc)
+DEFINE_INODE_EVENT(xfs_dquot_dqdetach)
 
 DECLARE_EVENT_CLASS(xfs_iref_class,
 	TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip),
@@ -614,11 +619,11 @@ DECLARE_EVENT_CLASS(xfs_iref_class,
 DEFINE_EVENT(xfs_iref_class, name, \
 	TP_PROTO(struct xfs_inode *ip, unsigned long caller_ip), \
 	TP_ARGS(ip, caller_ip))
-DEFINE_IREF_EVENT(xfs_ihold);
-DEFINE_IREF_EVENT(xfs_irele);
-DEFINE_IREF_EVENT(xfs_inode_pin);
-DEFINE_IREF_EVENT(xfs_inode_unpin);
-DEFINE_IREF_EVENT(xfs_inode_unpin_nowait);
+DEFINE_IREF_EVENT(xfs_ihold)
+DEFINE_IREF_EVENT(xfs_irele)
+DEFINE_IREF_EVENT(xfs_inode_pin)
+DEFINE_IREF_EVENT(xfs_inode_unpin)
+DEFINE_IREF_EVENT(xfs_inode_unpin_nowait)
 
 DECLARE_EVENT_CLASS(xfs_namespace_class,
 	TP_PROTO(struct xfs_inode *dp, struct xfs_name *name),
@@ -643,11 +648,11 @@ DECLARE_EVENT_CLASS(xfs_namespace_class,
 DEFINE_EVENT(xfs_namespace_class, name, \
 	TP_PROTO(struct xfs_inode *dp, struct xfs_name *name), \
 	TP_ARGS(dp, name))
-DEFINE_NAMESPACE_EVENT(xfs_remove);
-DEFINE_NAMESPACE_EVENT(xfs_link);
-DEFINE_NAMESPACE_EVENT(xfs_lookup);
-DEFINE_NAMESPACE_EVENT(xfs_create);
-DEFINE_NAMESPACE_EVENT(xfs_symlink);
+DEFINE_NAMESPACE_EVENT(xfs_remove)
+DEFINE_NAMESPACE_EVENT(xfs_link)
+DEFINE_NAMESPACE_EVENT(xfs_lookup)
+DEFINE_NAMESPACE_EVENT(xfs_create)
+DEFINE_NAMESPACE_EVENT(xfs_symlink)
 
 TRACE_EVENT(xfs_rename,
 	TP_PROTO(struct xfs_inode *src_dp, struct xfs_inode *target_dp,
@@ -729,31 +734,31 @@ DECLARE_EVENT_CLASS(xfs_dquot_class,
 DEFINE_EVENT(xfs_dquot_class, name, \
 	TP_PROTO(struct xfs_dquot *dqp), \
 	TP_ARGS(dqp))
-DEFINE_DQUOT_EVENT(xfs_dqadjust);
-DEFINE_DQUOT_EVENT(xfs_dqreclaim_want);
-DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty);
-DEFINE_DQUOT_EVENT(xfs_dqreclaim_unlink);
-DEFINE_DQUOT_EVENT(xfs_dqattach_found);
-DEFINE_DQUOT_EVENT(xfs_dqattach_get);
-DEFINE_DQUOT_EVENT(xfs_dqinit);
-DEFINE_DQUOT_EVENT(xfs_dqreuse);
-DEFINE_DQUOT_EVENT(xfs_dqalloc);
-DEFINE_DQUOT_EVENT(xfs_dqtobp_read);
-DEFINE_DQUOT_EVENT(xfs_dqread);
-DEFINE_DQUOT_EVENT(xfs_dqread_fail);
-DEFINE_DQUOT_EVENT(xfs_dqlookup_found);
-DEFINE_DQUOT_EVENT(xfs_dqlookup_want);
-DEFINE_DQUOT_EVENT(xfs_dqlookup_freelist);
-DEFINE_DQUOT_EVENT(xfs_dqlookup_done);
-DEFINE_DQUOT_EVENT(xfs_dqget_hit);
-DEFINE_DQUOT_EVENT(xfs_dqget_miss);
-DEFINE_DQUOT_EVENT(xfs_dqput);
-DEFINE_DQUOT_EVENT(xfs_dqput_wait);
-DEFINE_DQUOT_EVENT(xfs_dqput_free);
-DEFINE_DQUOT_EVENT(xfs_dqrele);
-DEFINE_DQUOT_EVENT(xfs_dqflush);
-DEFINE_DQUOT_EVENT(xfs_dqflush_force);
-DEFINE_DQUOT_EVENT(xfs_dqflush_done);
+DEFINE_DQUOT_EVENT(xfs_dqadjust)
+DEFINE_DQUOT_EVENT(xfs_dqreclaim_want)
+DEFINE_DQUOT_EVENT(xfs_dqreclaim_dirty)
+DEFINE_DQUOT_EVENT(xfs_dqreclaim_unlink)
+DEFINE_DQUOT_EVENT(xfs_dqattach_found)
+DEFINE_DQUOT_EVENT(xfs_dqattach_get)
+DEFINE_DQUOT_EVENT(xfs_dqinit)
+DEFINE_DQUOT_EVENT(xfs_dqreuse)
+DEFINE_DQUOT_EVENT(xfs_dqalloc)
+DEFINE_DQUOT_EVENT(xfs_dqtobp_read)
+DEFINE_DQUOT_EVENT(xfs_dqread)
+DEFINE_DQUOT_EVENT(xfs_dqread_fail)
+DEFINE_DQUOT_EVENT(xfs_dqlookup_found)
+DEFINE_DQUOT_EVENT(xfs_dqlookup_want)
+DEFINE_DQUOT_EVENT(xfs_dqlookup_freelist)
+DEFINE_DQUOT_EVENT(xfs_dqlookup_done)
+DEFINE_DQUOT_EVENT(xfs_dqget_hit)
+DEFINE_DQUOT_EVENT(xfs_dqget_miss)
+DEFINE_DQUOT_EVENT(xfs_dqput)
+DEFINE_DQUOT_EVENT(xfs_dqput_wait)
+DEFINE_DQUOT_EVENT(xfs_dqput_free)
+DEFINE_DQUOT_EVENT(xfs_dqrele)
+DEFINE_DQUOT_EVENT(xfs_dqflush)
+DEFINE_DQUOT_EVENT(xfs_dqflush_force)
+DEFINE_DQUOT_EVENT(xfs_dqflush_done)
 
 DECLARE_EVENT_CLASS(xfs_loggrant_class,
 	TP_PROTO(struct log *log, struct xlog_ticket *tic),
@@ -826,32 +831,32 @@ DECLARE_EVENT_CLASS(xfs_loggrant_class,
 DEFINE_EVENT(xfs_loggrant_class, name, \
 	TP_PROTO(struct log *log, struct xlog_ticket *tic), \
 	TP_ARGS(log, tic))
-DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm);
-DEFINE_LOGGRANT_EVENT(xfs_log_done_perm);
-DEFINE_LOGGRANT_EVENT(xfs_log_reserve);
-DEFINE_LOGGRANT_EVENT(xfs_log_umount_write);
-DEFINE_LOGGRANT_EVENT(xfs_log_grant_enter);
-DEFINE_LOGGRANT_EVENT(xfs_log_grant_exit);
-DEFINE_LOGGRANT_EVENT(xfs_log_grant_error);
-DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep1);
-DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake1);
-DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep2);
-DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake2);
-DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake_up);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_enter);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_exit);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_error);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep1);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake1);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep2);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake2);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake_up);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_enter);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_exit);
-DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_sub);
-DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_enter);
-DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit);
-DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub);
+DEFINE_LOGGRANT_EVENT(xfs_log_done_nonperm)
+DEFINE_LOGGRANT_EVENT(xfs_log_done_perm)
+DEFINE_LOGGRANT_EVENT(xfs_log_reserve)
+DEFINE_LOGGRANT_EVENT(xfs_log_umount_write)
+DEFINE_LOGGRANT_EVENT(xfs_log_grant_enter)
+DEFINE_LOGGRANT_EVENT(xfs_log_grant_exit)
+DEFINE_LOGGRANT_EVENT(xfs_log_grant_error)
+DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep1)
+DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake1)
+DEFINE_LOGGRANT_EVENT(xfs_log_grant_sleep2)
+DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake2)
+DEFINE_LOGGRANT_EVENT(xfs_log_grant_wake_up)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_enter)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_exit)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_error)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep1)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake1)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_sleep2)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake2)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_write_wake_up)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_enter)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_exit)
+DEFINE_LOGGRANT_EVENT(xfs_log_regrant_reserve_sub)
+DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_enter)
+DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_exit)
+DEFINE_LOGGRANT_EVENT(xfs_log_ungrant_sub)
 
 DECLARE_EVENT_CLASS(xfs_file_class,
 	TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags),
@@ -889,11 +894,11 @@ DECLARE_EVENT_CLASS(xfs_file_class,
 DEFINE_EVENT(xfs_file_class, name,	\
 	TP_PROTO(struct xfs_inode *ip, size_t count, loff_t offset, int flags),	\
 	TP_ARGS(ip, count, offset, flags))
-DEFINE_RW_EVENT(xfs_file_read);
-DEFINE_RW_EVENT(xfs_file_buffered_write);
-DEFINE_RW_EVENT(xfs_file_direct_write);
-DEFINE_RW_EVENT(xfs_file_splice_read);
-DEFINE_RW_EVENT(xfs_file_splice_write);
+DEFINE_RW_EVENT(xfs_file_read)
+DEFINE_RW_EVENT(xfs_file_buffered_write)
+DEFINE_RW_EVENT(xfs_file_direct_write)
+DEFINE_RW_EVENT(xfs_file_splice_read)
+DEFINE_RW_EVENT(xfs_file_splice_write)
 
 DECLARE_EVENT_CLASS(xfs_page_class,
 	TP_PROTO(struct inode *inode, struct page *page, unsigned long off),
@@ -935,9 +940,9 @@ DECLARE_EVENT_CLASS(xfs_page_class,
 DEFINE_EVENT(xfs_page_class, name,	\
 	TP_PROTO(struct inode *inode, struct page *page, unsigned long off),	\
 	TP_ARGS(inode, page, off))
-DEFINE_PAGE_EVENT(xfs_writepage);
-DEFINE_PAGE_EVENT(xfs_releasepage);
-DEFINE_PAGE_EVENT(xfs_invalidatepage);
+DEFINE_PAGE_EVENT(xfs_writepage)
+DEFINE_PAGE_EVENT(xfs_releasepage)
+DEFINE_PAGE_EVENT(xfs_invalidatepage)
 
 DECLARE_EVENT_CLASS(xfs_imap_class,
 	TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count,
@@ -987,10 +992,10 @@ DEFINE_EVENT(xfs_imap_class, name,	\
 	TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count,	\
 		 int type, struct xfs_bmbt_irec *irec),		\
 	TP_ARGS(ip, offset, count, type, irec))
-DEFINE_IOMAP_EVENT(xfs_map_blocks_found);
-DEFINE_IOMAP_EVENT(xfs_map_blocks_alloc);
-DEFINE_IOMAP_EVENT(xfs_get_blocks_found);
-DEFINE_IOMAP_EVENT(xfs_get_blocks_alloc);
+DEFINE_IOMAP_EVENT(xfs_map_blocks_found)
+DEFINE_IOMAP_EVENT(xfs_map_blocks_alloc)
+DEFINE_IOMAP_EVENT(xfs_get_blocks_found)
+DEFINE_IOMAP_EVENT(xfs_get_blocks_alloc)
 
 DECLARE_EVENT_CLASS(xfs_simple_io_class,
 	TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count),
@@ -1019,15 +1024,15 @@ DECLARE_EVENT_CLASS(xfs_simple_io_class,
 		  __entry->new_size,
 		  __entry->offset,
 		  __entry->count)
-);
+)
 
 #define DEFINE_SIMPLE_IO_EVENT(name)	\
 DEFINE_EVENT(xfs_simple_io_class, name,	\
 	TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count),	\
 	TP_ARGS(ip, offset, count))
-DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc);
-DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert);
-DEFINE_SIMPLE_IO_EVENT(xfs_get_blocks_notfound);
+DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc)
+DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert)
+DEFINE_SIMPLE_IO_EVENT(xfs_get_blocks_notfound)
 
 
 TRACE_EVENT(xfs_itruncate_start,
@@ -1061,7 +1066,7 @@ TRACE_EVENT(xfs_itruncate_start,
 		  __entry->new_size,
 		  __entry->toss_start,
 		  __entry->toss_finish)
-);
+)
 
 DECLARE_EVENT_CLASS(xfs_itrunc_class,
 	TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size),
@@ -1089,8 +1094,8 @@ DECLARE_EVENT_CLASS(xfs_itrunc_class,
 DEFINE_EVENT(xfs_itrunc_class, name, \
 	TP_PROTO(struct xfs_inode *ip, xfs_fsize_t new_size), \
 	TP_ARGS(ip, new_size))
-DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_start);
-DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_end);
+DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_start)
+DEFINE_ITRUNC_EVENT(xfs_itruncate_finish_end)
 
 TRACE_EVENT(xfs_pagecache_inval,
 	TP_PROTO(struct xfs_inode *ip, xfs_off_t start, xfs_off_t finish),
@@ -1115,7 +1120,7 @@ TRACE_EVENT(xfs_pagecache_inval,
 		  __entry->size,
 		  __entry->start,
 		  __entry->finish)
-);
+)
 
 TRACE_EVENT(xfs_bunmap,
 	TP_PROTO(struct xfs_inode *ip, xfs_fileoff_t bno, xfs_filblks_t len,
@@ -1149,7 +1154,7 @@ TRACE_EVENT(xfs_bunmap,
 		  __print_flags(__entry->flags, "|", XFS_BMAPI_FLAGS),
 		  (void *)__entry->caller_ip)
 
-);
+)
 
 #define XFS_BUSY_SYNC \
 	{ 0,	"async" }, \
@@ -1186,7 +1191,7 @@ TRACE_EVENT(xfs_alloc_busy,
 		  __entry->len,
 		  __print_symbolic(__entry->sync, XFS_BUSY_SYNC))
 
-);
+)
 
 TRACE_EVENT(xfs_alloc_unbusy,
 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
@@ -1209,7 +1214,7 @@ TRACE_EVENT(xfs_alloc_unbusy,
 		  __entry->agno,
 		  __entry->agbno,
 		  __entry->len)
-);
+)
 
 #define XFS_BUSY_STATES \
 	{ 0,	"missing" }, \
@@ -1239,7 +1244,7 @@ TRACE_EVENT(xfs_alloc_busysearch,
 		  __entry->agbno,
 		  __entry->len,
 		  __print_symbolic(__entry->found, XFS_BUSY_STATES))
-);
+)
 
 TRACE_EVENT(xfs_trans_commit_lsn,
 	TP_PROTO(struct xfs_trans *trans),
@@ -1258,7 +1263,7 @@ TRACE_EVENT(xfs_trans_commit_lsn,
 		  MAJOR(__entry->dev), MINOR(__entry->dev),
 		  __entry->tp,
 		  __entry->lsn)
-);
+)
 
 TRACE_EVENT(xfs_agf,
 	TP_PROTO(struct xfs_mount *mp, struct xfs_agf *agf, int flags,
@@ -1315,7 +1320,7 @@ TRACE_EVENT(xfs_agf,
 		  __entry->freeblks,
 		  __entry->longest,
 		  (void *)__entry->caller_ip)
-);
+)
 
 TRACE_EVENT(xfs_free_extent,
 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, xfs_agblock_t agbno,
@@ -1349,7 +1354,7 @@ TRACE_EVENT(xfs_free_extent,
 			(__entry->haveright ? "both" : "left") :
 			(__entry->haveright ? "right" : "none"))
 
-);
+)
 
 DECLARE_EVENT_CLASS(xfs_alloc_class,
 	TP_PROTO(struct xfs_alloc_arg *args),
@@ -1425,28 +1430,28 @@ DECLARE_EVENT_CLASS(xfs_alloc_class,
 DEFINE_EVENT(xfs_alloc_class, name, \
 	TP_PROTO(struct xfs_alloc_arg *args), \
 	TP_ARGS(args))
-DEFINE_ALLOC_EVENT(xfs_alloc_exact_done);
-DEFINE_ALLOC_EVENT(xfs_alloc_exact_notfound);
-DEFINE_ALLOC_EVENT(xfs_alloc_exact_error);
-DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft);
-DEFINE_ALLOC_EVENT(xfs_alloc_near_first);
-DEFINE_ALLOC_EVENT(xfs_alloc_near_greater);
-DEFINE_ALLOC_EVENT(xfs_alloc_near_lesser);
-DEFINE_ALLOC_EVENT(xfs_alloc_near_error);
-DEFINE_ALLOC_EVENT(xfs_alloc_size_neither);
-DEFINE_ALLOC_EVENT(xfs_alloc_size_noentry);
-DEFINE_ALLOC_EVENT(xfs_alloc_size_nominleft);
-DEFINE_ALLOC_EVENT(xfs_alloc_size_done);
-DEFINE_ALLOC_EVENT(xfs_alloc_size_error);
-DEFINE_ALLOC_EVENT(xfs_alloc_small_freelist);
-DEFINE_ALLOC_EVENT(xfs_alloc_small_notenough);
-DEFINE_ALLOC_EVENT(xfs_alloc_small_done);
-DEFINE_ALLOC_EVENT(xfs_alloc_small_error);
-DEFINE_ALLOC_EVENT(xfs_alloc_vextent_badargs);
-DEFINE_ALLOC_EVENT(xfs_alloc_vextent_nofix);
-DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noagbp);
-DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed);
-DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed);
+DEFINE_ALLOC_EVENT(xfs_alloc_exact_done)
+DEFINE_ALLOC_EVENT(xfs_alloc_exact_notfound)
+DEFINE_ALLOC_EVENT(xfs_alloc_exact_error)
+DEFINE_ALLOC_EVENT(xfs_alloc_near_nominleft)
+DEFINE_ALLOC_EVENT(xfs_alloc_near_first)
+DEFINE_ALLOC_EVENT(xfs_alloc_near_greater)
+DEFINE_ALLOC_EVENT(xfs_alloc_near_lesser)
+DEFINE_ALLOC_EVENT(xfs_alloc_near_error)
+DEFINE_ALLOC_EVENT(xfs_alloc_size_neither)
+DEFINE_ALLOC_EVENT(xfs_alloc_size_noentry)
+DEFINE_ALLOC_EVENT(xfs_alloc_size_nominleft)
+DEFINE_ALLOC_EVENT(xfs_alloc_size_done)
+DEFINE_ALLOC_EVENT(xfs_alloc_size_error)
+DEFINE_ALLOC_EVENT(xfs_alloc_small_freelist)
+DEFINE_ALLOC_EVENT(xfs_alloc_small_notenough)
+DEFINE_ALLOC_EVENT(xfs_alloc_small_done)
+DEFINE_ALLOC_EVENT(xfs_alloc_small_error)
+DEFINE_ALLOC_EVENT(xfs_alloc_vextent_badargs)
+DEFINE_ALLOC_EVENT(xfs_alloc_vextent_nofix)
+DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noagbp)
+DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed)
+DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed)
 
 DECLARE_EVENT_CLASS(xfs_dir2_class,
 	TP_PROTO(struct xfs_da_args *args),
@@ -1486,31 +1491,31 @@ DECLARE_EVENT_CLASS(xfs_dir2_class,
 DEFINE_EVENT(xfs_dir2_class, name, \
 	TP_PROTO(struct xfs_da_args *args), \
 	TP_ARGS(args))
-DEFINE_DIR2_EVENT(xfs_dir2_sf_addname);
-DEFINE_DIR2_EVENT(xfs_dir2_sf_create);
-DEFINE_DIR2_EVENT(xfs_dir2_sf_lookup);
-DEFINE_DIR2_EVENT(xfs_dir2_sf_replace);
-DEFINE_DIR2_EVENT(xfs_dir2_sf_removename);
-DEFINE_DIR2_EVENT(xfs_dir2_sf_toino4);
-DEFINE_DIR2_EVENT(xfs_dir2_sf_toino8);
-DEFINE_DIR2_EVENT(xfs_dir2_sf_to_block);
-DEFINE_DIR2_EVENT(xfs_dir2_block_addname);
-DEFINE_DIR2_EVENT(xfs_dir2_block_lookup);
-DEFINE_DIR2_EVENT(xfs_dir2_block_replace);
-DEFINE_DIR2_EVENT(xfs_dir2_block_removename);
-DEFINE_DIR2_EVENT(xfs_dir2_block_to_sf);
-DEFINE_DIR2_EVENT(xfs_dir2_block_to_leaf);
-DEFINE_DIR2_EVENT(xfs_dir2_leaf_addname);
-DEFINE_DIR2_EVENT(xfs_dir2_leaf_lookup);
-DEFINE_DIR2_EVENT(xfs_dir2_leaf_replace);
-DEFINE_DIR2_EVENT(xfs_dir2_leaf_removename);
-DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_block);
-DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_node);
-DEFINE_DIR2_EVENT(xfs_dir2_node_addname);
-DEFINE_DIR2_EVENT(xfs_dir2_node_lookup);
-DEFINE_DIR2_EVENT(xfs_dir2_node_replace);
-DEFINE_DIR2_EVENT(xfs_dir2_node_removename);
-DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf);
+DEFINE_DIR2_EVENT(xfs_dir2_sf_addname)
+DEFINE_DIR2_EVENT(xfs_dir2_sf_create)
+DEFINE_DIR2_EVENT(xfs_dir2_sf_lookup)
+DEFINE_DIR2_EVENT(xfs_dir2_sf_replace)
+DEFINE_DIR2_EVENT(xfs_dir2_sf_removename)
+DEFINE_DIR2_EVENT(xfs_dir2_sf_toino4)
+DEFINE_DIR2_EVENT(xfs_dir2_sf_toino8)
+DEFINE_DIR2_EVENT(xfs_dir2_sf_to_block)
+DEFINE_DIR2_EVENT(xfs_dir2_block_addname)
+DEFINE_DIR2_EVENT(xfs_dir2_block_lookup)
+DEFINE_DIR2_EVENT(xfs_dir2_block_replace)
+DEFINE_DIR2_EVENT(xfs_dir2_block_removename)
+DEFINE_DIR2_EVENT(xfs_dir2_block_to_sf)
+DEFINE_DIR2_EVENT(xfs_dir2_block_to_leaf)
+DEFINE_DIR2_EVENT(xfs_dir2_leaf_addname)
+DEFINE_DIR2_EVENT(xfs_dir2_leaf_lookup)
+DEFINE_DIR2_EVENT(xfs_dir2_leaf_replace)
+DEFINE_DIR2_EVENT(xfs_dir2_leaf_removename)
+DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_block)
+DEFINE_DIR2_EVENT(xfs_dir2_leaf_to_node)
+DEFINE_DIR2_EVENT(xfs_dir2_node_addname)
+DEFINE_DIR2_EVENT(xfs_dir2_node_lookup)
+DEFINE_DIR2_EVENT(xfs_dir2_node_replace)
+DEFINE_DIR2_EVENT(xfs_dir2_node_removename)
+DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf)
 
 DECLARE_EVENT_CLASS(xfs_dir2_space_class,
 	TP_PROTO(struct xfs_da_args *args, int idx),
@@ -1538,10 +1543,10 @@ DECLARE_EVENT_CLASS(xfs_dir2_space_class
 DEFINE_EVENT(xfs_dir2_space_class, name, \
 	TP_PROTO(struct xfs_da_args *args, int idx), \
 	TP_ARGS(args, idx))
-DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_add);
-DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_remove);
-DEFINE_DIR2_SPACE_EVENT(xfs_dir2_grow_inode);
-DEFINE_DIR2_SPACE_EVENT(xfs_dir2_shrink_inode);
+DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_add)
+DEFINE_DIR2_SPACE_EVENT(xfs_dir2_leafn_remove)
+DEFINE_DIR2_SPACE_EVENT(xfs_dir2_grow_inode)
+DEFINE_DIR2_SPACE_EVENT(xfs_dir2_shrink_inode)
 
 TRACE_EVENT(xfs_dir2_leafn_moveents,
 	TP_PROTO(struct xfs_da_args *args, int src_idx, int dst_idx, int count),
@@ -1570,7 +1575,7 @@ TRACE_EVENT(xfs_dir2_leafn_moveents,
 		  __entry->src_idx,
 		  __entry->dst_idx,
 		  __entry->count)
-);
+)
 
 #define XFS_SWAPEXT_INODES \
 	{ 0,	"target" }, \
@@ -1622,8 +1627,8 @@ DEFINE_EVENT(xfs_swap_extent_class, name
 	TP_PROTO(struct xfs_inode *ip, int which), \
 	TP_ARGS(ip, which))
 
-DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before);
-DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after);
+DEFINE_SWAPEXT_EVENT(xfs_swap_extent_before)
+DEFINE_SWAPEXT_EVENT(xfs_swap_extent_after)
 
 DECLARE_EVENT_CLASS(xfs_log_recover_item_class,
 	TP_PROTO(struct log *log, struct xlog_recover *trans,
@@ -1664,11 +1669,11 @@ DEFINE_EVENT(xfs_log_recover_item_class,
 		struct xlog_recover_item *item, int pass), \
 	TP_ARGS(log, trans, item, pass))
 
-DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add);
-DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add_cont);
-DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_head);
-DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail);
-DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover);
+DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add)
+DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_add_cont)
+DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_head)
+DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_reorder_tail)
+DEFINE_LOG_RECOVER_ITEM(xfs_log_recover_item_recover)
 
 DECLARE_EVENT_CLASS(xfs_log_recover_buf_item_class,
 	TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f),
@@ -1704,14 +1709,14 @@ DEFINE_EVENT(xfs_log_recover_buf_item_cl
 	TP_PROTO(struct log *log, struct xfs_buf_log_format *buf_f), \
 	TP_ARGS(log, buf_f))
 
-DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel);
-DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel);
-DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_add);
-DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_ref_inc);
-DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_recover);
-DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_inode_buf);
-DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf);
-DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf);
+DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_not_cancel)
+DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel)
+DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_add)
+DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_cancel_ref_inc)
+DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_recover)
+DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_inode_buf)
+DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_reg_buf)
+DEFINE_LOG_RECOVER_BUF_ITEM(xfs_log_recover_buf_dquot_buf)
 
 DECLARE_EVENT_CLASS(xfs_log_recover_ino_item_class,
 	TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f),
@@ -1755,9 +1760,9 @@ DEFINE_EVENT(xfs_log_recover_ino_item_cl
 	TP_PROTO(struct log *log, struct xfs_inode_log_format *in_f), \
 	TP_ARGS(log, in_f))
 
-DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover);
-DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel);
-DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip);
+DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_recover)
+DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_cancel)
+DEFINE_LOG_RECOVER_INO_ITEM(xfs_log_recover_inode_skip)
 
 DECLARE_EVENT_CLASS(xfs_discard_class,
 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno,
@@ -1787,10 +1792,10 @@ DEFINE_EVENT(xfs_discard_class, name, \
 	TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, \
 		 xfs_agblock_t agbno, xfs_extlen_t len), \
 	TP_ARGS(mp, agno, agbno, len))
-DEFINE_DISCARD_EVENT(xfs_discard_extent);
-DEFINE_DISCARD_EVENT(xfs_discard_toosmall);
-DEFINE_DISCARD_EVENT(xfs_discard_exclude);
-DEFINE_DISCARD_EVENT(xfs_discard_busy);
+DEFINE_DISCARD_EVENT(xfs_discard_extent)
+DEFINE_DISCARD_EVENT(xfs_discard_toosmall)
+DEFINE_DISCARD_EVENT(xfs_discard_exclude)
+DEFINE_DISCARD_EVENT(xfs_discard_busy)
 
 #endif /* _TRACE_XFS_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 28/32] trace event powerpc remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (25 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 27/32] trace event xfs " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 29/32] trace event asoc " Mathieu Desnoyers
                   ` (4 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Anton Blanchard, Paul Mackerras,
	Christoph Hellwig, Jeremy Kerr, Benjamin Herrenschmidt

[-- Attachment #1: trace-event-powerpc-remove-semicolons.patch --]
[-- Type: text/plain, Size: 2974 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Anton Blanchard <anton@samba.org>
CC: Paul Mackerras <paulus@samba.org>
CC: Christoph Hellwig <hch@lst.de>
CC: Jeremy Kerr <jk@ozlabs.org>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/trace.h             |   23 +++++++++++++++++------
 arch/powerpc/platforms/cell/spufs/sputrace.h |    2 +-
 2 files changed, 18 insertions(+), 7 deletions(-)

Index: linux-2.6-lttng/arch/powerpc/include/asm/trace.h
===================================================================
--- linux-2.6-lttng.orig/arch/powerpc/include/asm/trace.h
+++ linux-2.6-lttng/arch/powerpc/include/asm/trace.h
@@ -6,8 +6,13 @@
 
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_POWERPC_DEF_
+#define _TRACE_POWERPC_DEF_
+
 struct pt_regs;
 
+#endif /* _TRACE_POWERPC_DEF_ */
+
 TRACE_EVENT(irq_entry,
 
 	TP_PROTO(struct pt_regs *regs),
@@ -23,7 +28,7 @@ TRACE_EVENT(irq_entry,
 	),
 
 	TP_printk("pt_regs=%p", __entry->regs)
-);
+)
 
 TRACE_EVENT(irq_exit,
 
@@ -40,7 +45,7 @@ TRACE_EVENT(irq_exit,
 	),
 
 	TP_printk("pt_regs=%p", __entry->regs)
-);
+)
 
 TRACE_EVENT(timer_interrupt_entry,
 
@@ -57,7 +62,7 @@ TRACE_EVENT(timer_interrupt_entry,
 	),
 
 	TP_printk("pt_regs=%p", __entry->regs)
-);
+)
 
 TRACE_EVENT(timer_interrupt_exit,
 
@@ -74,12 +79,18 @@ TRACE_EVENT(timer_interrupt_exit,
 	),
 
 	TP_printk("pt_regs=%p", __entry->regs)
-);
+)
 
 #ifdef CONFIG_PPC_PSERIES
+
+#ifndef _TRACE_PPC_PSERIES_DEF_
+#define _TRACE_PPC_PSERIES_DEF_
+
 extern void hcall_tracepoint_regfunc(void);
 extern void hcall_tracepoint_unregfunc(void);
 
+#endif /* _TRACE_PPC_PSERIES_DEF_ */
+
 TRACE_EVENT_FN(hcall_entry,
 
 	TP_PROTO(unsigned long opcode, unsigned long *args),
@@ -97,7 +108,7 @@ TRACE_EVENT_FN(hcall_entry,
 	TP_printk("opcode=%lu", __entry->opcode),
 
 	hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
-);
+)
 
 TRACE_EVENT_FN(hcall_exit,
 
@@ -119,7 +130,7 @@ TRACE_EVENT_FN(hcall_exit,
 	TP_printk("opcode=%lu retval=%lu", __entry->opcode, __entry->retval),
 
 	hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
-);
+)
 #endif
 
 #endif /* _TRACE_POWERPC_H */
Index: linux-2.6-lttng/arch/powerpc/platforms/cell/spufs/sputrace.h
===================================================================
--- linux-2.6-lttng.orig/arch/powerpc/platforms/cell/spufs/sputrace.h
+++ linux-2.6-lttng/arch/powerpc/platforms/cell/spufs/sputrace.h
@@ -24,7 +24,7 @@ TRACE_EVENT(spufs_context,
 
 	TP_printk("%s (ctxthread = %d, spu = %d)",
 		__entry->name, __entry->owner_tid, __entry->number)
-);
+)
 
 #define spu_context_trace(name, ctx, spu) \
 	trace_spufs_context(ctx, spu, __stringify(name))


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (26 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 28/32] trace event powerpc " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03 13:21   ` Mark Brown
  2011-05-03 14:29   ` Mark Brown
  2011-05-02 21:11 ` [RFC patch 30/32] trace event compaction " Mathieu Desnoyers
                   ` (3 subsequent siblings)
  31 siblings, 2 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Mark Brown

[-- Attachment #1: trace-event-asoc-remove-semicolons.patch --]
[-- Type: text/plain, Size: 3880 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/trace/events/asoc.h |   39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)

Index: linux-2.6-lttng/include/trace/events/asoc.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/asoc.h
+++ linux-2.6-lttng/include/trace/events/asoc.h
@@ -7,11 +7,16 @@
 #include <linux/ktime.h>
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_ASOC_DEF_
+#define _TRACE_ASOC_DEF_
+
 struct snd_soc_jack;
 struct snd_soc_codec;
 struct snd_soc_card;
 struct snd_soc_dapm_widget;
 
+#endif /* _TRACE_ASOC_DEF_ */
+
 /*
  * Log register events
  */
@@ -39,7 +44,7 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
 	TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name),
 		  (int)__entry->id, (unsigned int)__entry->reg,
 		  (unsigned int)__entry->val)
-);
+)
 
 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_write,
 
@@ -48,7 +53,7 @@ DEFINE_EVENT(snd_soc_reg, snd_soc_reg_wr
 
 	TP_ARGS(codec, reg, val)
 
-);
+)
 
 DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read,
 
@@ -57,7 +62,7 @@ DEFINE_EVENT(snd_soc_reg, snd_soc_reg_re
 
 	TP_ARGS(codec, reg, val)
 
-);
+)
 
 DECLARE_EVENT_CLASS(snd_soc_card,
 
@@ -76,7 +81,7 @@ DECLARE_EVENT_CLASS(snd_soc_card,
 	),
 
 	TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
-);
+)
 
 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
 
@@ -84,7 +89,7 @@ DEFINE_EVENT(snd_soc_card, snd_soc_bias_
 
 	TP_ARGS(card, val)
 
-);
+)
 
 DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
 
@@ -92,7 +97,7 @@ DEFINE_EVENT(snd_soc_card, snd_soc_bias_
 
 	TP_ARGS(card, val)
 
-);
+)
 
 DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
 
@@ -109,7 +114,7 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
 	),
 
 	TP_printk("card=%s", __get_str(name))
-);
+)
 
 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
 
@@ -117,7 +122,7 @@ DEFINE_EVENT(snd_soc_dapm_basic, snd_soc
 
 	TP_ARGS(card)
 
-);
+)
 
 DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
 
@@ -125,7 +130,7 @@ DEFINE_EVENT(snd_soc_dapm_basic, snd_soc
 
 	TP_ARGS(card)
 
-);
+)
 
 DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
 
@@ -145,7 +150,7 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
 
 	TP_printk("widget=%s val=%d", __get_str(name),
 		  (int)__entry->val)
-);
+)
 
 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
 
@@ -153,7 +158,7 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_so
 
 	TP_ARGS(w, val)
 
-);
+)
 
 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
 
@@ -161,7 +166,7 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_so
 
 	TP_ARGS(w, val)
 
-);
+)
 
 DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
 
@@ -169,7 +174,7 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_so
 
 	TP_ARGS(w, val)
 
-);
+)
 
 TRACE_EVENT(snd_soc_jack_irq,
 
@@ -186,7 +191,7 @@ TRACE_EVENT(snd_soc_jack_irq,
 	),
 
 	TP_printk("%s", __get_str(name))
-);
+)
 
 TRACE_EVENT(snd_soc_jack_report,
 
@@ -208,7 +213,7 @@ TRACE_EVENT(snd_soc_jack_report,
 
 	TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
 		  (int)__entry->mask)
-);
+)
 
 TRACE_EVENT(snd_soc_jack_notify,
 
@@ -227,7 +232,7 @@ TRACE_EVENT(snd_soc_jack_notify,
 	),
 
 	TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
-);
+)
 
 TRACE_EVENT(snd_soc_cache_sync,
 
@@ -252,7 +257,7 @@ TRACE_EVENT(snd_soc_cache_sync,
 
 	TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
 		  (int)__entry->id, __get_str(type), __get_str(status))
-);
+)
 
 #endif /* _TRACE_ASOC_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 30/32] trace event compaction remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (27 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 29/32] trace event asoc " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-02 21:11 ` [RFC patch 31/32] trace event regulator " Mathieu Desnoyers
                   ` (2 subsequent siblings)
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Mel Gorman

[-- Attachment #1: trace-event-compaction-remove-semicolons.patch --]
[-- Type: text/plain, Size: 1532 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Mel Gorman <mel@csn.ul.ie>
---
 include/trace/events/compaction.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6-lttng/include/trace/events/compaction.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/compaction.h
+++ linux-2.6-lttng/include/trace/events/compaction.h
@@ -28,7 +28,7 @@ DECLARE_EVENT_CLASS(mm_compaction_isolat
 	TP_printk("nr_scanned=%lu nr_taken=%lu",
 		__entry->nr_scanned,
 		__entry->nr_taken)
-);
+)
 
 DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_migratepages,
 
@@ -36,14 +36,14 @@ DEFINE_EVENT(mm_compaction_isolate_templ
 		unsigned long nr_taken),
 
 	TP_ARGS(nr_scanned, nr_taken)
-);
+)
 
 DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages,
 	TP_PROTO(unsigned long nr_scanned,
 		unsigned long nr_taken),
 
 	TP_ARGS(nr_scanned, nr_taken)
-);
+)
 
 TRACE_EVENT(mm_compaction_migratepages,
 
@@ -65,7 +65,7 @@ TRACE_EVENT(mm_compaction_migratepages,
 	TP_printk("nr_migrated=%lu nr_failed=%lu",
 		__entry->nr_migrated,
 		__entry->nr_failed)
-);
+)
 
 
 #endif /* _TRACE_COMPACTION_H */


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 31/32] trace event regulator remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (28 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 30/32] trace event compaction " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
  2011-05-03 14:30   ` Mark Brown
  2011-05-02 21:11 ` [RFC patch 32/32] trace event btrfs " Mathieu Desnoyers
       [not found] ` <20110502213211.250108074@efficios.com>
  31 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Mark Brown

[-- Attachment #1: trace-event-regulator-remove-semicolons.patch --]
[-- Type: text/plain, Size: 2320 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/trace/events/regulator.h |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Index: linux-2.6-lttng/include/trace/events/regulator.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/regulator.h
+++ linux-2.6-lttng/include/trace/events/regulator.h
@@ -27,7 +27,7 @@ DECLARE_EVENT_CLASS(regulator_basic,
 
 	TP_printk("name=%s", __get_str(name))
 
-);
+)
 
 DEFINE_EVENT(regulator_basic, regulator_enable,
 
@@ -35,7 +35,7 @@ DEFINE_EVENT(regulator_basic, regulator_
 
 	TP_ARGS(name)
 
-);
+)
 
 DEFINE_EVENT(regulator_basic, regulator_enable_delay,
 
@@ -43,7 +43,7 @@ DEFINE_EVENT(regulator_basic, regulator_
 
 	TP_ARGS(name)
 
-);
+)
 
 DEFINE_EVENT(regulator_basic, regulator_enable_complete,
 
@@ -51,7 +51,7 @@ DEFINE_EVENT(regulator_basic, regulator_
 
 	TP_ARGS(name)
 
-);
+)
 
 DEFINE_EVENT(regulator_basic, regulator_disable,
 
@@ -59,7 +59,7 @@ DEFINE_EVENT(regulator_basic, regulator_
 
 	TP_ARGS(name)
 
-);
+)
 
 DEFINE_EVENT(regulator_basic, regulator_disable_complete,
 
@@ -67,7 +67,7 @@ DEFINE_EVENT(regulator_basic, regulator_
 
 	TP_ARGS(name)
 
-);
+)
 
 /*
  * Events that take a range of numerical values, mostly for voltages
@@ -93,7 +93,7 @@ DECLARE_EVENT_CLASS(regulator_range,
 
 	TP_printk("name=%s (%d-%d)", __get_str(name),
 		  (int)__entry->min, (int)__entry->max)
-);
+)
 
 DEFINE_EVENT(regulator_range, regulator_set_voltage,
 
@@ -101,7 +101,7 @@ DEFINE_EVENT(regulator_range, regulator_
 
 	TP_ARGS(name, min, max)
 
-);
+)
 
 
 /*
@@ -125,7 +125,7 @@ DECLARE_EVENT_CLASS(regulator_value,
 
 	TP_printk("name=%s, val=%u", __get_str(name),
 		  (int)__entry->val)
-);
+)
 
 DEFINE_EVENT(regulator_value, regulator_set_voltage_complete,
 
@@ -133,7 +133,7 @@ DEFINE_EVENT(regulator_value, regulator_
 
 	TP_ARGS(name, value)
 
-);
+)
 
 #endif /* _TRACE_POWER_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 32/32] trace event btrfs remove semicolons
  2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
                   ` (29 preceding siblings ...)
  2011-05-02 21:11 ` [RFC patch 31/32] trace event regulator " Mathieu Desnoyers
@ 2011-05-02 21:11 ` Mathieu Desnoyers
       [not found] ` <20110502213211.250108074@efficios.com>
  31 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-02 21:11 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, liubo

[-- Attachment #1: trace-event-btrfs-remove-semicolons.patch --]
[-- Type: text/plain, Size: 6400 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: liubo <liubo2009@cn.fujitsu.com>
---
 include/trace/events/btrfs.h |   57 +++++++++++++++++++++++--------------------
 1 file changed, 31 insertions(+), 26 deletions(-)

Index: linux-2.6-lttng/include/trace/events/btrfs.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/btrfs.h
+++ linux-2.6-lttng/include/trace/events/btrfs.h
@@ -7,6 +7,9 @@
 #include <linux/writeback.h>
 #include <linux/tracepoint.h>
 
+#ifndef _TRACE_BTRFS_DEF_
+#define _TRACE_BTRFS_DEF_
+
 struct btrfs_root;
 struct btrfs_fs_info;
 struct btrfs_inode;
@@ -19,6 +22,8 @@ struct btrfs_delayed_ref_head;
 struct map_lookup;
 struct extent_buffer;
 
+#endif /* _TRACE_BTRFS_DEF_ */
+
 #define show_ref_type(type)						\
 	__print_symbolic(type,						\
 		{ BTRFS_TREE_BLOCK_REF_KEY, 	"TREE_BLOCK_REF" },	\
@@ -63,7 +68,7 @@ TRACE_EVENT(btrfs_transaction_commit,
 	TP_printk("root = %llu(%s), gen = %llu",
 		  show_root_type(__entry->root_objectid),
 		  (unsigned long long)__entry->generation)
-);
+)
 
 DECLARE_EVENT_CLASS(btrfs__inode,
 
@@ -101,28 +106,28 @@ DECLARE_EVENT_CLASS(btrfs__inode,
 		  (unsigned long long)__entry->disk_i_size,
 		  (unsigned long long)__entry->last_trans,
 		  (unsigned long long)__entry->logged_trans)
-);
+)
 
 DEFINE_EVENT(btrfs__inode, btrfs_inode_new,
 
 	TP_PROTO(struct inode *inode),
 
 	TP_ARGS(inode)
-);
+)
 
 DEFINE_EVENT(btrfs__inode, btrfs_inode_request,
 
 	TP_PROTO(struct inode *inode),
 
 	TP_ARGS(inode)
-);
+)
 
 DEFINE_EVENT(btrfs__inode, btrfs_inode_evict,
 
 	TP_PROTO(struct inode *inode),
 
 	TP_ARGS(inode)
-);
+)
 
 #define __show_map_type(type)						\
 	__print_symbolic(type,						\
@@ -183,7 +188,7 @@ TRACE_EVENT(btrfs_get_extent,
 		  (unsigned long long)__entry->block_len,
 		  show_map_flags(__entry->flags),
 		  __entry->refs, __entry->compress_type)
-);
+)
 
 #define show_ordered_flags(flags)					\
 	__print_symbolic(flags,					\
@@ -240,35 +245,35 @@ DECLARE_EVENT_CLASS(btrfs__ordered_exten
 		  (unsigned long long)__entry->bytes_left,
 		  show_ordered_flags(__entry->flags),
 		  __entry->compress_type, __entry->refs)
-);
+)
 
 DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add,
 
 	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered)
-);
+)
 
 DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove,
 
 	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered)
-);
+)
 
 DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start,
 
 	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered)
-);
+)
 
 DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_put,
 
 	TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered),
 
 	TP_ARGS(inode, ordered)
-);
+)
 
 DECLARE_EVENT_CLASS(btrfs__writepage,
 
@@ -319,7 +324,7 @@ DECLARE_EVENT_CLASS(btrfs__writepage,
 		  __entry->nonblocking, __entry->for_kupdate,
 		  __entry->for_reclaim, __entry->range_cyclic,
 		  (unsigned long)__entry->writeback_index)
-);
+)
 
 DEFINE_EVENT(btrfs__writepage, __extent_writepage,
 
@@ -327,7 +332,7 @@ DEFINE_EVENT(btrfs__writepage, __extent_
 		 struct writeback_control *wbc),
 
 	TP_ARGS(page, inode, wbc)
-);
+)
 
 TRACE_EVENT(btrfs_writepage_end_io_hook,
 
@@ -360,7 +365,7 @@ TRACE_EVENT(btrfs_writepage_end_io_hook,
 		  (unsigned long)__entry->ino, (unsigned long)__entry->index,
 		  (unsigned long long)__entry->start,
 		  (unsigned long long)__entry->end, __entry->uptodate)
-);
+)
 
 TRACE_EVENT(btrfs_sync_file,
 
@@ -390,7 +395,7 @@ TRACE_EVENT(btrfs_sync_file,
 		  show_root_type(__entry->root_objectid),
 		  (unsigned long)__entry->ino, (unsigned long)__entry->parent,
 		  __entry->datasync)
-);
+)
 
 TRACE_EVENT(btrfs_sync_fs,
 
@@ -407,7 +412,7 @@ TRACE_EVENT(btrfs_sync_fs,
 	),
 
 	TP_printk("wait = %d", __entry->wait)
-);
+)
 
 #define show_ref_action(action)						\
 	__print_symbolic(action,					\
@@ -454,7 +459,7 @@ TRACE_EVENT(btrfs_delayed_tree_ref,
 		  show_root_type(__entry->parent),
 		  show_root_type(__entry->ref_root),
 		  __entry->level, show_ref_type(__entry->type))
-);
+)
 
 TRACE_EVENT(btrfs_delayed_data_ref,
 
@@ -497,7 +502,7 @@ TRACE_EVENT(btrfs_delayed_data_ref,
 		  (unsigned long long)__entry->owner,
 		  (unsigned long long)__entry->offset,
 		  show_ref_type(__entry->type))
-);
+)
 
 TRACE_EVENT(btrfs_delayed_ref_head,
 
@@ -526,7 +531,7 @@ TRACE_EVENT(btrfs_delayed_ref_head,
 		  (unsigned long long)__entry->num_bytes,
 		  show_ref_action(__entry->action),
 		  __entry->is_data)
-);
+)
 
 #define show_chunk_type(type)					\
 	__print_flags(type, "|",				\
@@ -570,7 +575,7 @@ DECLARE_EVENT_CLASS(btrfs__chunk,
 		  (unsigned long long)__entry->size,
 		  __entry->num_stripes, __entry->sub_stripes,
 		  show_chunk_type(__entry->type))
-);
+)
 
 DEFINE_EVENT(btrfs__chunk,  btrfs_chunk_alloc,
 
@@ -578,7 +583,7 @@ DEFINE_EVENT(btrfs__chunk,  btrfs_chunk_
 		 u64 offset, u64 size),
 
 	TP_ARGS(root, map, offset, size)
-);
+)
 
 DEFINE_EVENT(btrfs__chunk,  btrfs_chunk_free,
 
@@ -586,7 +591,7 @@ DEFINE_EVENT(btrfs__chunk,  btrfs_chunk_
 		 u64 offset, u64 size),
 
 	TP_ARGS(root, map, offset, size)
-);
+)
 
 TRACE_EVENT(btrfs_cow_block,
 
@@ -621,7 +626,7 @@ TRACE_EVENT(btrfs_cow_block,
 		  __entry->buf_level,
 		  (unsigned long long)__entry->cow_start,
 		  __entry->cow_level)
-);
+)
 
 DECLARE_EVENT_CLASS(btrfs__reserved_extent,
 
@@ -645,21 +650,21 @@ DECLARE_EVENT_CLASS(btrfs__reserved_exte
 		  show_root_type(__entry->root_objectid),
 		  (unsigned long long)__entry->start,
 		  (unsigned long long)__entry->len)
-);
+)
 
 DEFINE_EVENT(btrfs__reserved_extent,  btrfs_reserved_extent_alloc,
 
 	TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
 
 	TP_ARGS(root, start, len)
-);
+)
 
 DEFINE_EVENT(btrfs__reserved_extent,  btrfs_reserved_extent_free,
 
 	TP_PROTO(struct btrfs_root *root, u64 start, u64 len),
 
 	TP_ARGS(root, start, len)
-);
+)
 
 #endif /* _TRACE_BTRFS_H */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 22/32] trace event workqueue remove semicolons
  2011-05-02 21:11 ` [RFC patch 22/32] trace event workqueue " Mathieu Desnoyers
@ 2011-05-03  8:25   ` Tejun Heo
  0 siblings, 0 replies; 57+ messages in thread
From: Tejun Heo @ 2011-05-03  8:25 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker, Arjan van de Ven

On Mon, May 02, 2011 at 05:11:45PM -0400, Mathieu Desnoyers wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Acked-by: Tejun Heo <tj@kernel.org>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Arjan van de Ven <arjan@linux.intel.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 26/32] trace event gfs2 remove semicolons
  2011-05-02 21:11 ` [RFC patch 26/32] trace event gfs2 " Mathieu Desnoyers
@ 2011-05-03 10:14   ` Steven Whitehouse
  2011-05-03 21:13     ` Mathieu Desnoyers
  0 siblings, 1 reply; 57+ messages in thread
From: Steven Whitehouse @ 2011-05-03 10:14 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

Hi,

On Mon, 2011-05-02 at 17:11 -0400, Mathieu Desnoyers wrote:
> plain text document attachment
> (trace-event-gfs2-remove-semicolons.patch)
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.  Remove extra trailing
> semicolons at the end of GFS2 trace event declarations.
> 
Note that there is a new tracepoint for GFS2 currently awaiting the next
merge window in the GFS2 -nmw git tree, so that will need to be patched
too. Otherwise, looks good to me,

Steve.

> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Acked-by: Steven Whitehouse <swhiteho@redhat.com>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> ---
>  fs/gfs2/trace_gfs2.h |   26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> Index: linux-2.6-lttng/fs/gfs2/trace_gfs2.h
> ===================================================================
> --- linux-2.6-lttng.orig/fs/gfs2/trace_gfs2.h
> +++ linux-2.6-lttng/fs/gfs2/trace_gfs2.h
> @@ -42,8 +42,8 @@
>  	{(1UL << GLF_FROZEN),			"F" },		\
>  	{(1UL << GLF_QUEUED),			"q" })
>  
> -#ifndef NUMPTY
> -#define NUMPTY
> +#ifndef _TRACE_GFS2_DEF_
> +#define _TRACE_GFS2_DEF_
>  static inline u8 glock_trace_state(unsigned int state)
>  {
>  	switch(state) {
> @@ -56,7 +56,7 @@ static inline u8 glock_trace_state(unsig
>  	}
>  	return DLM_LOCK_NL;
>  }
> -#endif
> +#endif /* _TRACE_GFS2_DEF_ */
>  
>  /* Section 1 - Locking
>   *
> @@ -105,7 +105,7 @@ TRACE_EVENT(gfs2_glock_state_change,
>  		  glock_trace_name(__entry->tgt_state),
>  		  glock_trace_name(__entry->dmt_state),
>  		  show_glock_flags(__entry->flags))
> -);
> +)
>  
>  /* State change -> unlocked, glock is being deallocated */
>  TRACE_EVENT(gfs2_glock_put,
> @@ -137,7 +137,7 @@ TRACE_EVENT(gfs2_glock_put,
>  		  glock_trace_name(DLM_LOCK_IV),
>  		  show_glock_flags(__entry->flags))
>  
> -);
> +)
>  
>  /* Callback (local or remote) requesting lock demotion */
>  TRACE_EVENT(gfs2_demote_rq,
> @@ -171,7 +171,7 @@ TRACE_EVENT(gfs2_demote_rq,
>                    glock_trace_name(__entry->dmt_state),
>  		  show_glock_flags(__entry->flags))
>  
> -);
> +)
>  
>  /* Promotion/grant of a glock */
>  TRACE_EVENT(gfs2_promote,
> @@ -201,7 +201,7 @@ TRACE_EVENT(gfs2_promote,
>  		  (unsigned long long)__entry->glnum,
>  		  __entry->first ? "first": "other",
>  		  glock_trace_name(__entry->state))
> -);
> +)
>  
>  /* Queue/dequeue a lock request */
>  TRACE_EVENT(gfs2_glock_queue,
> @@ -231,7 +231,7 @@ TRACE_EVENT(gfs2_glock_queue,
>  		  (unsigned long long)__entry->glnum,
>  		  __entry->queue ? "" : "de",
>  		  glock_trace_name(__entry->state))
> -);
> +)
>  
>  /* Section 2 - Log/journal
>   *
> @@ -270,7 +270,7 @@ TRACE_EVENT(gfs2_pin,
>  		  (unsigned long long)__entry->block,
>  		  (unsigned long)__entry->len,
>  		  (unsigned long long)__entry->ino)
> -);
> +)
>  
>  /* Flushing the log */
>  TRACE_EVENT(gfs2_log_flush,
> @@ -295,7 +295,7 @@ TRACE_EVENT(gfs2_log_flush,
>  		  MAJOR(__entry->dev), MINOR(__entry->dev),
>  		  __entry->start ? "start" : "end",
>  		  (unsigned long long)__entry->log_seq)
> -);
> +)
>  
>  /* Reserving/releasing blocks in the log */
>  TRACE_EVENT(gfs2_log_blocks,
> @@ -316,7 +316,7 @@ TRACE_EVENT(gfs2_log_blocks,
>  
>  	TP_printk("%u,%u log reserve %d", MAJOR(__entry->dev),
>  		  MINOR(__entry->dev), __entry->blocks)
> -);
> +)
>  
>  /* Section 3 - bmap
>   *
> @@ -364,7 +364,7 @@ TRACE_EVENT(gfs2_bmap,
>  		  (unsigned long long)__entry->pblock,
>  		  __entry->state, __entry->create ? "create " : "nocreate",
>  		  __entry->errno)
> -);
> +)
>  
>  /* Keep track of blocks as they are allocated/freed */
>  TRACE_EVENT(gfs2_block_alloc,
> @@ -396,7 +396,7 @@ TRACE_EVENT(gfs2_block_alloc,
>  		  (unsigned long long)__entry->start,
>  		  (unsigned long)__entry->len,
>  		  block_state_name(__entry->block_state))
> -);
> +)
>  
>  #endif /* _TRACE_GFS2_H */
>  
> 



^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 12/32] trace event napi remove semicolons
  2011-05-02 21:11 ` [RFC patch 12/32] trace event napi " Mathieu Desnoyers
@ 2011-05-03 12:26   ` Neil Horman
  0 siblings, 0 replies; 57+ messages in thread
From: Neil Horman @ 2011-05-03 12:26 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker, David S. Miller, Koki Sanagi

On Mon, May 02, 2011 at 05:11:35PM -0400, Mathieu Desnoyers wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Neil Horman <nhorman@tuxdriver.com>
> CC: David S. Miller <davem@davemloft.net>
> CC: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
> ---
>  include/trace/events/napi.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

> Index: linux-2.6-lttng/include/trace/events/napi.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/trace/events/napi.h
> +++ linux-2.6-lttng/include/trace/events/napi.h
> @@ -28,7 +28,7 @@ TRACE_EVENT(napi_poll,
>  
>  	TP_printk("napi poll on napi struct %p for device %s",
>  		__entry->napi, __get_str(dev_name))
> -);
> +)
>  
>  #undef NO_DEV
>  
> 
> 

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 13/32] trace event net remove semicolons
  2011-05-02 21:11 ` [RFC patch 13/32] trace event net " Mathieu Desnoyers
@ 2011-05-03 12:27   ` Neil Horman
  0 siblings, 0 replies; 57+ messages in thread
From: Neil Horman @ 2011-05-03 12:27 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker, David S. Miller, Koki Sanagi

On Mon, May 02, 2011 at 05:11:36PM -0400, Mathieu Desnoyers wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Neil Horman <nhorman@tuxdriver.com>
> CC: David S. Miller <davem@davemloft.net>
> CC: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
> ---
>  include/trace/events/net.h |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

> Index: linux-2.6-lttng/include/trace/events/net.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/trace/events/net.h
> +++ linux-2.6-lttng/include/trace/events/net.h
> @@ -32,7 +32,7 @@ TRACE_EVENT(net_dev_xmit,
>  
>  	TP_printk("dev=%s skbaddr=%p len=%u rc=%d",
>  		__get_str(name), __entry->skbaddr, __entry->len, __entry->rc)
> -);
> +)
>  
>  DECLARE_EVENT_CLASS(net_dev_template,
>  
> @@ -61,21 +61,21 @@ DEFINE_EVENT(net_dev_template, net_dev_q
>  	TP_PROTO(struct sk_buff *skb),
>  
>  	TP_ARGS(skb)
> -);
> +)
>  
>  DEFINE_EVENT(net_dev_template, netif_receive_skb,
>  
>  	TP_PROTO(struct sk_buff *skb),
>  
>  	TP_ARGS(skb)
> -);
> +)
>  
>  DEFINE_EVENT(net_dev_template, netif_rx,
>  
>  	TP_PROTO(struct sk_buff *skb),
>  
>  	TP_ARGS(skb)
> -);
> +)
>  #endif /* _TRACE_NET_H */
>  
>  /* This part must be outside protection */
> 
> 

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 18/32] trace event skb remove semicolons
  2011-05-02 21:11 ` [RFC patch 18/32] trace event skb " Mathieu Desnoyers
@ 2011-05-03 12:27   ` Neil Horman
  0 siblings, 0 replies; 57+ messages in thread
From: Neil Horman @ 2011-05-03 12:27 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker, Koki Sanagi, David S. Miller

On Mon, May 02, 2011 at 05:11:41PM -0400, Mathieu Desnoyers wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
> CC: Neil Horman <nhorman@tuxdriver.com>
> CC: David S. Miller <davem@davemloft.net>
> ---
Acked-by: Neil Horman <nhorman@tuxdriver.com>

>  include/trace/events/skb.h |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6-lttng/include/trace/events/skb.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/trace/events/skb.h
> +++ linux-2.6-lttng/include/trace/events/skb.h
> @@ -31,7 +31,7 @@ TRACE_EVENT(kfree_skb,
>  
>  	TP_printk("skbaddr=%p protocol=%u location=%p",
>  		__entry->skbaddr, __entry->protocol, __entry->location)
> -);
> +)
>  
>  TRACE_EVENT(consume_skb,
>  
> @@ -48,7 +48,7 @@ TRACE_EVENT(consume_skb,
>  	),
>  
>  	TP_printk("skbaddr=%p", __entry->skbaddr)
> -);
> +)
>  
>  TRACE_EVENT(skb_copy_datagram_iovec,
>  
> @@ -67,7 +67,7 @@ TRACE_EVENT(skb_copy_datagram_iovec,
>  	),
>  
>  	TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len)
> -);
> +)
>  
>  #endif /* _TRACE_SKB_H */
>  
> 
> 

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 14/32] trace event power remove semicolons
  2011-05-02 21:11 ` [RFC patch 14/32] trace event power " Mathieu Desnoyers
@ 2011-05-03 12:59   ` Pihet-XID, Jean
  0 siblings, 0 replies; 57+ messages in thread
From: Pihet-XID, Jean @ 2011-05-03 12:59 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker, Arjan van de Ven, Thomas Renninger,
	Len Brown

On Mon, May 2, 2011 at 11:11 PM, Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Jean Pihet <j-pihet@ti.com>
> CC: Arjan van de Ven <arjan@linux.intel.com>
> CC: Thomas Renninger <trenn@suse.de>
> CC: Len Brown <len.brown@intel.com>
> ---
>  include/trace/events/power.h |   28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)

Acked-by: j-pihet@ti.com

>
> Index: linux-2.6-lttng/include/trace/events/power.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/trace/events/power.h
> +++ linux-2.6-lttng/include/trace/events/power.h
> @@ -25,14 +25,14 @@ DECLARE_EVENT_CLASS(cpu,
>
>        TP_printk("state=%lu cpu_id=%lu", (unsigned long)__entry->state,
>                  (unsigned long)__entry->cpu_id)
> -);
> +)
>
>  DEFINE_EVENT(cpu, cpu_idle,
>
>        TP_PROTO(unsigned int state, unsigned int cpu_id),
>
>        TP_ARGS(state, cpu_id)
> -);
> +)
>
>  /* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */
>  #ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING
> @@ -46,7 +46,7 @@ DEFINE_EVENT(cpu, cpu_frequency,
>        TP_PROTO(unsigned int frequency, unsigned int cpu_id),
>
>        TP_ARGS(frequency, cpu_id)
> -);
> +)
>
>  TRACE_EVENT(machine_suspend,
>
> @@ -63,7 +63,7 @@ TRACE_EVENT(machine_suspend,
>        ),
>
>        TP_printk("state=%lu", (unsigned long)__entry->state)
> -);
> +)
>
>  /* This code will be removed after deprecation time exceeded (2.6.41) */
>  #ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED
> @@ -92,21 +92,21 @@ DECLARE_EVENT_CLASS(power,
>
>        TP_printk("type=%lu state=%lu cpu_id=%lu", (unsigned long)__entry->type,
>                (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
> -);
> +)
>
>  DEFINE_EVENT(power, power_start,
>
>        TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
>
>        TP_ARGS(type, state, cpu_id)
> -);
> +)
>
>  DEFINE_EVENT(power, power_frequency,
>
>        TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
>
>        TP_ARGS(type, state, cpu_id)
> -);
> +)
>
>  TRACE_EVENT(power_end,
>
> @@ -124,7 +124,7 @@ TRACE_EVENT(power_end,
>
>        TP_printk("cpu_id=%lu", (unsigned long)__entry->cpu_id)
>
> -);
> +)
>
>  /* Deprecated dummy functions must be protected against multi-declartion */
>  #ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED
> @@ -180,28 +180,28 @@ DECLARE_EVENT_CLASS(clock,
>
>        TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
>                (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
> -);
> +)
>
>  DEFINE_EVENT(clock, clock_enable,
>
>        TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
>
>        TP_ARGS(name, state, cpu_id)
> -);
> +)
>
>  DEFINE_EVENT(clock, clock_disable,
>
>        TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
>
>        TP_ARGS(name, state, cpu_id)
> -);
> +)
>
>  DEFINE_EVENT(clock, clock_set_rate,
>
>        TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
>
>        TP_ARGS(name, state, cpu_id)
> -);
> +)
>
>  /*
>  * The power domain events are used for power domains transitions
> @@ -226,14 +226,14 @@ DECLARE_EVENT_CLASS(power_domain,
>
>        TP_printk("%s state=%lu cpu_id=%lu", __get_str(name),
>                (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
> -);
> +)
>
>  DEFINE_EVENT(power_domain, power_domain_target,
>
>        TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id),
>
>        TP_ARGS(name, state, cpu_id)
> -);
> +)
>  #endif /* _TRACE_POWER_H */
>
>  /* This part must be outside protection */
>
>

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-02 21:11 ` [RFC patch 29/32] trace event asoc " Mathieu Desnoyers
@ 2011-05-03 13:21   ` Mark Brown
  2011-05-03 14:06     ` Mathieu Desnoyers
  2011-05-03 14:29   ` Mark Brown
  1 sibling, 1 reply; 57+ messages in thread
From: Mark Brown @ 2011-05-03 13:21 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

On Mon, May 02, 2011 at 05:11:52PM -0400, Mathieu Desnoyers wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.

Can I apply this in my tree or does this depend on some earlier patch I
don't have?

> +#ifndef _TRACE_ASOC_DEF_
> +#define _TRACE_ASOC_DEF_
> +
>  struct snd_soc_jack;
>  struct snd_soc_codec;
>  struct snd_soc_card;
>  struct snd_soc_dapm_widget;
>  
> +#endif /* _TRACE_ASOC_DEF_ */

This is an unrelated change and should be split out.  Frankly I'm not
that this is an improvement anyway, the struct declarations aren't going
to do any harm...

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-03 13:21   ` Mark Brown
@ 2011-05-03 14:06     ` Mathieu Desnoyers
  2011-05-03 14:14       ` Mark Brown
  2011-05-03 14:30       ` Steven Rostedt
  0 siblings, 2 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-03 14:06 UTC (permalink / raw)
  To: Mark Brown
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

* Mark Brown (broonie@opensource.wolfsonmicro.com) wrote:
> On Mon, May 02, 2011 at 05:11:52PM -0400, Mathieu Desnoyers wrote:
> > Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> > of events, thus saving space for trace event probes.
> 
> Can I apply this in my tree or does this depend on some earlier patch I
> don't have?

Hi Mark,

This depends on a preliminary ftrace cleanup patch I just forwarded to
you. LKML has eaten that patch due to too many CC. [ insert favorite
expression of frustration here ]. But I think the best way to proceed
would be to get a Acked-by from you and let Steven pull the patch
through the tracing tree.

> 
> > +#ifndef _TRACE_ASOC_DEF_
> > +#define _TRACE_ASOC_DEF_
> > +
> >  struct snd_soc_jack;
> >  struct snd_soc_codec;
> >  struct snd_soc_card;
> >  struct snd_soc_dapm_widget;
> >  
> > +#endif /* _TRACE_ASOC_DEF_ */
> 
> This is an unrelated change and should be split out.  Frankly I'm not
> that this is an improvement anyway, the struct declarations aren't going
> to do any harm...

Yes, this change is related, because these declarations will cause harm.
The structure declaration cannot be put within an array declaration,
because then they won't be simply "ignored": they will try to declare
structures within an array, which is not valid. This is why I did this
change in the same patch.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
       [not found] ` <20110502213211.250108074@efficios.com>
@ 2011-05-03 14:07   ` Mathieu Desnoyers
  2011-05-03 14:37     ` Steven Rostedt
       [not found]   ` <1304422337.25414.2382.camel@gandalf.stny.rr.com>
  1 sibling, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-03 14:07 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mathieu Desnoyers, Mark Brown

Hi,

And here is a self-reply to patch 01/32, due to LKML refusing messages
with more than 20 recipients.

Thanks,

Mathieu

* Mathieu Desnoyers (mathieu.desnoyers@efficios.com) wrote:
> Initiate the removal of the extra semicolons at the end of:
> 
> TRACE_EVENT(
>   ...
> );     <---- here,
> 
> TRACE_EVENT_FN(
>   ...
> );     <---- here,
> 
> DEFINE_EVENT(
>   ...
> );     <---- here,
> 
> DEFINE_EVENT_PRINT(
>   ...
> );     <---- and here.
> 
> by removing the semicolon from the comment in tracepoint.h explaining the
> TRACE_EVENT() usage. It is now also mandated that all declarations done in the
> trace event headers should be surrounded by ifdefs checks: it is already
> necessary, but some users get away from this requirement for structure
> forward-declarations.
> 
> I am proposing to merge this patchset through the "tracing" tree for better
> coordination.
> 
> Adding the missing semicolon within the DEFINE_EVENT(), DEFINE_EVENT_PRINT()
> and DEFINE_TRACE_FN() macros is required as a preliminary step to remove extra
> semicolons.  We currently are not seeing any impact of this missing semicolon
> because extra they appear all over the place in the code generated from
> TRACE_EVENT within ftrace stages. The side-effect of these extra semicolons are:
> 
> a) to pollute the preprocessor output, leaving extra ";" between trace event
> instances in trace points creation.
> 
> b) to render impossible creation of an array of events. Extra semicolons are
> not a matter as long as TRACE_EVENT creates statements, structure elements or
> functions, because extra semicolons are discarded by the compiler. However,
> when creating an array, the separator is the comma, and the semicolon causes a
> parse error.
> 
> 
> * So what is the motivation for removing these semicolons ?
> 
> Currently, Ftrace is creating a "ftrace_define_fields_##call" function for each
> event to define the event fields, which consumes space. It also has the
> ".fields" list head to keep a dynamically generated list of event fields.
> 
> By allowing creation of arrays of events, we can do the following: turn the
> dynamically created list of event fields into a first-level const array listing
> event fields. We can use ARRAY_SIZE() on this array to know its size,
> statically. Then, in a following trace event stage, we can create another const
> array containing tuples of (pointers to the event-specific arrays, array size).
> 
> So we get all the same information Ftrace currently gets with much less code
> overall, much less read-write data, and less dynamic initialization code.
> 
> 
> * Why do this incrementally ?
> 
> After this preliminary patch, the semicolon removal can be done gradually
> without breaking the build: we can be in an intermediate state with some files
> having semicolons and others without. This is therefore good for
> bissectability, and seems like a nice way to bring in an internal API change
> without making developers suffer too much. Then, once things are stabilized, we
> can start modifying the Ftrace code to generate the more space-efficient arrays
> (possibly in a release-cycle or so), knowing that this enforces a strict
> requirement on semicolon removal.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Alexander Graf <agraf@suse.de>
> CC: Alex Elder <aelder@sgi.com>
> CC: Anton Blanchard <anton@samba.org>
> CC: Arjan van de Ven <arjan@linux.intel.com>
> CC: Avi Kivity <avi@redhat.com>
> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> CC: Christoph Hellwig <hch@lst.de>
> CC: Chris Wilson <chris@chris-wilson.co.uk>
> CC: Dave Airlie <airlied@redhat.com>
> CC: Dave Chinner <david@fromorbit.com>
> CC: Dave Chinner <dchinner@redhat.com>
> CC: David S. Miller <davem@davemloft.net>
> CC: Gleb Natapov <gleb@redhat.com>
> CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: James Bottomley <James.Bottomley@suse.de>
> CC: Jean Pihet <j-pihet@ti.com>
> CC: Jeff Moyer <jmoyer@redhat.com>
> CC: Jens Axboe <axboe@kernel.dk>
> CC: Jeremy Kerr <jk@ozlabs.org>
> CC: Jesse Barnes <jbarnes@virtuousgeek.org>
> CC: Joerg Roedel <joerg.roedel@amd.com>
> CC: Johannes Berg <johannes@sipsolutions.net>
> CC: John W. Linville <linville@tuxdriver.com>
> CC: Josh Stone <jistone@redhat.com>
> CC: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
> CC: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
> CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> CC: Larry Woodman <lwoodman@redhat.com>
> CC: Len Brown <len.brown@intel.com>
> CC: Li Zefan <lizf@cn.fujitsu.com>
> CC: Marcelo Tosatti <mtosatti@redhat.com>
> CC: Martin K. Petersen <martin.petersen@oracle.com>
> CC: Masami Hiramatsu <mhiramat@redhat.com>
> CC: Mel Gorman <mel@csn.ul.ie>
> CC: Neil Horman <nhorman@tuxdriver.com>
> CC: Oleg Nesterov <oleg@redhat.com>
> CC: Paul Mackerras <paulus@samba.org>
> CC: Peter Zijlstra <peterz@infradead.org>
> CC: Reinette Chatre <reinette.chatre@intel.com>
> CC: Rik van Riel <riel@redhat.com>
> CC: Roland McGrath <roland@redhat.com>
> CC: Rusty Russell <rusty@rustcorp.com.au>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Steven Whitehouse <swhiteho@redhat.com>
> CC: Tejun Heo <tj@kernel.org>
> CC: Theodore Ts'o <tytso@mit.edu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Thomas Renninger <trenn@suse.de>
> CC: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
> CC: Vadim Rozenfeld <vrozenfe@redhat.com>
> CC: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> CC: Zhu Yi <yi.zhu@intel.com>
> ---
>  include/linux/tracepoint.h |    4 ++--
>  include/trace/ftrace.h     |   10 +++++-----
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> Index: linux-2.6-lttng/include/trace/ftrace.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/trace/ftrace.h
> +++ linux-2.6-lttng/include/trace/ftrace.h
> @@ -34,8 +34,8 @@
>  			     PARAMS(args),		       \
>  			     PARAMS(tstruct),		       \
>  			     PARAMS(assign),		       \
> -			     PARAMS(print));		       \
> -	DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
> +			     PARAMS(print))		       \
> +	DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args))
>  
>  
>  #undef __field
> @@ -69,7 +69,7 @@
>  #undef DEFINE_EVENT
>  #define DEFINE_EVENT(template, name, proto, args)	\
>  	static struct ftrace_event_call	__used		\
> -	__attribute__((__aligned__(4))) event_##name
> +	__attribute__((__aligned__(4))) event_##name;
>  
>  #undef DEFINE_EVENT_PRINT
>  #define DEFINE_EVENT_PRINT(template, name, proto, args, print)	\
> @@ -588,7 +588,7 @@ static struct ftrace_event_call __used e
>  	.print_fmt		= print_fmt_##template,			\
>  };									\
>  static struct ftrace_event_call __used					\
> -__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
> +__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call;
>  
>  #undef DEFINE_EVENT_PRINT
>  #define DEFINE_EVENT_PRINT(template, call, proto, args, print)		\
> @@ -602,7 +602,7 @@ static struct ftrace_event_call __used e
>  	.print_fmt		= print_fmt_##call,			\
>  };									\
>  static struct ftrace_event_call __used					\
> -__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
> +__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call;
>  
>  #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
>  
> Index: linux-2.6-lttng/include/linux/tracepoint.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/linux/tracepoint.h
> +++ linux-2.6-lttng/include/linux/tracepoint.h
> @@ -187,7 +187,7 @@ do_trace:								\
>  		&__tracepoint_##name;
>  
>  #define DEFINE_TRACE(name)						\
> -	DEFINE_TRACE_FN(name, NULL, NULL);
> +	DEFINE_TRACE_FN(name, NULL, NULL)
>  
>  #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)				\
>  	EXPORT_SYMBOL_GPL(__tracepoint_##name)
> @@ -345,7 +345,7 @@ do_trace:								\
>   *		__entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
>   *		__entry->next_comm, __entry->next_pid, __entry->next_prio),
>   *
> - * );
> + * )
>   *
>   * This macro construct is thus used for the regular printk format
>   * tracing setup, it is used to construct a function pointer based
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-03 14:06     ` Mathieu Desnoyers
@ 2011-05-03 14:14       ` Mark Brown
  2011-05-03 14:24         ` Mark Brown
  2011-05-03 14:30       ` Steven Rostedt
  1 sibling, 1 reply; 57+ messages in thread
From: Mark Brown @ 2011-05-03 14:14 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

On Tue, May 03, 2011 at 10:06:47AM -0400, Mathieu Desnoyers wrote:
> * Mark Brown (broonie@opensource.wolfsonmicro.com) wrote:

> > This is an unrelated change and should be split out.  Frankly I'm not
> > that this is an improvement anyway, the struct declarations aren't going
> > to do any harm...

> Yes, this change is related, because these declarations will cause harm.
> The structure declaration cannot be put within an array declaration,
> because then they won't be simply "ignored": they will try to declare
> structures within an array, which is not valid. This is why I did this
> change in the same patch.

This might make a bit more sense if we'd seen the earlier or possibly
later patches...  According to the patch description all you're doing
here is removing the semicolons.

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-03 14:14       ` Mark Brown
@ 2011-05-03 14:24         ` Mark Brown
  2011-05-03 14:34           ` Steven Rostedt
  2011-05-03 20:57           ` Mathieu Desnoyers
  0 siblings, 2 replies; 57+ messages in thread
From: Mark Brown @ 2011-05-03 14:24 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

On Tue, May 03, 2011 at 03:14:37PM +0100, Mark Brown wrote:
> On Tue, May 03, 2011 at 10:06:47AM -0400, Mathieu Desnoyers wrote:

> > Yes, this change is related, because these declarations will cause harm.
> > The structure declaration cannot be put within an array declaration,
> > because then they won't be simply "ignored": they will try to declare
> > structures within an array, which is not valid. This is why I did this
> > change in the same patch.

> This might make a bit more sense if we'd seen the earlier or possibly
> later patches...  According to the patch description all you're doing
> here is removing the semicolons.

OK, now I see patch 1 I understand why you're doing this.  It should
still be at least called out in the patch description if not actually
split out into a separate patch (which would be ideal) - one of the
things that really stands out in reviews is unrelated changes.

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-02 21:11 ` [RFC patch 29/32] trace event asoc " Mathieu Desnoyers
  2011-05-03 13:21   ` Mark Brown
@ 2011-05-03 14:29   ` Mark Brown
  1 sibling, 0 replies; 57+ messages in thread
From: Mark Brown @ 2011-05-03 14:29 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker, lrg

On Mon, May 02, 2011 at 05:11:52PM -0400, Mathieu Desnoyers wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

and adding Liam.

> ---
>  include/trace/events/asoc.h |   39 ++++++++++++++++++++++-----------------
>  1 file changed, 22 insertions(+), 17 deletions(-)
> 
> Index: linux-2.6-lttng/include/trace/events/asoc.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/trace/events/asoc.h
> +++ linux-2.6-lttng/include/trace/events/asoc.h
> @@ -7,11 +7,16 @@
>  #include <linux/ktime.h>
>  #include <linux/tracepoint.h>
>  
> +#ifndef _TRACE_ASOC_DEF_
> +#define _TRACE_ASOC_DEF_
> +
>  struct snd_soc_jack;
>  struct snd_soc_codec;
>  struct snd_soc_card;
>  struct snd_soc_dapm_widget;
>  
> +#endif /* _TRACE_ASOC_DEF_ */
> +
>  /*
>   * Log register events
>   */
> @@ -39,7 +44,7 @@ DECLARE_EVENT_CLASS(snd_soc_reg,
>  	TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name),
>  		  (int)__entry->id, (unsigned int)__entry->reg,
>  		  (unsigned int)__entry->val)
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_reg, snd_soc_reg_write,
>  
> @@ -48,7 +53,7 @@ DEFINE_EVENT(snd_soc_reg, snd_soc_reg_wr
>  
>  	TP_ARGS(codec, reg, val)
>  
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_reg, snd_soc_reg_read,
>  
> @@ -57,7 +62,7 @@ DEFINE_EVENT(snd_soc_reg, snd_soc_reg_re
>  
>  	TP_ARGS(codec, reg, val)
>  
> -);
> +)
>  
>  DECLARE_EVENT_CLASS(snd_soc_card,
>  
> @@ -76,7 +81,7 @@ DECLARE_EVENT_CLASS(snd_soc_card,
>  	),
>  
>  	TP_printk("card=%s val=%d", __get_str(name), (int)__entry->val)
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_start,
>  
> @@ -84,7 +89,7 @@ DEFINE_EVENT(snd_soc_card, snd_soc_bias_
>  
>  	TP_ARGS(card, val)
>  
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_card, snd_soc_bias_level_done,
>  
> @@ -92,7 +97,7 @@ DEFINE_EVENT(snd_soc_card, snd_soc_bias_
>  
>  	TP_ARGS(card, val)
>  
> -);
> +)
>  
>  DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
>  
> @@ -109,7 +114,7 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
>  	),
>  
>  	TP_printk("card=%s", __get_str(name))
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
>  
> @@ -117,7 +122,7 @@ DEFINE_EVENT(snd_soc_dapm_basic, snd_soc
>  
>  	TP_ARGS(card)
>  
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
>  
> @@ -125,7 +130,7 @@ DEFINE_EVENT(snd_soc_dapm_basic, snd_soc
>  
>  	TP_ARGS(card)
>  
> -);
> +)
>  
>  DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
>  
> @@ -145,7 +150,7 @@ DECLARE_EVENT_CLASS(snd_soc_dapm_widget,
>  
>  	TP_printk("widget=%s val=%d", __get_str(name),
>  		  (int)__entry->val)
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_power,
>  
> @@ -153,7 +158,7 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_so
>  
>  	TP_ARGS(w, val)
>  
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_start,
>  
> @@ -161,7 +166,7 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_so
>  
>  	TP_ARGS(w, val)
>  
> -);
> +)
>  
>  DEFINE_EVENT(snd_soc_dapm_widget, snd_soc_dapm_widget_event_done,
>  
> @@ -169,7 +174,7 @@ DEFINE_EVENT(snd_soc_dapm_widget, snd_so
>  
>  	TP_ARGS(w, val)
>  
> -);
> +)
>  
>  TRACE_EVENT(snd_soc_jack_irq,
>  
> @@ -186,7 +191,7 @@ TRACE_EVENT(snd_soc_jack_irq,
>  	),
>  
>  	TP_printk("%s", __get_str(name))
> -);
> +)
>  
>  TRACE_EVENT(snd_soc_jack_report,
>  
> @@ -208,7 +213,7 @@ TRACE_EVENT(snd_soc_jack_report,
>  
>  	TP_printk("jack=%s %x/%x", __get_str(name), (int)__entry->val,
>  		  (int)__entry->mask)
> -);
> +)
>  
>  TRACE_EVENT(snd_soc_jack_notify,
>  
> @@ -227,7 +232,7 @@ TRACE_EVENT(snd_soc_jack_notify,
>  	),
>  
>  	TP_printk("jack=%s %x", __get_str(name), (int)__entry->val)
> -);
> +)
>  
>  TRACE_EVENT(snd_soc_cache_sync,
>  
> @@ -252,7 +257,7 @@ TRACE_EVENT(snd_soc_cache_sync,
>  
>  	TP_printk("codec=%s.%d type=%s status=%s", __get_str(name),
>  		  (int)__entry->id, __get_str(type), __get_str(status))
> -);
> +)
>  
>  #endif /* _TRACE_ASOC_H */
>  
> 

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-03 14:06     ` Mathieu Desnoyers
  2011-05-03 14:14       ` Mark Brown
@ 2011-05-03 14:30       ` Steven Rostedt
  1 sibling, 0 replies; 57+ messages in thread
From: Steven Rostedt @ 2011-05-03 14:30 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Mark Brown, LKML, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

On Tue, 2011-05-03 at 10:06 -0400, Mathieu Desnoyers wrote:

> This depends on a preliminary ftrace cleanup patch I just forwarded to
> you. LKML has eaten that patch due to too many CC. [ insert favorite
> expression of frustration here ]. But I think the best way to proceed
> would be to get a Acked-by from you and let Steven pull the patch
> through the tracing tree.

Sure, we can do that (for the semi-colon clean up).

> 
> > 
> > > +#ifndef _TRACE_ASOC_DEF_
> > > +#define _TRACE_ASOC_DEF_
> > > +
> > >  struct snd_soc_jack;
> > >  struct snd_soc_codec;
> > >  struct snd_soc_card;
> > >  struct snd_soc_dapm_widget;
> > >  
> > > +#endif /* _TRACE_ASOC_DEF_ */
> > 
> > This is an unrelated change and should be split out.  Frankly I'm not
> > that this is an improvement anyway, the struct declarations aren't going
> > to do any harm...
> 
> Yes, this change is related, because these declarations will cause harm.
> The structure declaration cannot be put within an array declaration,
> because then they won't be simply "ignored": they will try to declare
> structures within an array, which is not valid. This is why I did this
> change in the same patch.

No, Mark is right in this case. This IS a separate change, and deserves
a separate patch. This patch is to remove the semi-colons. This change
should be separated out and stated it is for the array. In fact, you
should probably have two different patch sets. One for the semi-colon
clean up, which I'm fine with. And another set that does more to the
patch, like this change. If I do the array change and find that it
doesn't help much, I wont want this change. But I'm willing to keep the
semi-colon change.

Yes, when I convert ftrace and perf to use arrays, then this will be
needed, but it is not needed for this series. I haven't looked at the
other patches yet (besides the first one), but if you have more of this
in other patches, please remove it. You can make another patch set that
I can use before the ftrace/perf updates.

-- Steve



^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 31/32] trace event regulator remove semicolons
  2011-05-02 21:11 ` [RFC patch 31/32] trace event regulator " Mathieu Desnoyers
@ 2011-05-03 14:30   ` Mark Brown
  0 siblings, 0 replies; 57+ messages in thread
From: Mark Brown @ 2011-05-03 14:30 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker, lrg

On Mon, May 02, 2011 at 05:11:54PM -0400, Mathieu Desnoyers wrote:
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Thomas Gleixner <tglx@linutronix.de>
> CC: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

and adding Liam.

> ---
>  include/trace/events/regulator.h |   20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> Index: linux-2.6-lttng/include/trace/events/regulator.h
> ===================================================================
> --- linux-2.6-lttng.orig/include/trace/events/regulator.h
> +++ linux-2.6-lttng/include/trace/events/regulator.h
> @@ -27,7 +27,7 @@ DECLARE_EVENT_CLASS(regulator_basic,
>  
>  	TP_printk("name=%s", __get_str(name))
>  
> -);
> +)
>  
>  DEFINE_EVENT(regulator_basic, regulator_enable,
>  
> @@ -35,7 +35,7 @@ DEFINE_EVENT(regulator_basic, regulator_
>  
>  	TP_ARGS(name)
>  
> -);
> +)
>  
>  DEFINE_EVENT(regulator_basic, regulator_enable_delay,
>  
> @@ -43,7 +43,7 @@ DEFINE_EVENT(regulator_basic, regulator_
>  
>  	TP_ARGS(name)
>  
> -);
> +)
>  
>  DEFINE_EVENT(regulator_basic, regulator_enable_complete,
>  
> @@ -51,7 +51,7 @@ DEFINE_EVENT(regulator_basic, regulator_
>  
>  	TP_ARGS(name)
>  
> -);
> +)
>  
>  DEFINE_EVENT(regulator_basic, regulator_disable,
>  
> @@ -59,7 +59,7 @@ DEFINE_EVENT(regulator_basic, regulator_
>  
>  	TP_ARGS(name)
>  
> -);
> +)
>  
>  DEFINE_EVENT(regulator_basic, regulator_disable_complete,
>  
> @@ -67,7 +67,7 @@ DEFINE_EVENT(regulator_basic, regulator_
>  
>  	TP_ARGS(name)
>  
> -);
> +)
>  
>  /*
>   * Events that take a range of numerical values, mostly for voltages
> @@ -93,7 +93,7 @@ DECLARE_EVENT_CLASS(regulator_range,
>  
>  	TP_printk("name=%s (%d-%d)", __get_str(name),
>  		  (int)__entry->min, (int)__entry->max)
> -);
> +)
>  
>  DEFINE_EVENT(regulator_range, regulator_set_voltage,
>  
> @@ -101,7 +101,7 @@ DEFINE_EVENT(regulator_range, regulator_
>  
>  	TP_ARGS(name, min, max)
>  
> -);
> +)
>  
>  
>  /*
> @@ -125,7 +125,7 @@ DECLARE_EVENT_CLASS(regulator_value,
>  
>  	TP_printk("name=%s, val=%u", __get_str(name),
>  		  (int)__entry->val)
> -);
> +)
>  
>  DEFINE_EVENT(regulator_value, regulator_set_voltage_complete,
>  
> @@ -133,7 +133,7 @@ DEFINE_EVENT(regulator_value, regulator_
>  
>  	TP_ARGS(name, value)
>  
> -);
> +)
>  
>  #endif /* _TRACE_POWER_H */
>  
> 

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 02/32] trace event sample remove semicolons, specify need for ifdef around declarations
  2011-05-02 21:11 ` [RFC patch 02/32] trace event sample remove semicolons, specify need for ifdef around declarations Mathieu Desnoyers
@ 2011-05-03 14:31   ` Steven Rostedt
  0 siblings, 0 replies; 57+ messages in thread
From: Steven Rostedt @ 2011-05-03 14:31 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Ingo Molnar, Thomas Gleixner, Frederic Weisbecker, Li Zefan

On Mon, 2011-05-02 at 17:11 -0400, Mathieu Desnoyers wrote:
> plain text document attachment
> (trace-event-sample-remove-semicolons.patch)
> Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> of events, thus saving space for trace event probes.
> 
> Protecting declarations with ifndef _TRACE_SAMPLE_DEF_ is required if we want to
> ensure that, e.g., structure forward declarations do not generate extra
> semicolons. It's already needed for enumerations and static inline functions
> declarations, but not documented, so document it here.

I think you need to have two patch sets. One to do the semicolon clean
up, and one for the preparation of arrays. Again, the semi-colon cleanup
I'm fine with keeping even if we don't do the arrays. But this is only
needed if we do the array work.

I'm not even sure I want to do it this way. I may change it when I do
the array work.

-- Steve



^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-03 14:24         ` Mark Brown
@ 2011-05-03 14:34           ` Steven Rostedt
  2011-05-03 21:29             ` Mathieu Desnoyers
  2011-05-03 20:57           ` Mathieu Desnoyers
  1 sibling, 1 reply; 57+ messages in thread
From: Steven Rostedt @ 2011-05-03 14:34 UTC (permalink / raw)
  To: Mark Brown
  Cc: Mathieu Desnoyers, LKML, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

On Tue, 2011-05-03 at 15:24 +0100, Mark Brown wrote:
> On Tue, May 03, 2011 at 03:14:37PM +0100, Mark Brown wrote:

> OK, now I see patch 1 I understand why you're doing this.  It should
> still be at least called out in the patch description if not actually
> split out into a separate patch (which would be ideal) - one of the
> things that really stands out in reviews is unrelated changes.

I actually think there should have been two different patch sets. One
for the semi colon clean up, and the other to do the work for arrays.
The semi colon clean up is non-controversial as it is just a clean up
that does not affect the current code at all.

But the added array preparation is not needed until we do the array
work, which deserves its own patch set.

-- Steve



^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
  2011-05-03 14:07   ` [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal Mathieu Desnoyers
@ 2011-05-03 14:37     ` Steven Rostedt
  2011-05-03 14:53       ` Mark Brown
  0 siblings, 1 reply; 57+ messages in thread
From: Steven Rostedt @ 2011-05-03 14:37 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: LKML, Ingo Molnar, Thomas Gleixner, Frederic Weisbecker,
	Mark Brown

On Tue, 2011-05-03 at 10:07 -0400, Mathieu Desnoyers wrote:
> Hi,
> 
> And here is a self-reply to patch 01/32, due to LKML refusing messages
> with more than 20 recipients.
> 
BTW, next time don't Cc the world on generic patch sets like this. If
someone is Cc'd in one of the patch sets and wonders what it is about.

a) You did not write your change log well enough

b) It contains unrelated changes

c) They could look at lkml.org to find out what this patch set is about.

(c) is what I usually do when I'm Cc'd in a middle of a patch series.

-- Steve



^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
  2011-05-03 14:37     ` Steven Rostedt
@ 2011-05-03 14:53       ` Mark Brown
  0 siblings, 0 replies; 57+ messages in thread
From: Mark Brown @ 2011-05-03 14:53 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Mathieu Desnoyers, LKML, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

On Tue, May 03, 2011 at 10:37:37AM -0400, Steven Rostedt wrote:

> BTW, next time don't Cc the world on generic patch sets like this. If
> someone is Cc'd in one of the patch sets and wonders what it is about.

OTOH it's nice for maintainers to be told about stuff like this rather
than having to find out through -next failures if they do some
incremental work in the area.

> a) You did not write your change log well enough

> b) It contains unrelated changes

> c) They could look at lkml.org to find out what this patch set is about.

> (c) is what I usually do when I'm Cc'd in a middle of a patch series.

Though in this case the combination of a and b undermined the
effectiveness of c.

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-03 14:24         ` Mark Brown
  2011-05-03 14:34           ` Steven Rostedt
@ 2011-05-03 20:57           ` Mathieu Desnoyers
  2011-05-03 21:30             ` Mathieu Desnoyers
  1 sibling, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-03 20:57 UTC (permalink / raw)
  To: Mark Brown
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

* Mark Brown (broonie@opensource.wolfsonmicro.com) wrote:
> On Tue, May 03, 2011 at 03:14:37PM +0100, Mark Brown wrote:
> > On Tue, May 03, 2011 at 10:06:47AM -0400, Mathieu Desnoyers wrote:
> 
> > > Yes, this change is related, because these declarations will cause harm.
> > > The structure declaration cannot be put within an array declaration,
> > > because then they won't be simply "ignored": they will try to declare
> > > structures within an array, which is not valid. This is why I did this
> > > change in the same patch.
> 
> > This might make a bit more sense if we'd seen the earlier or possibly
> > later patches...  According to the patch description all you're doing
> > here is removing the semicolons.
> 
> OK, now I see patch 1 I understand why you're doing this.  It should
> still be at least called out in the patch description if not actually
> split out into a separate patch (which would be ideal) - one of the
> things that really stands out in reviews is unrelated changes.

Due to the large number of patches (32 overall), I prefer not to overdo
it in terms of splitting changes to each individual subsystem in even
more patches. If it's OK with you, I'll just clarify the changelog.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 26/32] trace event gfs2 remove semicolons
  2011-05-03 10:14   ` Steven Whitehouse
@ 2011-05-03 21:13     ` Mathieu Desnoyers
  0 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-03 21:13 UTC (permalink / raw)
  To: Steven Whitehouse
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

* Steven Whitehouse (swhiteho@redhat.com) wrote:
> Hi,
> 
> On Mon, 2011-05-02 at 17:11 -0400, Mathieu Desnoyers wrote:
> > plain text document attachment
> > (trace-event-gfs2-remove-semicolons.patch)
> > Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
> > of events, thus saving space for trace event probes.  Remove extra trailing
> > semicolons at the end of GFS2 trace event declarations.
> > 
> Note that there is a new tracepoint for GFS2 currently awaiting the next
> merge window in the GFS2 -nmw git tree, so that will need to be patched
> too. Otherwise, looks good to me,

Thanks! We'll fix it when it gets merged. I'll add a note to that effect
in the patch changelog.

Mathieu

> 
> Steve.
> 
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > Acked-by: Steven Whitehouse <swhiteho@redhat.com>
> > CC: Steven Rostedt <rostedt@goodmis.org>
> > CC: Frederic Weisbecker <fweisbec@gmail.com>
> > CC: Ingo Molnar <mingo@elte.hu>
> > CC: Thomas Gleixner <tglx@linutronix.de>
> > ---
> >  fs/gfs2/trace_gfs2.h |   26 +++++++++++++-------------
> >  1 file changed, 13 insertions(+), 13 deletions(-)
> > 
> > Index: linux-2.6-lttng/fs/gfs2/trace_gfs2.h
> > ===================================================================
> > --- linux-2.6-lttng.orig/fs/gfs2/trace_gfs2.h
> > +++ linux-2.6-lttng/fs/gfs2/trace_gfs2.h
> > @@ -42,8 +42,8 @@
> >  	{(1UL << GLF_FROZEN),			"F" },		\
> >  	{(1UL << GLF_QUEUED),			"q" })
> >  
> > -#ifndef NUMPTY
> > -#define NUMPTY
> > +#ifndef _TRACE_GFS2_DEF_
> > +#define _TRACE_GFS2_DEF_
> >  static inline u8 glock_trace_state(unsigned int state)
> >  {
> >  	switch(state) {
> > @@ -56,7 +56,7 @@ static inline u8 glock_trace_state(unsig
> >  	}
> >  	return DLM_LOCK_NL;
> >  }
> > -#endif
> > +#endif /* _TRACE_GFS2_DEF_ */
> >  
> >  /* Section 1 - Locking
> >   *
> > @@ -105,7 +105,7 @@ TRACE_EVENT(gfs2_glock_state_change,
> >  		  glock_trace_name(__entry->tgt_state),
> >  		  glock_trace_name(__entry->dmt_state),
> >  		  show_glock_flags(__entry->flags))
> > -);
> > +)
> >  
> >  /* State change -> unlocked, glock is being deallocated */
> >  TRACE_EVENT(gfs2_glock_put,
> > @@ -137,7 +137,7 @@ TRACE_EVENT(gfs2_glock_put,
> >  		  glock_trace_name(DLM_LOCK_IV),
> >  		  show_glock_flags(__entry->flags))
> >  
> > -);
> > +)
> >  
> >  /* Callback (local or remote) requesting lock demotion */
> >  TRACE_EVENT(gfs2_demote_rq,
> > @@ -171,7 +171,7 @@ TRACE_EVENT(gfs2_demote_rq,
> >                    glock_trace_name(__entry->dmt_state),
> >  		  show_glock_flags(__entry->flags))
> >  
> > -);
> > +)
> >  
> >  /* Promotion/grant of a glock */
> >  TRACE_EVENT(gfs2_promote,
> > @@ -201,7 +201,7 @@ TRACE_EVENT(gfs2_promote,
> >  		  (unsigned long long)__entry->glnum,
> >  		  __entry->first ? "first": "other",
> >  		  glock_trace_name(__entry->state))
> > -);
> > +)
> >  
> >  /* Queue/dequeue a lock request */
> >  TRACE_EVENT(gfs2_glock_queue,
> > @@ -231,7 +231,7 @@ TRACE_EVENT(gfs2_glock_queue,
> >  		  (unsigned long long)__entry->glnum,
> >  		  __entry->queue ? "" : "de",
> >  		  glock_trace_name(__entry->state))
> > -);
> > +)
> >  
> >  /* Section 2 - Log/journal
> >   *
> > @@ -270,7 +270,7 @@ TRACE_EVENT(gfs2_pin,
> >  		  (unsigned long long)__entry->block,
> >  		  (unsigned long)__entry->len,
> >  		  (unsigned long long)__entry->ino)
> > -);
> > +)
> >  
> >  /* Flushing the log */
> >  TRACE_EVENT(gfs2_log_flush,
> > @@ -295,7 +295,7 @@ TRACE_EVENT(gfs2_log_flush,
> >  		  MAJOR(__entry->dev), MINOR(__entry->dev),
> >  		  __entry->start ? "start" : "end",
> >  		  (unsigned long long)__entry->log_seq)
> > -);
> > +)
> >  
> >  /* Reserving/releasing blocks in the log */
> >  TRACE_EVENT(gfs2_log_blocks,
> > @@ -316,7 +316,7 @@ TRACE_EVENT(gfs2_log_blocks,
> >  
> >  	TP_printk("%u,%u log reserve %d", MAJOR(__entry->dev),
> >  		  MINOR(__entry->dev), __entry->blocks)
> > -);
> > +)
> >  
> >  /* Section 3 - bmap
> >   *
> > @@ -364,7 +364,7 @@ TRACE_EVENT(gfs2_bmap,
> >  		  (unsigned long long)__entry->pblock,
> >  		  __entry->state, __entry->create ? "create " : "nocreate",
> >  		  __entry->errno)
> > -);
> > +)
> >  
> >  /* Keep track of blocks as they are allocated/freed */
> >  TRACE_EVENT(gfs2_block_alloc,
> > @@ -396,7 +396,7 @@ TRACE_EVENT(gfs2_block_alloc,
> >  		  (unsigned long long)__entry->start,
> >  		  (unsigned long)__entry->len,
> >  		  block_state_name(__entry->block_state))
> > -);
> > +)
> >  
> >  #endif /* _TRACE_GFS2_H */
> >  
> > 
> 
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
       [not found]   ` <1304422337.25414.2382.camel@gandalf.stny.rr.com>
@ 2011-05-03 21:26     ` Mathieu Desnoyers
  2011-05-03 22:01       ` Frederic Weisbecker
  0 siblings, 1 reply; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-03 21:26 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Ingo Molnar, Thomas Gleixner, Frederic Weisbecker

(I dropped the large CC list from this thread to fit within LKML 20 CC
list limit. I kept them in bcc so they see this message. Please feel
free to follow the rest of the thread on LKML.)

* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Mon, 2011-05-02 at 17:11 -0400, Mathieu Desnoyers wrote:
> > plain text document attachment
> > (trace-event-gradual-semicolon-removal.patch)
> >  The side-effect of these extra semicolons are:
> > 
> > a) to pollute the preprocessor output, leaving extra ";" between trace event
> > instances in trace points creation.
> 
> Who cares?

Anyone trying to ensure tracepoints are well implemented (and thus that
their resulting preprocessor output is bug-free). I did the exercise
myself, and ended up with:

commit 881fe4bdcdc899674524e30a76c76d298b447008
    tracing: remove duplicate null-pointer check in skb tracepoint
commit 23036f1a340beec19cc451ba9719526c4ffb3a57
    blktrace: add missing probe argument to block_bio_complete

so I think the preprocessor output should be more digestible by
developers, with event some documentation on how to format it so it
becomes readable. The following bash script does it for instance (I am
certain that there are ton of much better ways to do it, but this is
what I use):

#!/bin/sh

# kcpp:
# Create a .cpp file (c preprocessor output) from the same gcc
# invokation that builds an object file.

# kcpp SOURCE OBJECT
# invoke with e.g. kcpp kernel/sched.c kernel/sched.o
#  output file will be kernel/sched.cpp
# needs gcc, sed and indent

SOURCE=$1
OBJECT=$2
FILECPP=$(echo $1 | sed 's/\.c/\.cpp/')
POBJECT=$(echo ${OBJECT} | sed -e 's/\//\\\//' -e 's/\./\\\./')
PFILECPP=$(echo ${FILECPP} | sed -e 's/\//\\\//' -e 's/\./\\\./')

echo "Preprocessing ${SOURCE} -> ${FILECPP}"
echo "Object build monitored: ${OBJECT}"
touch ${SOURCE}
rm -f ${OBJECT}

CPPCMD=$(make V=1 ${OBJECT} | tail -n 1 | sed 's/ -c / -E /')
CPPCMD=$(echo ${CPPCMD} | sed "s/ -o [^ ]* / -o ${PFILECPP} /")
PCPPCMD=$(echo ${CPPCMD} | sed -e 's/"//g')
echo Invoking:
echo ${PCPPCMD}
${PCPPCMD}

echo "Formatting ${FILECPP}... "
mv ${FILECPP} ${FILECPP}.tmp
indent ${FILECPP}.tmp -o ${FILECPP}
echo "done."
echo
echo "Output preprocessor file can be found in ${FILECPP}"


> 
> > 
> > b) to render impossible creation of an array of events. Extra semicolons are
> > not a matter as long as TRACE_EVENT creates statements, structure elements or
> > functions, because extra semicolons are discarded by the compiler. However,
> > when creating an array, the separator is the comma, and the semicolon causes a
> > parse error.
> 
> This is the important part.

Yep.

> 
> > 
> > 
> > * So what is the motivation for removing these semicolons ?
> > 
> > Currently, Ftrace is creating a "ftrace_define_fields_##call" function for each
> > event to define the event fields, which consumes space. It also has the
> > ".fields" list head to keep a dynamically generated list of event fields.
> > 
> > By allowing creation of arrays of events, we can do the following: turn the
> > dynamically created list of event fields into a first-level const array listing
> > event fields. We can use ARRAY_SIZE() on this array to know its size,
> > statically. Then, in a following trace event stage, we can create another const
> > array containing tuples of (pointers to the event-specific arrays, array size).
> > 
> > So we get all the same information Ftrace currently gets with much less code
> > overall, much less read-write data, and less dynamic initialization code.
> 
> That looks like something worth doing.
> 
> > 
> > 
> > * Why do this incrementally ?
> 
> Preaching to the choir?

I've been asked to explain myself on this topic by Frederic last time I
posted this patchset, so I added the explanation to the changelog.

> 
> > 
> > After this preliminary patch, the semicolon removal can be done gradually
> > without breaking the build: we can be in an intermediate state with some files
> > having semicolons and others without. This is therefore good for
> > bissectability, and seems like a nice way to bring in an internal API change
> > without making developers suffer too much. Then, once things are stabilized, we
> > can start modifying the Ftrace code to generate the more space-efficient arrays
> > (possibly in a release-cycle or so), knowing that this enforces a strict
> > requirement on semicolon removal.
> 
> Mathieu, I like the patch, but I think you explain too much ;)

Or too little, depending on the maintainer. ;-)

More seriously, I can remove pieces of changelog text if you think this
is too much. It's your call.

> 
> 
> > 
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
> > CC: Alexander Graf <agraf@suse.de>
> > CC: Alex Elder <aelder@sgi.com>
> > CC: Anton Blanchard <anton@samba.org>
> > CC: Arjan van de Ven <arjan@linux.intel.com>
> > CC: Avi Kivity <avi@redhat.com>
> > CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > CC: Christoph Hellwig <hch@lst.de>
> > CC: Chris Wilson <chris@chris-wilson.co.uk>
> > CC: Dave Airlie <airlied@redhat.com>
> > CC: Dave Chinner <david@fromorbit.com>
> > CC: Dave Chinner <dchinner@redhat.com>
> > CC: David S. Miller <davem@davemloft.net>
> > CC: Gleb Natapov <gleb@redhat.com>
> > CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
> > CC: Ingo Molnar <mingo@elte.hu>
> > CC: James Bottomley <James.Bottomley@suse.de>
> > CC: Jean Pihet <j-pihet@ti.com>
> > CC: Jeff Moyer <jmoyer@redhat.com>
> > CC: Jens Axboe <axboe@kernel.dk>
> > CC: Jeremy Kerr <jk@ozlabs.org>
> > CC: Jesse Barnes <jbarnes@virtuousgeek.org>
> > CC: Joerg Roedel <joerg.roedel@amd.com>
> > CC: Johannes Berg <johannes@sipsolutions.net>
> > CC: John W. Linville <linville@tuxdriver.com>
> > CC: Josh Stone <jistone@redhat.com>
> > CC: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
> > CC: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
> > CC: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> > CC: Larry Woodman <lwoodman@redhat.com>
> > CC: Len Brown <len.brown@intel.com>
> > CC: Li Zefan <lizf@cn.fujitsu.com>
> > CC: Marcelo Tosatti <mtosatti@redhat.com>
> > CC: Martin K. Petersen <martin.petersen@oracle.com>
> > CC: Masami Hiramatsu <mhiramat@redhat.com>
> > CC: Mel Gorman <mel@csn.ul.ie>
> > CC: Neil Horman <nhorman@tuxdriver.com>
> > CC: Oleg Nesterov <oleg@redhat.com>
> > CC: Paul Mackerras <paulus@samba.org>
> > CC: Peter Zijlstra <peterz@infradead.org>
> > CC: Reinette Chatre <reinette.chatre@intel.com>
> > CC: Rik van Riel <riel@redhat.com>
> > CC: Roland McGrath <roland@redhat.com>
> > CC: Rusty Russell <rusty@rustcorp.com.au>
> > CC: Steven Rostedt <rostedt@goodmis.org>
> > CC: Steven Whitehouse <swhiteho@redhat.com>
> > CC: Tejun Heo <tj@kernel.org>
> > CC: Theodore Ts'o <tytso@mit.edu>
> > CC: Thomas Gleixner <tglx@linutronix.de>
> > CC: Thomas Renninger <trenn@suse.de>
> > CC: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
> > CC: Vadim Rozenfeld <vrozenfe@redhat.com>
> > CC: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> > CC: Zhu Yi <yi.zhu@intel.com>
> 
> I don't think you have enough Cc's
> 

Yeah, I'll cut down this list. Given your explanation in another mail,
people interested to know the context of a patch should have enough
information with the patch changelog to know what is happening, and to
get to LKML to find the other relevant changes.

Thanks,

Mathieu



> -- Steve
> 
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-03 14:34           ` Steven Rostedt
@ 2011-05-03 21:29             ` Mathieu Desnoyers
  0 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-03 21:29 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Mark Brown, LKML, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Tue, 2011-05-03 at 15:24 +0100, Mark Brown wrote:
> > On Tue, May 03, 2011 at 03:14:37PM +0100, Mark Brown wrote:
> 
> > OK, now I see patch 1 I understand why you're doing this.  It should
> > still be at least called out in the patch description if not actually
> > split out into a separate patch (which would be ideal) - one of the
> > things that really stands out in reviews is unrelated changes.
> 
> I actually think there should have been two different patch sets. One
> for the semi colon clean up, and the other to do the work for arrays.
> The semi colon clean up is non-controversial as it is just a clean up
> that does not affect the current code at all.
> 
> But the added array preparation is not needed until we do the array
> work, which deserves its own patch set.

OK, I'll split those patches.

Thanks,

Mathieu

> 
> -- Steve
> 
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 29/32] trace event asoc remove semicolons
  2011-05-03 20:57           ` Mathieu Desnoyers
@ 2011-05-03 21:30             ` Mathieu Desnoyers
  0 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-03 21:30 UTC (permalink / raw)
  To: Mark Brown
  Cc: LKML, Steven Rostedt, Ingo Molnar, Thomas Gleixner,
	Frederic Weisbecker

* Mathieu Desnoyers (mathieu.desnoyers@efficios.com) wrote:
> * Mark Brown (broonie@opensource.wolfsonmicro.com) wrote:
> > On Tue, May 03, 2011 at 03:14:37PM +0100, Mark Brown wrote:
> > > On Tue, May 03, 2011 at 10:06:47AM -0400, Mathieu Desnoyers wrote:
> > 
> > > > Yes, this change is related, because these declarations will cause harm.
> > > > The structure declaration cannot be put within an array declaration,
> > > > because then they won't be simply "ignored": they will try to declare
> > > > structures within an array, which is not valid. This is why I did this
> > > > change in the same patch.
> > 
> > > This might make a bit more sense if we'd seen the earlier or possibly
> > > later patches...  According to the patch description all you're doing
> > > here is removing the semicolons.
> > 
> > OK, now I see patch 1 I understand why you're doing this.  It should
> > still be at least called out in the patch description if not actually
> > split out into a separate patch (which would be ideal) - one of the
> > things that really stands out in reviews is unrelated changes.
> 
> Due to the large number of patches (32 overall), I prefer not to overdo
> it in terms of splitting changes to each individual subsystem in even
> more patches. If it's OK with you, I'll just clarify the changelog.

Please disregard this message, since Steven showed me the light. ;-)

Thanks,

Mathieu

> 
> Thanks,
> 
> Mathieu
> 
> -- 
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 57+ messages in thread

* Re: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
  2011-05-03 21:26     ` Mathieu Desnoyers
@ 2011-05-03 22:01       ` Frederic Weisbecker
  0 siblings, 0 replies; 57+ messages in thread
From: Frederic Weisbecker @ 2011-05-03 22:01 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: Steven Rostedt, LKML, Ingo Molnar, Thomas Gleixner

On Tue, May 03, 2011 at 05:26:57PM -0400, Mathieu Desnoyers wrote:
> * Steven Rostedt (rostedt@goodmis.org) wrote:
> > > * Why do this incrementally ?
> > 
> > Preaching to the choir?
> 
> I've been asked to explain myself on this topic by Frederic last time I
> posted this patchset, so I added the explanation to the changelog.

Explaining it in the cover letter is enough :)

> > 
> > > 
> > > After this preliminary patch, the semicolon removal can be done gradually
> > > without breaking the build: we can be in an intermediate state with some files
> > > having semicolons and others without. This is therefore good for
> > > bissectability, and seems like a nice way to bring in an internal API change
> > > without making developers suffer too much. Then, once things are stabilized, we
> > > can start modifying the Ftrace code to generate the more space-efficient arrays
> > > (possibly in a release-cycle or so), knowing that this enforces a strict
> > > requirement on semicolon removal.
> > 
> > Mathieu, I like the patch, but I think you explain too much ;)
> 
> Or too little, depending on the maintainer. ;-)

Well, I did never asked for 1000 lines of changelog ;)
The real problem with your previous set is that your arguments were
either too weak (double ";" in generated code doesn't alone justify
a massive change like this) or too foggy (the array of field
idea was not developed enough to be understanble whereas it was the
only sane reason for this massive change).

Just explain briefly that the end goal is for storing fields in an array
with a quick example and you are done with few dozen lines for
your changelog.

People simply don't review fat changelogs.

^ permalink raw reply	[flat|nested] 57+ messages in thread

* [RFC patch 11/32] trace event module remove semicolons
  2011-05-03 23:10 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction (v2) Mathieu Desnoyers
@ 2011-05-03 23:10 ` Mathieu Desnoyers
  0 siblings, 0 replies; 57+ messages in thread
From: Mathieu Desnoyers @ 2011-05-03 23:10 UTC (permalink / raw)
  To: LKML, Steven Rostedt
  Cc: Thomas Gleixner, Frederic Weisbecker, Ingo Molnar,
	Mathieu Desnoyers, Li Zefan, Rusty Russell

[-- Attachment #1: trace-event-module-remove-semicolons.patch --]
[-- Type: text/plain, Size: 1799 bytes --]

Part of the gradual TRACE_EVENT() semicolon removal. Enables creation of array
of events, thus saving space for trace event probes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Li Zefan <lizf@cn.fujitsu.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
---
 include/trace/events/module.h |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Index: linux-2.6-lttng/include/trace/events/module.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/module.h
+++ linux-2.6-lttng/include/trace/events/module.h
@@ -42,7 +42,7 @@ TRACE_EVENT(module_load,
 	),
 
 	TP_printk("%s %s", __get_str(name), show_module_flags(__entry->taints))
-);
+)
 
 TRACE_EVENT(module_free,
 
@@ -59,7 +59,7 @@ TRACE_EVENT(module_free,
 	),
 
 	TP_printk("%s", __get_str(name))
-);
+)
 
 #ifdef CONFIG_MODULE_UNLOAD
 /* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */
@@ -84,21 +84,21 @@ DECLARE_EVENT_CLASS(module_refcnt,
 
 	TP_printk("%s call_site=%pf refcnt=%d",
 		  __get_str(name), (void *)__entry->ip, __entry->refcnt)
-);
+)
 
 DEFINE_EVENT(module_refcnt, module_get,
 
 	TP_PROTO(struct module *mod, unsigned long ip),
 
 	TP_ARGS(mod, ip)
-);
+)
 
 DEFINE_EVENT(module_refcnt, module_put,
 
 	TP_PROTO(struct module *mod, unsigned long ip),
 
 	TP_ARGS(mod, ip)
-);
+)
 #endif /* CONFIG_MODULE_UNLOAD */
 
 TRACE_EVENT(module_request,
@@ -121,7 +121,7 @@ TRACE_EVENT(module_request,
 
 	TP_printk("%s wait=%d call_site=%pf",
 		  __get_str(name), (int)__entry->wait, (void *)__entry->ip)
-);
+)
 
 #endif /* CONFIG_MODULES */
 


^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2011-05-03 23:14 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-02 21:11 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 02/32] trace event sample remove semicolons, specify need for ifdef around declarations Mathieu Desnoyers
2011-05-03 14:31   ` Steven Rostedt
2011-05-02 21:11 ` [RFC patch 03/32] trace event block remove semicolumns Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 04/32] trace event ext4 remove semicolons Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 05/32] trace event irq " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 06/32] trace event jbd2 " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 07/32] trace event kmem " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 08/32] trace event kvm " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 09/32] trace event lock " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 10/32] trace event mce " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 11/32] trace event module " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 12/32] trace event napi " Mathieu Desnoyers
2011-05-03 12:26   ` Neil Horman
2011-05-02 21:11 ` [RFC patch 13/32] trace event net " Mathieu Desnoyers
2011-05-03 12:27   ` Neil Horman
2011-05-02 21:11 ` [RFC patch 14/32] trace event power " Mathieu Desnoyers
2011-05-03 12:59   ` Pihet-XID, Jean
2011-05-02 21:11 ` [RFC patch 15/32] trace event sched remove trailing semicolon Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 16/32] trace event scsi remove semicolons Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 17/32] trace event signal " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 18/32] trace event skb " Mathieu Desnoyers
2011-05-03 12:27   ` Neil Horman
2011-05-02 21:11 ` [RFC patch 19/32] trace event syscalls " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 20/32] trace event timer " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 21/32] trace event vmscan " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 22/32] trace event workqueue " Mathieu Desnoyers
2011-05-03  8:25   ` Tejun Heo
2011-05-02 21:11 ` [RFC patch 23/32] trace event writeback " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 24/32] trace event wireless " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 25/32] trace event video gpu " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 26/32] trace event gfs2 " Mathieu Desnoyers
2011-05-03 10:14   ` Steven Whitehouse
2011-05-03 21:13     ` Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 27/32] trace event xfs " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 28/32] trace event powerpc " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 29/32] trace event asoc " Mathieu Desnoyers
2011-05-03 13:21   ` Mark Brown
2011-05-03 14:06     ` Mathieu Desnoyers
2011-05-03 14:14       ` Mark Brown
2011-05-03 14:24         ` Mark Brown
2011-05-03 14:34           ` Steven Rostedt
2011-05-03 21:29             ` Mathieu Desnoyers
2011-05-03 20:57           ` Mathieu Desnoyers
2011-05-03 21:30             ` Mathieu Desnoyers
2011-05-03 14:30       ` Steven Rostedt
2011-05-03 14:29   ` Mark Brown
2011-05-02 21:11 ` [RFC patch 30/32] trace event compaction " Mathieu Desnoyers
2011-05-02 21:11 ` [RFC patch 31/32] trace event regulator " Mathieu Desnoyers
2011-05-03 14:30   ` Mark Brown
2011-05-02 21:11 ` [RFC patch 32/32] trace event btrfs " Mathieu Desnoyers
     [not found] ` <20110502213211.250108074@efficios.com>
2011-05-03 14:07   ` [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal Mathieu Desnoyers
2011-05-03 14:37     ` Steven Rostedt
2011-05-03 14:53       ` Mark Brown
     [not found]   ` <1304422337.25414.2382.camel@gandalf.stny.rr.com>
2011-05-03 21:26     ` Mathieu Desnoyers
2011-05-03 22:01       ` Frederic Weisbecker
  -- strict thread matches above, loose matches on Subject: below --
2011-05-03 23:10 [RFC patch 00/32] TRACE_EVENT: cleanup for code-size reduction (v2) Mathieu Desnoyers
2011-05-03 23:10 ` [RFC patch 11/32] trace event module remove semicolons Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox