[lttng-dev] [PATCH lttng-modules] ext3 instrumentation: fix of assignment code conversion

Andrew Gabbasov andrew_gabbasov at mentor.com
Sun Nov 25 14:40:00 EST 2012


Due to specifics of handling assignment code in lttng-modules,
plain code in TP_fast_assign (outside tp_* macros) will not be reached.
Everything should be enclosed into tp_* fragments.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov at mentor.com>
---
 instrumentation/events/lttng-module/ext3.h |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/instrumentation/events/lttng-module/ext3.h b/instrumentation/events/lttng-module/ext3.h
index de80df9..f1b4aa9 100644
--- a/instrumentation/events/lttng-module/ext3.h
+++ b/instrumentation/events/lttng-module/ext3.h
@@ -6,12 +6,6 @@
 
 #include <linux/tracepoint.h>
 
-#ifndef _TRACE_EXT3_DEF
-#define _TRACE_EXT3_DEF
-static struct dentry *dentry;
-#endif
-
-
 TRACE_EVENT(ext3_free_inode,
 	TP_PROTO(struct inode *inode),
 
@@ -441,12 +435,10 @@ TRACE_EVENT(ext3_sync_file_enter,
 	),
 
 	TP_fast_assign(
-		dentry = file->f_path.dentry;
-
-		tp_assign(dev, dentry->d_inode->i_sb->s_dev)
-		tp_assign(ino, dentry->d_inode->i_ino)
+		tp_assign(dev, file->f_path.dentry->d_inode->i_sb->s_dev)
+		tp_assign(ino, file->f_path.dentry->d_inode->i_ino)
 		tp_assign(datasync, datasync)
-		tp_assign(parent, dentry->d_parent->d_inode->i_ino)
+		tp_assign(parent, file->f_path.dentry->d_parent->d_inode->i_ino)
 	),
 
 	TP_printk("dev %d,%d ino %lu parent %ld datasync %d ",
-- 
1.7.10.4




More information about the lttng-dev mailing list