From: "H. Peter Anvin" <hpa@zytor.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 0/2] Immediate Values - jump patching update
Date: Mon, 28 Apr 2008 18:08:10 -0700 [thread overview]
Message-ID: <481674FA.4030306@zytor.com> (raw)
In-Reply-To: <20080429004739.GA23281@redhat.com>
Frank Ch. Eigler wrote:
> This would require either that DWARF processing be done far after
> kernel build, and thus the kernel cannot be self-sufficient /
> introspective without user-space assistance (like firmware); or that
> the DWARF data extraction (and systemtap-like $context-variable code
> generation) be part of the kernel build itself. It *might* be
> workable.
DWARF processing done after the kernel build isn't really a problem,
although it requires a large vmlinux(.gz) file to be kept around.
As part of the kernel build is probably better, at least in the case of
static markers.
> At least one complication though is that in the case of markers,
> tracing parameter evaluation is itself conditional (and placed out of
> the hot path due to -freorder-blocks). With your suggested kind of
> assembly ("g" constraints for all the expressions), those expressions
> would be evaluated unconditionally, just to make them live somewhere.
> That unconditional evaluation can easily entail memory reads and
> dependent arithmetic, which could swamp the savings of eliminating the
> marker-style conditional branch.
Well, it depends a bit on what kind of expressions you put in there.
You don't really want to put *expressions* in there as much as you want
to put *data* references in there, although, of course, if your have
something like "foo->bar[baz]->quux" then it's easy to trip upon.
One advantage of using the debugging information in this manner is that
you can write the actual markers long after the kernel has compiled, as
long as the data happens to be available at the call site.
Once again, the *proper* way to do this is with compiler support. That
way we can do patched branches and out-of-line everything with impunity.
-hpa
next prev parent reply other threads:[~2008-04-29 1:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 3:34 [patch 0/2] Immediate Values - jump patching update Mathieu Desnoyers
2008-04-28 3:34 ` [patch 1/2] Immediate Values - jump liveliness Mathieu Desnoyers
2008-04-28 3:34 ` [patch 2/2] Markers - use imv_cond " Mathieu Desnoyers
2008-04-28 12:48 ` [patch 0/2] Immediate Values - jump patching update Ingo Molnar
2008-04-28 14:35 ` Mathieu Desnoyers
2008-04-28 17:21 ` H. Peter Anvin
2008-04-28 20:25 ` Ingo Molnar
2008-04-28 21:03 ` H. Peter Anvin
2008-04-28 22:11 ` Ingo Molnar
2008-04-28 22:25 ` H. Peter Anvin
2008-04-28 22:44 ` Ingo Molnar
2008-04-28 23:06 ` H. Peter Anvin
2008-04-29 0:47 ` Frank Ch. Eigler
2008-04-29 1:08 ` H. Peter Anvin [this message]
2008-04-29 12:08 ` Ingo Molnar
2008-05-14 14:53 ` Pavel Machek
2008-04-29 1:46 ` Mathieu Desnoyers
2008-04-29 2:07 ` H. Peter Anvin
2008-04-29 12:18 ` Mathieu Desnoyers
2008-04-29 15:35 ` H. Peter Anvin
2008-05-04 14:54 ` Mathieu Desnoyers
2008-05-04 21:05 ` H. Peter Anvin
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=481674FA.4030306@zytor.com \
--to=hpa@zytor.com \
--cc=akpm@linux-foundation.org \
--cc=fche@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.