TRACE_EVENT: cleanup for code-size reduction
Subsystems (19)
Mathieu Desnoyers
reviewercover TRACE_EVENT: cleanup for code-size reduction
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
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Mathieu Desnoyers
reviewerRFC PATCH 2/32 trace event sample remove semicolons, specify need for ifdef around declarations
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.
--- samples/trace_events/trace-events-sample.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
samples/trace_events/trace-events-sample.h +13 -1
@@ -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. *****/
Steven Rostedt
maintainerRe: [RFC patch 02/32] trace event sample remove semicolons, specify need for ifdef around declarations
Quoted 9 lines · Mathieu Desnoyers
plain text document attachment (trace-event-sample-remove-semicolons.patch)
Part of the gradualTRACE_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
Mathieu Desnoyers
reviewerRFC PATCH 3/32 trace event block remove semicolumns
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/block.h | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-)
include/trace/events/block.h +22 -22
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 4/32 trace event ext4 remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/ext4.h | 143 ++++++++++++++++++++++---------------------- 1 file changed, 74 insertions(+), 69 deletions(-)
include/trace/events/ext4.h +74 -69
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 5/32 trace event irq remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/irq.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
include/trace/events/irq.h +11 -6
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 6/32 trace event jbd2 remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/jbd2.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-)
include/trace/events/jbd2.h +16 -11
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 7/32 trace event kmem remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/kmem.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
include/trace/events/kmem.h +16 -16
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 8/32 trace event kvm remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- 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(-)
include/trace/events/kvm.h +15 -15
@@ -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
arch/powerpc/kvm/trace.h +14 -14
@@ -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 */
arch/x86/kvm/trace.h +22 -22
176 lines not on this page · raw message
arch/x86/kvm/mmutrace.h +12 -12
@@ -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
Mathieu Desnoyers
reviewerRFC PATCH 9/32 trace event lock remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/lock.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
include/trace/events/lock.h +5 -5
@@ -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
Mathieu Desnoyers
reviewerRFC PATCH 10/32 trace event mce remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/mce.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/mce.h +1 -1
@@ -61,7 +61,7 @@ TRACE_EVENT(mce_record, __entry->walltime, __entry->socketid, __entry->apicid) -); +)#endif /* _TRACE_MCE_H */
Mathieu Desnoyers
reviewerRFC PATCH 11/32 trace event module remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/module.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
include/trace/events/module.h +11 -6
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 12/32 trace event napi remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/napi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/events/napi.h +1 -1
@@ -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
Re: [RFC patch 12/32] trace event napi remove semicolons
Quoted 11 lines · Mathieu Desnoyers
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 <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>CC Neil Horman <[email protected]>CC David S. Miller <[email protected]>CC Koki Sanagi <[email protected]>
Quoted 4 lines
--- include/trace/events/napi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
Index:
linux-2.6-lttng/include/trace/events/napi.h
===================================================================include/trace/events/napi.h +1
-1@@ -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
Mathieu Desnoyers
reviewerRFC PATCH 13/32 trace event net remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/net.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/trace/events/net.h +4 -4
@@ -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 */
Re: [RFC patch 13/32] trace event net remove semicolons
Quoted 11 lines · Mathieu Desnoyers
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 <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>CC Neil Horman <[email protected]>CC David S. Miller <[email protected]>CC Koki Sanagi <[email protected]>
Quoted 4 lines
--- include/trace/events/net.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Quoted 40 lines
Index:
linux-2.6-lttng/include/trace/events/net.h
===================================================================include/trace/events/net.h +4
-4@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 14/32 trace event power remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/power.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
include/trace/events/power.h +14 -14
@@ -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 */
Re: [RFC patch 14/32] trace event power remove semicolons
Quoted 12 lines · Mathieu Desnoyers
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 <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>CC Jean Pihet <[email protected]>CC Arjan van de Ven <[email protected]>CC Thomas Renninger <[email protected]>CC Len Brown <[email protected]>
Quoted 3 lines
---
include/trace/events/power.h | 28 ++++++++++++++--------------1 file changed, 14 insertions(+), 14 deletions(-)
Quoted 126 lines
Index:
linux-2.6-lttng/include/trace/events/power.h
===================================================================include/trace/events/power.h +14
-14@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 15/32 trace event sched remove trailing semicolon
In reply to Mathieu DesnoyersPart 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.
--- include/trace/events/sched.h | 77 ++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 36 deletions(-)
include/trace/events/sched.h +41 -36
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 16/32 trace event scsi remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/scsi.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
include/trace/events/scsi.h +11 -6
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 17/32 trace event signal remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/signal.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
include/trace/events/signal.h +5 -5
@@ -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_overfloTP_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 */
Mathieu Desnoyers
reviewerRFC PATCH 18/32 trace event skb remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/skb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/trace/events/skb.h +3 -3
@@ -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 */
Re: [RFC patch 18/32] trace event skb remove semicolons
Quoted 11 lines · Mathieu Desnoyers
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 <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>CC Koki Sanagi <[email protected]>CC Neil Horman <[email protected]>CC David S. Miller <[email protected]>
Quoted 1 line
---
Quoted 36 lines
include/trace/events/skb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)Index:
linux-2.6-lttng/include/trace/events/skb.h
===================================================================include/trace/events/skb.h +3
-3@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 19/32 trace event syscalls remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/syscalls.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
include/trace/events/syscalls.h +7 -2
@@ -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 )
Mathieu Desnoyers
reviewerRFC PATCH 20/32 trace event timer remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/timer.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
include/trace/events/timer.h +14 -14
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 21/32 trace event vmscan remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/vmscan.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
include/trace/events/vmscan.h +16 -16
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 22/32 trace event workqueue remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/workqueue.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
include/trace/events/workqueue.h +5 -5
@@ -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 */
Re: [RFC patch 22/32] trace event workqueue remove semicolons
Quoted 10 lines · Mathieu Desnoyers
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 <[email protected]>Acked-by Tejun Heo <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>CC Arjan van de Ven <[email protected]>
Thanks.
Signature · 1 line
tejun
Mathieu Desnoyers
reviewerRFC PATCH 23/32 trace event writeback remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/writeback.h | 53 +++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 24 deletions(-)
include/trace/events/writeback.h +29 -24
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 24/32 trace event wireless remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- 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(-)
drivers/net/wireless/iwlwifi/iwl-devtrace.h +10 -10
@@ -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
drivers/net/wireless/iwmc3200wifi/trace.h +7 -7
@@ -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
net/mac80211/driver-trace.h +59 -59
446 lines not on this page · raw message
Mathieu Desnoyers
reviewerRFC PATCH 25/32 trace event video gpu remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- drivers/gpu/drm/drm_trace.h | 6 ++-- drivers/gpu/drm/i915/i915_trace.h | 52 +++++++++++++++++++------------------- 2 files changed, 29 insertions(+), 29 deletions(-)
drivers/gpu/drm/drm_trace.h +3 -3
@@ -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_ */
drivers/gpu/drm/i915/i915_trace.h +26 -26
190 lines not on this page · raw message
Mathieu Desnoyers
reviewerRFC PATCH 26/32 trace event gfs2 remove semicolons
In reply to Mathieu DesnoyersPart 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.
--- fs/gfs2/trace_gfs2.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
fs/gfs2/trace_gfs2.h +13 -13
@@ -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 */
Re: [RFC patch 26/32] trace event gfs2 remove semicolons
Hi,
Quoted 6 lines · Mathieu Desnoyers
plain text document attachment (trace-event-gfs2-remove-semicolons.patch)
Part of the gradualTRACE_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.
Quoted 125 lines
Signed-off-by Mathieu Desnoyers <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>--- fs/gfs2/trace_gfs2.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)Index:
linux-2.6-lttng/fs/gfs2/trace_gfs2.h
===================================================================fs/gfs2/trace_gfs2.h +13
-13@@ -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
reviewerRe: [RFC patch 26/32] trace event gfs2 remove semicolons
Quoted 9 lines · * Steven Whitehouse ([email protected]) wrote:
Hi,
Quoted 6 lines · Mathieu Desnoyers
plain text document attachment (trace-event-gfs2-remove-semicolons.patch)
Part of the gradualTRACE_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.
Quoted 3 lines
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
Quoted 130 lines
Steve.
Quoted 125 lines
Signed-off-by Mathieu Desnoyers <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>--- fs/gfs2/trace_gfs2.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)Index:
linux-2.6-lttng/fs/gfs2/trace_gfs2.h
===================================================================fs/gfs2/trace_gfs2.h +13
-13@@ -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 */
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Mathieu Desnoyers
reviewerRFC PATCH 27/32 trace event xfs remove semicolons
In reply to Mathieu DesnoyersPart 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.
--- fs/xfs/linux-2.6/xfs_trace.h | 539 +++++++++++++++++++++---------------------- 1 file changed, 272 insertions(+), 267 deletions(-)
fs/xfs/linux-2.6/xfs_trace.h +272 -267
@@ -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_classDEFINE_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 */
Mathieu Desnoyers
reviewerRFC PATCH 28/32 trace event powerpc remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- arch/powerpc/include/asm/trace.h | 23 +++++++++++++++++------ arch/powerpc/platforms/cell/spufs/sputrace.h | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-)
arch/powerpc/include/asm/trace.h +17 -6
@@ -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 */
arch/powerpc/platforms/cell/spufs/sputrace.h +1 -1
@@ -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))
Mathieu Desnoyers
reviewerRFC PATCH 29/32 trace event asoc remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/asoc.h | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-)
include/trace/events/asoc.h +22 -17
@@ -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 */
Re: [RFC patch 29/32] trace event asoc remove semicolons
Quoted 2 lines · Mathieu Desnoyers
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?
include/trace/events/asoc.h line 18
Quoted 9 lines
include/trace/events/asoc.h +4
-0+#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...
Mathieu Desnoyers
reviewerRe: [RFC patch 29/32] trace event asoc remove semicolons
Quoted 6 lines · * Mark Brown ([email protected]) wrote:
Quoted 2 lines · Mathieu Desnoyers
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.
Quoted 9 lines
Quoted 9 lines
include/trace/events/asoc.h +3
-0+#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 ;
Quoted 5 lines
Quoted 1 line
+#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
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Re: [RFC patch 29/32] trace event asoc remove semicolons
Quoted 11 lines · Mathieu Desnoyers
Quoted 3 lines · * Mark Brown ([email protected]) 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.
Re: [RFC patch 29/32] trace event asoc remove semicolons
Quoted 11 lines · Mark Brown
Quoted 5 lines · Mathieu Desnoyers
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.
Steven Rostedt
maintainerRe: [RFC patch 29/32] trace event asoc remove semicolons
Quoted 6 lines · Mark Brown
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
Mathieu Desnoyers
reviewerRe: [RFC patch 29/32] trace event asoc remove semicolons
Quoted 8 lines · * Steven Rostedt ([email protected]) wrote:
Quoted 6 lines · Mark Brown
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.
Quoted 7 lines
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
Quoted 4 lines
-- Steve
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Mathieu Desnoyers
reviewerRe: [RFC patch 29/32] trace event asoc remove semicolons
In reply to Mark BrownQuoted 9 lines · * Mark Brown ([email protected]) wrote:
Quoted 7 lines · Mark Brown
Quoted 5 lines · Mathieu Desnoyers
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.
Quoted 8 lines
Quoted 3 lines
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
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Mathieu Desnoyers
reviewerRe: [RFC patch 29/32] trace event asoc remove semicolons
Quoted 14 lines · * Mathieu Desnoyers ([email protected]) wrote:
Quoted 13 lines · * Mark Brown ([email protected]) wrote:
Quoted 11 lines · Mark Brown
Quoted 5 lines · Mathieu Desnoyers
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.
Quoted 8 lines
Quoted 4 lines
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
Quoted 10 lines
Thanks,
Mathieu
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Steven Rostedt
maintainerRe: [RFC patch 29/32] trace event asoc remove semicolons
In reply to Mathieu DesnoyersQuoted 5 lines · Mathieu Desnoyers
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).
Quoted 16 lines
Quoted 10 lines
Quoted 10 lines
include/trace/events/asoc.h +3
-0+#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 ;Quoted 5 lines
Quoted 1 line
+#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...
Quoted 5 lines
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
Re: [RFC patch 29/32] trace event asoc remove semicolons
In reply to Mathieu DesnoyersQuoted 9 lines · Mathieu Desnoyers
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 <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>CC Mark Brown <[email protected]>
and adding Liam.
Quoted 179 lines
--- include/trace/events/asoc.h | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-)Index:
linux-2.6-lttng/include/trace/events/asoc.h
===================================================================include/trace/events/asoc.h +22
-17@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 30/32 trace event compaction remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/compaction.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/trace/events/compaction.h +4 -4
@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 31/32 trace event regulator remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/regulator.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
include/trace/events/regulator.h +10 -10
@@ -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 */
Re: [RFC patch 31/32] trace event regulator remove semicolons
Quoted 9 lines · Mathieu Desnoyers
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 <[email protected]>CC Steven Rostedt <[email protected]>CC Frederic Weisbecker <[email protected]>CC Ingo Molnar <[email protected]>CC Thomas Gleixner <[email protected]>CC Mark Brown <[email protected]>
and adding Liam.
Quoted 99 lines
--- include/trace/events/regulator.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)Index:
linux-2.6-lttng/include/trace/events/regulator.h
===================================================================include/trace/events/regulator.h +10
-10@@ -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 */
Mathieu Desnoyers
reviewerRFC PATCH 32/32 trace event btrfs remove semicolons
In reply to Mathieu DesnoyersPart of the gradual TRACE_EVENT() semicolon removal. Enables creation of array of events, thus saving space for trace event probes.
--- include/trace/events/btrfs.h | 57 +++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 26 deletions(-)
include/trace/events/btrfs.h +31 -26
@@ -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 */
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mathieu Desnoyers
reviewerRe: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
Hi,
And here is a self-reply to patch 01/32, due to LKML refusing messages with more than 20 recipients.
Thanks,
Mathieu
Quoted 195 lines · * Mathieu Desnoyers ([email protected]) 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.hexplaining theTRACE_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()andDEFINE_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 fromTRACE_EVENTwithin 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_EVENTcreates 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 <[email protected]>CC Alexander Graf <[email protected]>CC Alex Elder <[email protected]>CC Anton Blanchard <[email protected]>CC Arjan van de Ven <[email protected]>CC Avi Kivity <[email protected]>CC Benjamin Herrenschmidt <[email protected]>CC Christoph Hellwig <[email protected]>CC Chris Wilson <[email protected]>CC Dave Airlie <[email protected]>CC Dave Chinner <[email protected]>CC Dave Chinner <[email protected]>CC David S. Miller <[email protected]>CC Gleb Natapov <[email protected]>CC Hidetoshi Seto <[email protected]>CC Ingo Molnar <[email protected]>CC James Bottomley <[email protected]>CC Jean Pihet <[email protected]>CC Jeff Moyer <[email protected]>CC Jens Axboe <[email protected]>CC Jeremy Kerr <[email protected]>CC Jesse Barnes <[email protected]>CC Joerg Roedel <[email protected]>CC Johannes Berg <[email protected]>CC John W. Linville <[email protected]>CC Josh Stone <[email protected]>CC Kei Tokunaga <[email protected]>CC Koki Sanagi <[email protected]>CC KOSAKI Motohiro <[email protected]>CC Larry Woodman <[email protected]>CC Len Brown <[email protected]>CC Li Zefan <[email protected]>CC Marcelo Tosatti <[email protected]>CC Martin K. Petersen <[email protected]>CC Masami Hiramatsu <[email protected]>CC Mel Gorman <[email protected]>CC Neil Horman <[email protected]>CC Oleg Nesterov <[email protected]>CC Paul Mackerras <[email protected]>CC Peter Zijlstra <[email protected]>CC Reinette Chatre <[email protected]>CC Rik van Riel <[email protected]>CC Roland McGrath <[email protected]>CC Rusty Russell <[email protected]>CC Steven Rostedt <[email protected]>CC Steven Whitehouse <[email protected]>CC Tejun Heo <[email protected]>CC Theodore Ts'o <[email protected]>CC Thomas Gleixner <[email protected]>CC Thomas Renninger <[email protected]>CC Tomohiro Kusumi <[email protected]>CC Vadim Rozenfeld <[email protected]>CC Xiao Guangrong <[email protected]>CC Zhu Yi <[email protected]>--- 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
===================================================================include/trace/ftrace.h +5
-5@@ -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
===================================================================include/linux/tracepoint.h +2
-2@@ -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
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Steven Rostedt
maintainerRe: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
Quoted 5 lines · Mathieu Desnoyers
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
Re: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
Quoted 2 lines · Steven Rostedt
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.
Quoted 7 lines
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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mathieu Desnoyers
reviewerRe: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
(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.)
Quoted 9 lines · * Steven Rostedt ([email protected]) wrote:
Quoted 6 lines · Mathieu Desnoyers
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}"
Quoted 9 lines
Quoted 7 lines
b) to render impossible creation of an array of events. Extra semicolons are not a matter as long as
TRACE_EVENTcreates 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.
Quoted 18 lines
Quoted 9 lines
* 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.
Quoted 8 lines
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.
Quoted 7 lines
That looks like something worth doing.
Quoted 3 lines
* 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.
Quoted 11 lines
Quoted 10 lines
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.
Quoted 1 line
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.
Quoted 59 lines
Quoted 50 lines
Signed-off-by Mathieu Desnoyers <[email protected]>CC Alexander Graf <[email protected]>CC Alex Elder <[email protected]>CC Anton Blanchard <[email protected]>CC Arjan van de Ven <[email protected]>CC Avi Kivity <[email protected]>CC Benjamin Herrenschmidt <[email protected]>CC Christoph Hellwig <[email protected]>CC Chris Wilson <[email protected]>CC Dave Airlie <[email protected]>CC Dave Chinner <[email protected]>CC Dave Chinner <[email protected]>CC David S. Miller <[email protected]>CC Gleb Natapov <[email protected]>CC Hidetoshi Seto <[email protected]>CC Ingo Molnar <[email protected]>CC James Bottomley <[email protected]>CC Jean Pihet <[email protected]>CC Jeff Moyer <[email protected]>CC Jens Axboe <[email protected]>CC Jeremy Kerr <[email protected]>CC Jesse Barnes <[email protected]>CC Joerg Roedel <[email protected]>CC Johannes Berg <[email protected]>CC John W. Linville <[email protected]>CC Josh Stone <[email protected]>CC Kei Tokunaga <[email protected]>CC Koki Sanagi <[email protected]>CC KOSAKI Motohiro <[email protected]>CC Larry Woodman <[email protected]>CC Len Brown <[email protected]>CC Li Zefan <[email protected]>CC Marcelo Tosatti <[email protected]>CC Martin K. Petersen <[email protected]>CC Masami Hiramatsu <[email protected]>CC Mel Gorman <[email protected]>CC Neil Horman <[email protected]>CC Oleg Nesterov <[email protected]>CC Paul Mackerras <[email protected]>CC Peter Zijlstra <[email protected]>CC Reinette Chatre <[email protected]>CC Rik van Riel <[email protected]>CC Roland McGrath <[email protected]>CC Rusty Russell <[email protected]>CC Steven Rostedt <[email protected]>CC Steven Whitehouse <[email protected]>Quoted 8 lines
CC Tejun Heo <[email protected]>CC Theodore Ts'o <[email protected]>CC Thomas Gleixner <[email protected]>CC Thomas Renninger <[email protected]>CC Tomohiro Kusumi <[email protected]>CC Vadim Rozenfeld <[email protected]>CC Xiao Guangrong <[email protected]>CC Zhu Yi <[email protected]>
Quoted 2 lines
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
Quoted 3 lines
-- Steve
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Re: [RFC patch 01/32] TRACE_EVENT: gradual semicolon removal
Quoted 7 lines · Mathieu Desnoyers
Quoted 3 lines · * Steven Rostedt ([email protected]) wrote:
Quoted 1 line
* 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 :)
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
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.
Quoted 3 lines
Quoted 1 line
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.