- TP_printk("%s call_site=%pf refcnt=%d",
- __get_str(name), (void *)__entry->ip, __entry->refcnt)
+ TP_FIELDS(
+ ctf_integer(unsigned long, ip, ip)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
+ ctf_integer(int, refcnt, atomic_read(&mod->refcnt))
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ ctf_integer(int, refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs))
+#else
+ ctf_integer(int, refcnt, refcnt)
+#endif
+ ctf_string(name, mod->name)
+ )