1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #undef TRACE_SYSTEM 3 #define TRACE_SYSTEM namei 4 5 #if !defined(_TRACE_INODEPATH_H) || defined(TRACE_HEADER_MULTI_READ) 6 #define _TRACE_INODEPATH_H 7 8 #include <linux/types.h> 9 #include <linux/tracepoint.h> 10 #include <linux/mm.h> 11 #include <linux/memcontrol.h> 12 #include <linux/device.h> 13 #include <linux/kdev_t.h> 14 15 TRACE_EVENT(inodepath, 16 TP_PROTO(struct inode *inode, char *path), 17 18 TP_ARGS(inode, path), 19 20 TP_STRUCT__entry( 21 /* dev_t and ino_t are arch dependent bit width 22 * so just use 64-bit 23 */ 24 __field(unsigned long, ino) 25 __field(unsigned long, dev) 26 __string(path, path) 27 ), 28 29 TP_fast_assign( 30 __entry->ino = inode->i_ino; 31 __entry->dev = inode->i_sb->s_dev; 32 __assign_str(path, path); 33 ), 34 35 TP_printk("dev %d:%d ino=%lu path=%s", 36 MAJOR(__entry->dev), MINOR(__entry->dev), 37 __entry->ino, __get_str(path)) 38 ); 39 #endif /* _TRACE_INODEPATH_H */ 40 41 /* This part must be outside protection */ 42 #include <trace/define_trace.h> 43