const char *msg),
TP_ARGS(file, function, line, msg),
TP_STRUCT__entry(
- __field(const char *, file)
- __field(const char *, function)
+ __string(file, file)
+ __string(function, function)
__field(int, line)
__string(msg, msg)
),
TP_fast_assign(
- __entry->file = file;
- __entry->function = function;
+ __assign_str(file, strchr(file, '/') ?
+ strrchr(file, '/') + 1 : file)
+ __assign_str(function, function);
__entry->line = line;
__assign_str(msg, msg);
),
- TP_printk("%s:%d:%s(): %s", __entry->file, __entry->line,
- __entry->function, __get_str(msg))
+ TP_printk("%s:%d:%s(): %s", __get_str(file), __entry->line,
+ __get_str(function), __get_str(msg))
);
#define DEFINE_DPRINTF_EVENT(name) \
uintptr_t error),
TP_ARGS(file, function, line, error),
TP_STRUCT__entry(
- __field(const char *, file)
- __field(const char *, function)
+ __string(file, file)
+ __string(function, function)
__field(int, line)
__field(uintptr_t, error)
),
TP_fast_assign(
- __entry->file = strchr(file, '/') ? strrchr(file, '/') + 1 : file;
- __entry->function = function;
+ __assign_str(file, strchr(file, '/') ?
+ strrchr(file, '/') + 1 : file)
+ __assign_str(function, function);
__entry->line = line;
__entry->error = error;
),
- TP_printk("%s:%d:%s(): error 0x%lx", __entry->file, __entry->line,
- __entry->function, __entry->error)
+ TP_printk("%s:%d:%s(): error 0x%lx", __get_str(file), __entry->line,
+ __get_str(function), __entry->error)
);
#ifdef TP_CONDITION
*/
#define DBUF_TP_STRUCT_ENTRY \
- __field(const char *, os_spa) \
+ __string(os_spa, \
+ spa_name(DB_DNODE(db)->dn_objset->os_spa)) \
__field(uint64_t, ds_object) \
__field(uint64_t, db_object) \
__field(uint64_t, db_level) \
__field(int64_t, db_holds) \
#define DBUF_TP_FAST_ASSIGN \
- __entry->os_spa = \
- spa_name(DB_DNODE(db)->dn_objset->os_spa); \
+ __assign_str(os_spa, \
+ spa_name(DB_DNODE(db)->dn_objset->os_spa)); \
\
__entry->ds_object = db->db_objset->os_dsl_dataset ? \
db->db_objset->os_dsl_dataset->ds_object : 0; \
"blkid %llu offset %llu size %llu state %llu holds %lld }"
#define DBUF_TP_PRINTK_ARGS \
- __entry->os_spa, __entry->ds_object, \
+ __get_str(os_spa), __entry->ds_object, \
__entry->db_object, __entry->db_level, \
__entry->db_blkid, __entry->db_offset, \
__entry->db_size, __entry->db_state, __entry->db_holds
__field(int32_t, refcount)
#ifdef ZFS_DEBUG
__field(pid_t, owner_pid)
- __field(const char *, caller)
+ __string(caller, zrl->zr_caller)
#endif
__field(uint32_t, n)
),
__entry->refcount = zrl->zr_refcount;
#ifdef ZFS_DEBUG
__entry->owner_pid = zrl->zr_owner ? zrl->zr_owner->pid : 0;
- __entry->caller = zrl->zr_caller;
+ __assign_str(caller, zrl->zr_caller);
#endif
__entry->n = n;
),
#ifdef ZFS_DEBUG
TP_printk("zrl { refcount %d owner_pid %d caller %s } n %u",
- __entry->refcount, __entry->owner_pid, __entry->caller,
+ __entry->refcount, __entry->owner_pid, __get_str(caller),
__entry->n)
#else
TP_printk("zrl { refcount %d } n %u",