From: Mathieu Desnoyers Date: Mon, 4 Nov 2013 17:30:26 +0000 (-0500) Subject: Update ext4 instrumentation to Linux 3.12 X-Git-Tag: v2.4.0-rc1~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=39aee4a08fd09f0597f8ff8803fe432b543e8956;p=lttng-modules.git Update ext4 instrumentation to Linux 3.12 Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/ext4.h b/instrumentation/events/lttng-module/ext4.h index d6751bd9..d7429040 100644 --- a/instrumentation/events/lttng-module/ext4.h +++ b/instrumentation/events/lttng-module/ext4.h @@ -2869,7 +2869,51 @@ TRACE_EVENT(ext4_ext_remove_space_done, #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) + +DECLARE_EVENT_CLASS(ext4__es_extent, + TP_PROTO(struct inode *inode, struct extent_status *es), + + TP_ARGS(inode, es), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( ext4_lblk_t, lblk ) + __field( ext4_lblk_t, len ) + __field( ext4_fsblk_t, pblk ) + __field( char, status ) + ), + + TP_fast_assign( + tp_assign(dev, inode->i_sb->s_dev) + tp_assign(ino, inode->i_ino) + tp_assign(lblk, es->es_lblk) + tp_assign(len, es->es_len) + tp_assign(pblk, ext4_es_pblock(es)) + tp_assign(status, ext4_es_status(es)) + ), + + TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s", + MAJOR(__entry->dev), MINOR(__entry->dev), + (unsigned long) __entry->ino, + __entry->lblk, __entry->len, + __entry->pblk, show_extent_status(__entry->status)) +) + +DEFINE_EVENT(ext4__es_extent, ext4_es_insert_extent, + TP_PROTO(struct inode *inode, struct extent_status *es), + + TP_ARGS(inode, es) +) + +DEFINE_EVENT(ext4__es_extent, ext4_es_cache_extent, + TP_PROTO(struct inode *inode, struct extent_status *es), + + TP_ARGS(inode, es) +) + +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) TRACE_EVENT(ext4_es_insert_extent, TP_PROTO(struct inode *inode, struct extent_status *es),