Re: [RFC] New markers description without format strings

Mathieu Desnoyers <[email protected]>
Newsgroups gmane.linux.kernel.tracing
Message-ID <20070507152300.GA28243@Krystal>
* Frank Ch. Eigler ([email protected]) wrote:
> Hi -
> 
> On Mon, May 07, 2007 at 10:02:24AM -0400, Mathieu Desnoyers wrote:
> > I'll skip the implementation details, but I am considering changing the
> > current marker implementation, which uses format strings, for something
> > that would look like :
> > 
> > trace_mark(subsysname, eventname, mark_types(MARK_CHAR, MARK_ULLONG),
> >            mychar, myull);
> 
> Clever, but it is starting to look too wordy, and if I squint just
> enough, it looks close to the old "decorate the function name with the
> parameter types" technique.
> 

The difference is that I don't have to generate every combination of
function names, which would result in a huge header file.

> > [...] Moreover, this should be more efficient to do a switch() on
> > the enum members than to parse the format string.
> 
> FWIW, systemtap would not need to parse either the string or the type
> tag array at run time (but rather at translate time), so the
> performance difference does not affect it.
> 

As long as systemtap does not use the arguments passed as parameter, I
can understand this, but how does it expect to "know" what parameters a
specific marker receives ?


> - FChE
> 

-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.