This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC][Patch 2/2] markers: example of irq regular kernel markers
- From: KOSAKI Motohiro <kosaki dot motohiro at jp dot fujitsu dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: kosaki dot motohiro at jp dot fujitsu dot com, Mathieu Desnoyers <mathieu dot desnoyers at polymtl dot ca>, Peter Zijlstra <peterz at infradead dot org>, Steven Rostedt <rostedt at goodmis dot org>, "Frank Ch. Eigler" <fche at redhat dot com>, Ingo Molnar <mingo at elte dot hu>, LKML <linux-kernel at vger dot kernel dot org>, systemtap-ml <systemtap at sources dot redhat dot com>, Hideo AOKI <haoki at redhat dot com>
- Date: Sat, 21 Jun 2008 19:12:59 +0900
- Subject: Re: [RFC][Patch 2/2] markers: example of irq regular kernel markers
- References: <20080620174529.GB10943@Krystal> <485C064E.5020705@redhat.com>
Hi!
> > By doing so, we could leave a gcc format string check by passing the
> > format string to __mark_check_format(). We could extract the field names
> > from the prototype, so there is no need to duplicate field information
> > in the format string.
>
> I thought that someone complained against those format strings in
> kernel code. Thus I removed it from DEFINE_TRACE.
>
> even though, I think you can do that by adding below string table
> to LTTng module.
>
> const char *lookup_table[MAX_MARKERS][2] = {
> {"irq_entry", "%d %d"}, // or "(int irq_id, int kernel_mode)", "%d %d"
> ...
> };
if move string to out of kernel core, compiler may kill some variable.
thus, we will get incomplete tracing result.
I think your proposal is very interesting.
but I dont understand why someone dislike format strings.
Could you explain this reason?