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: <4A2F1376.7040500@cn.fujitsu.com>
Date:	Wed, 10 Jun 2009 09:59:18 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	Frederic Weisbecker <fweisbec@...il.com>,
	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>,
	Zhaolei <zhaolei@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Jason Baron <jbaron@...hat.com>,
	Jiaying Zhang <jiayingz@...gle.com>
Subject: Re: [RFC PATCH 2/5] tracing/events: nicer print format for parsing

Steven Rostedt wrote:
> On Tue, 9 Jun 2009, Frederic Weisbecker wrote:
>>  
>>> The language that is added by this patch is of the following:
>>>
>>>  * FMT :=  constant string FMT | COMMAND FMT | empty
>>>  * COMMAND := <TYPE:FIELD> | <mask:FIELD:DELIM:MASKS> | <sym:FIELD:SYMBOLS> |
>>>  *               <if:FIELD:TRUE:FALSE>
>>>  * TYPE := int | hex | ptr | string | strarray
>>>  * FIELD := defined by the event structure
>>>  * MASKS := MASK=NAME,MASKS | MASK=NAME
>>>  * MASK := the bit mask to match
>>>  * DELIM := delimiter to separate the fields. None and ':' are both allowed
>>>  * SYMBOLS := SYM=NAME,SYMBOLS | SYM=NAME
>>>  * SYM := the symbol value to test against
>>>  * TRUE := print when field is non zero
>>>  * FALSE := print when field is zero or NULL
>>>  * NAME := the name to write when a match is found
>>>  *
>>>  * A '\<' would print '<'
>>
>> But I wonder if the above new language is not breaking the charm
>> of the TRACE_EVENT(), which charm is that it's easy to implement (hopefully).
>>
>> Everyone knows the printk formats. And I guess this new thing is easy and
>> quick to learn. But because it's a new unknown language, the TRACE_EVENT
>> will become less readable, less reachable for newcomers in TRACE_EVENT.
> 
> I tried to avoid this too, but when I started writing a tool in C that 
> would parse the format file, I found that the printf was horrible.
> 
> Note, I will still keep the TP_printk() macro, that will not change. The 
> new macro is TP_FORMAT() that preforms the tags. Thus, if you really want 
> it to print out, you can use TP_printk, but the user space tools that read 
> the binary will not know how to read it unless the printk is simple.
> 
> I really want to keep this language simple. If anyone has any better 
> ideas, I'm all for it.
> 
> I barfed when I saw this in irq_handler_entry:
> 
>   print fmt: "irq=%d handler=%s", REC->irq, (char *)((void *)REC + REC->__data_loc_name)
> 

I barfed too when I saw this. Introducing a new format is
very meaningful. And this print format looks well.
Good Work!

I'm trying to write user-space tools. Could you tell me your tools'
developing status? And the aim of these tools? Will it be public?

I'm wandering whether I should stop this trying.

Lai.

--
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