diff --git a/include/sys/trace_dbgmsg.h b/include/sys/trace_dbgmsg.h
index 314ddeb19a..22f7fd9868 100644
--- a/include/sys/trace_dbgmsg.h
+++ b/include/sys/trace_dbgmsg.h
@@ -51,19 +51,20 @@ DECLARE_EVENT_CLASS(zfs_dprintf_class,
 	    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) \
@@ -88,19 +89,20 @@ DECLARE_EVENT_CLASS(zfs_set_error_class,
 	    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
diff --git a/include/sys/trace_dbuf.h b/include/sys/trace_dbuf.h
index 49e35e3dcb..aca6d6531f 100644
--- a/include/sys/trace_dbuf.h
+++ b/include/sys/trace_dbuf.h
@@ -42,7 +42,8 @@
  */
 
 #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)			\
@@ -53,8 +54,8 @@
 	__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;	\
@@ -72,7 +73,7 @@
 	"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
diff --git a/include/sys/trace_zrlock.h b/include/sys/trace_zrlock.h
index e1399c468a..356a86a6bb 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",