- TP_STRUCT__entry(
- __field( u64, type )
- __field( u64, state )
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- __field( u64, cpu_id )
-#endif
- ),
-
- TP_fast_assign(
- tp_assign(type, type)
- tp_assign(state, state)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- tp_assign(cpu_id, cpu_id)
-#endif
- ),
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
- TP_printk("type=%lu state=%lu cpu_id=%lu", (unsigned long)__entry->type,
- (unsigned long)__entry->state, (unsigned long)__entry->cpu_id)
-#else
- TP_printk("type=%lu state=%lu", (unsigned long)__entry->type,
- (unsigned long)__entry->state)
-#endif
+ TP_FIELDS(
+ ctf_integer(u64, type, type)
+ ctf_integer(u64, state, state)
+ ctf_integer(u64, cpu_id, cpu_id)
+ )