lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090609222217.GE6057@nowhere>
Date:	Wed, 10 Jun 2009 00:22:19 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Minchan Kim <minchan.kim@...il.com>,
	Mel Gorman <mel@....ul.ie>,
	Christoph Hellwig <hch@...radead.org>,
	Rik van Riel <riel@...hat.com>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Peter Zijlstra <peterz@...radead.org>,
	Theodore Tso <tytso@....edu>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Zhaolei <zhaolei@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Jason Baron <jbaron@...hat.com>,
	Jiaying Zhang <jiayingz@...gle.com>,
	Tom Zanussi <tzanussi@...il.com>
Subject: Re: [PATCH 4/8] tracing/events: modify irq print to new format

On Tue, Jun 09, 2009 at 05:52:15PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <srostedt@...hat.com>
> 
> Use new format for better parsing of irq events.
> 
> Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
> ---
>  include/trace/events/irq.h |   38 +++++++++++++++++++-------------------
>  1 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
> index b0c7ede..c6c0ff1 100644
> --- a/include/trace/events/irq.h
> +++ b/include/trace/events/irq.h
> @@ -7,18 +7,19 @@
>  #undef TRACE_SYSTEM
>  #define TRACE_SYSTEM irq
>  
> -#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
> -#define show_softirq_name(val)			\
> -	__print_symbolic(val,			\
> -			 softirq_name(HI),	\
> -			 softirq_name(TIMER),	\
> -			 softirq_name(NET_TX),	\
> -			 softirq_name(NET_RX),	\
> -			 softirq_name(BLOCK),	\
> -			 softirq_name(TASKLET),	\
> -			 softirq_name(SCHED),	\
> -			 softirq_name(HRTIMER),	\
> -			 softirq_name(RCU))
> +#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>"
> +#define show_softirq_name_args()					\
> +		softirq_name(HI),					\
> +		softirq_name(TIMER),					\
> +		softirq_name(NET_TX),					\
> +		softirq_name(NET_RX),					\
> +		softirq_name(BLOCK),					\
> +		softirq_name(TASKLET),					\
> +		softirq_name(SCHED),					\
> +		softirq_name(HRTIMER),					\
> +		softirq_name(RCU)
>  
>  /**
>   * irq_handler_entry - called immediately before the irq action handler
> @@ -47,7 +48,7 @@ TRACE_EVENT(irq_handler_entry,
>  		__assign_str(name, action->name);
>  	),
>  
> -	TP_printk("irq=%d handler=%s", __entry->irq, __get_str(name))
> +	TP_FORMAT("irq=<int:irq> handler=<string:name>")
>  );
>  
>  /**
> @@ -77,8 +78,7 @@ TRACE_EVENT(irq_handler_exit,
>  		__entry->ret	= ret;
>  	),
>  
> -	TP_printk("irq=%d return=%s",
> -		  __entry->irq, __entry->ret ? "handled" : "unhandled")
> +	TP_FORMAT("irq=<int:irq> return=<if:ret:handled:unhandled>")
>  );
>  
>  /**
> @@ -106,8 +106,8 @@ TRACE_EVENT(softirq_entry,
>  		__entry->vec = (int)(h - vec);
>  	),
>  
> -	TP_printk("softirq=%d action=%s", __entry->vec,
> -		  show_softirq_name(__entry->vec))
> +	TP_FORMAT("softirq=<int:vec> action=<sym:vec:" show_softirq_name_format(),


Just to zap the confusion, I would suggest to explicitly close the '>' here instead
of inside the macro. The current state suggests a kind of imbalance at a first glance.


> +		  show_softirq_name_args())
>  );
>  
>  /**
> @@ -135,8 +135,8 @@ TRACE_EVENT(softirq_exit,
>  		__entry->vec = (int)(h - vec);
>  	),
>  
> -	TP_printk("softirq=%d action=%s", __entry->vec,
> -		  show_softirq_name(__entry->vec))
> +	TP_FORMAT("softirq=<int:vec> action=<sym:vec:" show_softirq_name_format(),


And ditto.

Frederic.



> +		  show_softirq_name_args())
>  );
>  
>  #endif /*  _TRACE_IRQ_H */
> -- 
> 1.6.3.1
> 
> -- 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ