- TP_STRUCT__entry(
- __field( dev_t, dev )
- __field( ino_t, ino )
- __field( long, nr_to_write )
- __field( long, pages_skipped )
- __field( loff_t, range_start )
- __field( loff_t, range_end )
- __field( pgoff_t, writeback_index )
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- __field( int, sync_mode )
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
- __field( char, nonblocking )
-#endif
- __field( char, for_kupdate )
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
- __field( char, for_reclaim )
-#endif
- __field( char, range_cyclic )
- ),
-
- TP_fast_assign(
- tp_assign(dev, inode->i_sb->s_dev)
- tp_assign(ino, inode->i_ino)
- tp_assign(nr_to_write, wbc->nr_to_write)
- tp_assign(pages_skipped, wbc->pages_skipped)
- tp_assign(range_start, wbc->range_start)
- tp_assign(range_end, wbc->range_end)
- tp_assign(writeback_index, inode->i_mapping->writeback_index)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- tp_assign(sync_mode, wbc->sync_mode)
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
- tp_assign(nonblocking, wbc->nonblocking)
-#endif
- tp_assign(for_kupdate, wbc->for_kupdate)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
- tp_assign(for_reclaim, wbc->for_reclaim)
-#endif
- tp_assign(range_cyclic, wbc->range_cyclic)
- ),
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
- "range_start %lld range_end %lld sync_mode %d "
- "for_kupdate %d range_cyclic %d writeback_index %lu",
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
- TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
- "range_start %llu range_end %llu "
- "for_kupdate %d for_reclaim %d "
- "range_cyclic %d writeback_index %lu",
-#else
- TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
- "range_start %llu range_end %llu "
- "nonblocking %d for_kupdate %d for_reclaim %d "
- "range_cyclic %d writeback_index %lu",
-#endif
- MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->nr_to_write,
- __entry->pages_skipped, __entry->range_start,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
- __entry->range_end, __entry->sync_mode,
- __entry->for_kupdate, __entry->range_cyclic,
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
- __entry->range_end,
- __entry->for_kupdate, __entry->for_reclaim,
- __entry->range_cyclic,
-#else
- __entry->range_end, __entry->nonblocking,
- __entry->for_kupdate, __entry->for_reclaim,
- __entry->range_cyclic,
-#endif
- (unsigned long) __entry->writeback_index)
+ TP_FIELDS(
+ ctf_integer(dev_t, dev, inode->i_sb->s_dev)
+ ctf_integer(ino_t, ino, inode->i_ino)
+ ctf_integer(long, nr_to_write, wbc->nr_to_write)
+ ctf_integer(long, pages_skipped, wbc->pages_skipped)
+ ctf_integer(loff_t, range_start, wbc->range_start)
+ ctf_integer(loff_t, range_end, wbc->range_end)
+ ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index)
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(2,6,39))
+ ctf_integer(int, sync_mode, wbc->sync_mode)
+#endif
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,37))
+ ctf_integer(char, nonblocking, wbc->nonblocking)
+#endif
+ ctf_integer(char, for_kupdate, wbc->for_kupdate)
+#if (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(2,6,39))
+ ctf_integer(char, for_reclaim, wbc->for_reclaim)
+#endif
+ ctf_integer(char, range_cyclic, wbc->range_cyclic)
+ )