Skip to contentSkip to conversation

mm, tracing: Print symbol name for kmem_alloc_node call_site events

PATCH Applied Junyong Sun 2 participants 2 messages Jan 2, 2020 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm, tracing: Print symbol name for kmem_alloc_node call_site events

print the call_site ip of kmem_alloc_node using '%pS' to improve the readability of raw slab trace points.

---
 include/trace/events/kmem.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/trace/events/kmem.h +2 -2
index ad7e642b..f65b1f6 100644
@@ -88,8 +88,8 @@ DECLARE_EVENT_CLASS(kmem_alloc_node,
 		__entry->node		= node;
 	),
 
-	TP_printk("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d",
-		__entry->call_site,
+	TP_printk("call_site=%pS ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d",
+		(void *)__entry->call_site,
 		__entry->ptr,
 		__entry->bytes_req,
 		__entry->bytes_alloc,
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · On Thu, 2 Jan 2020 15:19:28 +0800 Junyong Sun <[email protected]> wrote:

print the call_site ip of kmem_alloc_node using '%pS' to improve the readability of raw slab trace points.

-- Steve

Quoted 19 lines
---
 include/trace/events/kmem.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/trace/events/kmem.h +2 -2
index ad7e642b..f65b1f6 100644
@@ -88,8 +88,8 @@ DECLARE_EVENT_CLASS(kmem_alloc_node,
 		__entry->node		= node;
 	),
 
-	TP_printk("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d",
-		__entry->call_site,
+	TP_printk("call_site=%pS ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d",
+		(void *)__entry->call_site,
 		__entry->ptr,
 		__entry->bytes_req,
 		__entry->bytes_alloc,