lkml.org 
[lkml]   [2009]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 11/11] tracing: move > to out of macros and into print statement
From: Steven Rostedt <srostedt@redhat.com>

Frederic Weisbecker stated that it is confusing to see a unmatched
'<', when the '>' is hidden inside a macro. This patch moves it out
back to the string.

Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/trace/events/irq.h | 8 +++++---
include/trace/events/kmem.h | 12 +++++++-----
2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
index c6c0ff1..4294a6d 100644
--- a/include/trace/events/irq.h
+++ b/include/trace/events/irq.h
@@ -9,7 +9,7 @@

#define softirq_name(sirq) sirq##_SOFTIRQ, #sirq
#define show_softirq_name_format(val) \
- "%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s>"
+ "%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s,%d=%s"
#define show_softirq_name_args() \
softirq_name(HI), \
softirq_name(TIMER), \
@@ -106,7 +106,8 @@ TRACE_EVENT(softirq_entry,
__entry->vec = (int)(h - vec);
),

- TP_FORMAT("softirq=<int:vec> action=<sym:vec:" show_softirq_name_format(),
+ TP_FORMAT("softirq=<int:vec> action=<sym:vec:"
+ show_softirq_name_format() ">",
show_softirq_name_args())
);

@@ -135,7 +136,8 @@ TRACE_EVENT(softirq_exit,
__entry->vec = (int)(h - vec);
),

- TP_FORMAT("softirq=<int:vec> action=<sym:vec:" show_softirq_name_format(),
+ TP_FORMAT("softirq=<int:vec> action=<sym:vec:"
+ show_softirq_name_format() ">",
show_softirq_name_args())
);

diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
index 5c8f942..32c93da 100644
--- a/include/trace/events/kmem.h
+++ b/include/trace/events/kmem.h
@@ -22,7 +22,7 @@
"0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s," \
"0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s," \
"0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s,0x%lx=%s," \
- "0x%lx=%s,0x%lx=%s>"
+ "0x%lx=%s,0x%lx=%s"
#define show_gfp_flags_args() \
(unsigned long)GFP_HIGHUSER_MOVABLE, "GFP_HIGHUSER_MOVABLE", \
(unsigned long)GFP_HIGHUSER, "GFP_HIGHUSER", \
@@ -76,7 +76,7 @@ TRACE_EVENT(kmalloc,

TP_FORMAT("call_site=<hex:call_site> ptr=<ptr:ptr> bytes_req=<int:bytes_req> "
"bytes_alloc=<int:bytes_alloc> gfp_flags=<mask:gfp_flags:|:"
- show_gfp_flags_format(), show_gfp_flags_args())
+ show_gfp_flags_format() ">", show_gfp_flags_args())
);

TRACE_EVENT(kmem_cache_alloc,
@@ -107,7 +107,7 @@ TRACE_EVENT(kmem_cache_alloc,

TP_FORMAT("call_site=<hex:call_site> ptr=<ptr:ptr> bytes_req=<int:bytes_req> "
"bytes_alloc=<int:bytes_alloc> gfp_flags=<mask:gfp_flags:|:"
- show_gfp_flags_format(), show_gfp_flags_args())
+ show_gfp_flags_format() ">", show_gfp_flags_args())
);

TRACE_EVENT(kmalloc_node,
@@ -141,7 +141,8 @@ TRACE_EVENT(kmalloc_node,

TP_FORMAT("call_site=<hex:call_site> ptr=<ptr:ptr> bytes_req=<int:bytes_req> "
"bytes_alloc=<int:bytes_alloc> gfp_flags=<mask:gfp_flags:|:"
- show_gfp_flags_format() " node=<int:node>", show_gfp_flags_args())
+ show_gfp_flags_format() "> node=<int:node>",
+ show_gfp_flags_args())
);

TRACE_EVENT(kmem_cache_alloc_node,
@@ -175,7 +176,8 @@ TRACE_EVENT(kmem_cache_alloc_node,

TP_FORMAT("call_site=<hex:call_site> ptr=<ptr:ptr> bytes_req=<int:bytes_req> "
"bytes_alloc=<int:bytes_alloc> gfp_flags=<mask:gfp_flags:|:"
- show_gfp_flags_format() " node=<int:node>", show_gfp_flags_args())
+ show_gfp_flags_format() "> node=<int:node>",
+ show_gfp_flags_args())
);

TRACE_EVENT(kfree,
--
1.6.3.1
--


\
 
 \ /
  Last update: 2009-06-10 07:51    [W:0.109 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site