From: "Frank Ch. Eigler" <fche@redhat.com>
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: Martin Bligh <mbligh@google.com>,
"Frank Ch. Eigler" <fche@redhat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
prasanna@in.ibm.com, Andrew Morton <akpm@osdl.org>,
Ingo Molnar <mingo@elte.hu>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
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>
Subject: Re: [PATCH] Linux Kernel Markers 0.5 for Linux 2.6.17 (with probe management)
Date: Thu, 21 Sep 2006 13:56:48 -0400 [thread overview]
Message-ID: <20060921175648.GB22226@redhat.com> (raw)
In-Reply-To: <20060921160009.GA30115@Krystal>
[-- Attachment #1: Type: text/plain, Size: 3079 bytes --]
Hi -
> Yet, again, a new version. I integrated a full probe management
> mechanism. [...]
Thank you for continuing on.
> +#define MARK_SYM(name) \
> + here: asm volatile \
> + (MARK_KPROBE_PREFIX#name " = %0" : : "m" (*&&here)); \
Regarding MARK_SYM, if I read Ingo's message correctly, this is the
only type of marker he believes is necessary, since it would put a
place for kprobes to put a breakpoint. FWIW, this still appears to be
applicable only if the int3 overheads are tolerable, and if parameter
data extraction is unnecessary or sufficiently robust "by accident".
Regarding:
> +#define MARK_JUMP(name, format, args...) \
> [...]
All this leap/jump/branch elaboration may be based upon scanty
benchmarks. The plain conditional-indirect function call is already
"fast", especially if its hosting compilation unit is compiled with
-freorder-blocks.
Direct jumps to instrumentation are unlikely to be of a great deal of
use, in that there would have to be some assembly-level code in
between to save/restore affected registers. Remember, ultimately the
handler will be written in C.
Regarding use of an empty_function() sentinel instead of NULLs, it is
worth measuring carefully whether a unconditional indirect call to
such a dummy function is faster than a conditional indirect call. It
may have to be a per-architecture internal implementation option.
Regarding varargs, I still believe that varargs have poorer
type-safety. Remember, it's not just type-safety at the marker site
(which gcc's printf-format-checker could validate), but the handler's
too. I believe it is incorrect that a non-varargs function can always
safely take a call from a varargs call - varargs changes the calling
conventions. This would mean that the handler would itself have to be
varargs, with all the attendant run-time overheads. (Plus the idea of
using a build-time script to generate the non-verargs handlers from
analyzing particular MARK() calls is itself probably a bit complex for
its own good.)
Regarding measurements in general, one must avoid being misled by
microbenchmarks such as those that represent an extreme of caching
friendliness. It may be necessary to run large system-level tests to
meaningfully compare alternatives.
> +int marker_set_probe(const char *name, void (*probe)(const char *fmt, ...),
> + enum marker_type type);
> +void marker_disable_probe(const char *name, void (*probe)(const char *fmt, ...),
> + enum marker_type type);
I'm unclear about what a merker_type value represents. Could you go
over that again?
> +static int marker_get_pointers(const char *name,
> + [...]
> + ptrs->call = (void**)kallsyms_lookup_name(call_sym);
> + ptrs->jmpselect = (void**)kallsyms_lookup_name(jmpselect_sym);
> + ptrs->jmpcall = (void**)kallsyms_lookup_name(jmpcall_sym);
> + ptrs->jmpinline = (void**)kallsyms_lookup_name(jmpinline_sym);
> + ptrs->jmpover = (void**)kallsyms_lookup_name(jmpover_sym);
> [...]
I wonder whether, as for kprobes, it will be necessary to lock into
memory a module containing an active marker.
- FChE
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-09-21 17:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-21 16:00 [PATCH] Linux Kernel Markers 0.5 for Linux 2.6.17 (with probe management) Mathieu Desnoyers
2006-09-21 16:06 ` Ingo Molnar
2006-09-21 21:42 ` Mathieu Desnoyers
2006-09-21 21:49 ` Mathieu Desnoyers
2006-09-22 6:29 ` Karim Yaghmour
2006-09-22 6:49 ` Ingo Molnar
2006-09-22 14:03 ` Mathieu Desnoyers
2006-09-22 16:53 ` Ingo Molnar
2006-09-22 17:11 ` Mathieu Desnoyers
2006-09-22 17:12 ` Ingo Molnar
2006-09-22 17:28 ` Mathieu Desnoyers
2006-09-22 7:07 ` Ingo Molnar
2006-09-22 8:14 ` Karim Yaghmour
2006-09-22 15:08 ` Mathieu Desnoyers
2006-09-22 16:24 ` Karim Yaghmour
2006-09-22 16:13 ` Mathieu Desnoyers
2006-09-22 17:03 ` Karim Yaghmour
2006-09-22 18:06 ` Mathieu Desnoyers
2006-09-22 19:24 ` Karim Yaghmour
2006-09-22 16:45 ` Ingo Molnar
2006-09-22 14:31 ` Christoph Hellwig
2006-09-23 16:51 ` Mathieu Desnoyers
2006-09-21 17:56 ` Frank Ch. Eigler [this message]
2006-09-21 18:50 ` Ingo Molnar
2006-09-21 19:54 ` Jeremy Fitzhardinge
2006-09-25 17:45 ` Frank Ch. Eigler
2006-09-21 20:59 ` 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=20060921175648.GB22226@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=jes@sgi.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltt-dev@shafik.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mbligh@google.com \
--cc=michel.dagenais@polymtl.ca \
--cc=mingo@elte.hu \
--cc=prasanna@in.ibm.com \
--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