linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Collins, Tom" <Tom.Collins@Surgient.com>
To: linux-kernel@vger.kernel.org
Subject: Dynamically altering code segments
Date: Tue, 27 Feb 2001 10:43:02 -0600	[thread overview]
Message-ID: <A490B2C9C629944E85CE1F394138AF957FC3E1@bignorse.SURGIENT.COM> (raw)

Hi...

This is my first post, so if this is off topic for this list, please direct
me
to another one that is more appropriate.  Thanks

That said, I am wanting to dynamically modify the kernel in specific places
to
implement a custom kernel trace mechanism.  The general idea is that, when
the
"trace" is off, there are NOP instruction sequences at various places in the
kernel.  When the "trace" is turned on, those same NOPs are replaced by JMPs
to code that implements the trace (such as logging events, using the MSR and
PMC's etc..).

This was a trick that was done in my old days of OS/2 performance tools 
developement to get trace information from the running kernel.  In that
case, 
we simply remapped the appropriate code segments to data segments (I think
back then it was called 'aliasing code segments') and used that segment to 
make changes to the kernel code on the fly.

Is it possible to do the same thing in Linux?

Thanks

Tom



             reply	other threads:[~2001-02-27 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-27 16:43 Collins, Tom [this message]
2001-02-27 17:05 ` Dynamically altering code segments Andreas Dilger
2001-02-27 18:15 richardj_moore
2001-02-27 19:04 Collins, Tom
2001-02-28  1:22 ` Karim Yaghmour
2001-03-01  2:58 Jeremy Jackson

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=A490B2C9C629944E85CE1F394138AF957FC3E1@bignorse.SURGIENT.COM \
    --to=tom.collins@surgient.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).