From: fche@redhat.com (Frank Ch. Eigler)
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: Martin Bligh <mbligh@google.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
prasanna@in.ibm.com, Andrew Morton <akpm@osdl.org>,
Ingo Molnar <mingo@elte.hu>, Paul Mundt <lethal@linux-sh.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Jes Sorensen <jes@sgi.com>, Tom Zanussi <zanussi@us.ibm.com>,
Richard J Moore <richardj_moore@uk.ibm.com>,
Michel Dagenais <michel.dagenais@polymtl.ca>,
Christoph Hellwig <hch@infradead.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
Thomas Gleixner <tglx@linutronix.de>,
William Cohen <wcohen@redhat.com>,
ltt-dev@shafik.org, systemtap@sources.redhat.com,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Karim Yaghmour <karim@opersys.com>, Pavel Machek <pavel@suse.cz>,
Joe Perches <joe@perches.com>,
"Randy.Dunlap" <rdunlap@xenotime.net>,
"Jose R. Santos" <jrs@us.ibm.com>
Subject: Re: [PATCH] Linux Kernel Markers 0.11 for 2.6.17
Date: 27 Sep 2006 12:12:09 -0400 [thread overview]
Message-ID: <y0m8xk5e1ba.fsf@ton.toronto.redhat.com> (raw)
In-Reply-To: <20060927013020.GA5171@Krystal>
Hi -
Mathieu Desnoyers <compudj@krystal.dyndns.org> writes:
> [...]
> > That involves new conventions beyond printf. Why not "%p %p %u %u"
> > for two blobs ... or why implicitly dereference the given pointers. A
> > probe handler unaware of a specific marker's semantics would not know
> > whether or not this is implied.
>
> [...]
> So yes, there is a semantic to create, but I don't see the problem with that.
That's a part of my point. The marker data types marked up with
printf directives do not fully describe the data - in this case
whether it is a raw pointer or a data blob that is being marked.
> And why would the probe actually know what to do with a pointer ? If
> it only wants to record the pointer's address or if it wants to
> access data inside this pointer, it's up to the probe (or automatic
> probe generator, hum ?) to do it.
Of course, but that precludes a general client tool, such as (say) a
trace-only handler.
> > > I think that duplicating the number of marker macros could easily make
> > > them unflexible and ugly. [...]
> >
> > Inflexible and ugly in what way? [...]
>
> I don't expect the kernel programmer community to accept that their code will
> call an automatically generated macro. It removes all the idea of "I can see
> what code is actually generated by my function", which I believe is necessary.
Not at all - the generated macros can sit in-tree and are easily
inspected. Check out gen-stapmark.h and stapmark.h at
<http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/?cvsroot=systemtap>.
> Also, people are used to the simplicity and flexibility of printf
> style format strings.
True, but is this in context of the existing tracing/probing
facilities? Unless I'm mistaken, ltt functions doesn't use them; nor
does blktrace. Other than printk, are there any?
> Do you really expect people to start using various macros like
> MARK_u_p_llu
I don't know. Using gcc extensions such as __builtin_typeof() could
automate the typing aspect, leaving only the arity as a
programmer-visible text.
> and start defining their own marker macro each time they want to add
> a specific type ?
Well, adding a new type would be at last as hard in the printf case.
> [...] However, if you want to create probes that are type-safe, you
> can then create a script that will extract all the format strings in
> the markers section of the object and automatically generate all the
> probes with their respective va_args setup at the beginning of the
> probe. [...]
This could work. OTOH this relies on an as-yet-unwritten script, and
additional run-time costs (the parameter-by-parameter va_arg copying).
I wonder if writing a functional back-end for these markers should be
considered a corequisite for this work; or in the alternative, whether
it's good enough to start putting markers into the code, and revamp
their implementation later if necessary.
- FChE
next prev parent reply other threads:[~2006-09-27 16:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 15:10 [PATCH] Linux Kernel Markers 0.11 for 2.6.17 Mathieu Desnoyers
2006-09-25 16:01 ` Frank Ch. Eigler
2006-09-25 23:28 ` Mathieu Desnoyers
2006-09-26 16:39 ` Frank Ch. Eigler
2006-09-27 1:30 ` Mathieu Desnoyers
2006-09-27 16:12 ` Frank Ch. Eigler [this message]
2006-09-25 18:16 ` Jeremy Fitzhardinge
2006-09-25 20:10 ` Mathieu Desnoyers
2006-09-25 20:25 ` Jeremy Fitzhardinge
2006-09-25 20:35 ` Mathieu Desnoyers
2006-09-25 20:47 ` Mathieu Desnoyers
2006-09-25 21:22 ` Jeremy Fitzhardinge
2006-09-25 21:32 ` Mathieu Desnoyers
2006-09-25 21:35 ` Jeremy Fitzhardinge
2006-09-25 23:13 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=y0m8xk5e1ba.fsf@ton.toronto.redhat.com \
--to=fche@redhat.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=compudj@krystal.dyndns.org \
--cc=gregkh@suse.de \
--cc=hch@infradead.org \
--cc=jeremy@goop.org \
--cc=jes@sgi.com \
--cc=joe@perches.com \
--cc=jrs@us.ibm.com \
--cc=karim@opersys.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltt-dev@shafik.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mbligh@google.com \
--cc=michel.dagenais@polymtl.ca \
--cc=mingo@elte.hu \
--cc=pavel@suse.cz \
--cc=prasanna@in.ibm.com \
--cc=rdunlap@xenotime.net \
--cc=richardj_moore@uk.ibm.com \
--cc=systemtap@sources.redhat.com \
--cc=tglx@linutronix.de \
--cc=wcohen@redhat.com \
--cc=zanussi@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox