diff options
author | Richard Yao <[email protected]> | 2016-01-12 21:01:14 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-01-15 15:38:35 -0800 |
commit | 546f38433a870a2cf9907c6c61daad22a289fe39 (patch) | |
tree | 0b8ab4b63aa9e66ae930eddaba2801bae50f0247 /include/sys/trace_zrlock.h | |
parent | b10695c8f1ce317cd24d99af7998741a35a5ce48 (diff) |
SET_ERROR should print strings
When debugging with tracepoints, we see string pointers:
zfs 3017 [006] 8878.728915: zfs:zfs_set__error: ffffffffa0eec3fc:3013:ffffffffa0ebcd60(): error 0x2
ffffffffa0e1ca43 spa_open_common (/lib/modules/3.12.21-gentoo-r1/extra/zfs/zfs.ko)
ffffffffa0e1cbe3 spa_open (/lib/modules/3.12.21-gentoo-r1/extra/zfs/zfs.ko)
ffffffffa0e6f6ef zfs_ioc_stable (/lib/modules/3.12.21-gentoo-r1/extra/zfs/zfs.ko)
ffffffffa0e6f2a9 zfsdev_ioctl (/lib/modules/3.12.21-gentoo-r1/extra/zfs/zfs.ko)
ffffffff811909dd do_vfs_ioctl ([kernel.kallsyms])
ffffffff81190c41 sys_ioctl ([kernel.kallsyms])
ffffffff8156e2e9 system_call_fastpath ([kernel.kallsyms])
7ff7d8be69c7 __GI___ioctl (/lib64/libc-2.19.so)
7ff7d90cac53 lzc_ioctl.constprop.3 (/lib64/libzfs_core.so.1.0.0)
636f695f637a6c00 [unknown] ([unknown])
Printing the actual strings is more convenient:
zfs 3461 [001] 10599.847692: zfs:zfs_set__error: spa.c:3013:spa_open_common(): error 0x2
ffffffffa116ba43 spa_open_common (/lib/modules/3.12.21-gentoo-r1/extra/zfs/zfs.ko)
ffffffffa116bbe3 spa_open (/lib/modules/3.12.21-gentoo-r1/extra/zfs/zfs.ko)
ffffffffa11be8df zfs_ioc_stable (/lib/modules/3.12.21-gentoo-r1/extra/zfs/zfs.ko)
ffffffffa11be499 zfsdev_ioctl (/lib/modules/3.12.21-gentoo-r1/extra/zfs/zfs.ko)
ffffffff811909dd do_vfs_ioctl ([kernel.kallsyms])
ffffffff81190c41 sys_ioctl ([kernel.kallsyms])
ffffffff8156e2e9 system_call_fastpath ([kernel.kallsyms])
7f11b843c9c7 __GI___ioctl (/lib64/libc-2.19.so)
7f11b8920c53 lzc_ioctl.constprop.3 (/lib64/libzfs_core.so.1.0.0)
636f695f637a6c00 [unknown] ([unknown])
A few other tracepoints have strings as well, so switch to printing
the actual string values at the same time.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4212
Diffstat (limited to 'include/sys/trace_zrlock.h')
-rw-r--r-- | include/sys/trace_zrlock.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sys/trace_zrlock.h b/include/sys/trace_zrlock.h index e1399c468..356a86a6b 100644 --- a/include/sys/trace_zrlock.h +++ b/include/sys/trace_zrlock.h @@ -48,7 +48,7 @@ DECLARE_EVENT_CLASS(zfs_zrlock_class, __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) ), @@ -56,13 +56,13 @@ DECLARE_EVENT_CLASS(zfs_zrlock_class, __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", |