linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolinux.com>
To: "Collins, Tom" <Tom.Collins@surgient.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Dynamically altering code segments
Date: Tue, 27 Feb 2001 10:05:37 -0700 (MST)	[thread overview]
Message-ID: <200102271705.f1RH5bB27105@webber.adilger.net> (raw)
In-Reply-To: <A490B2C9C629944E85CE1F394138AF957FC3E1@bignorse.SURGIENT.COM> from "Collins, Tom" at "Feb 27, 2001 10:43:02 am"

Tom Collins writes:
> 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.
> 
> Is it possible to do the same thing in Linux?

See IBM "dprobes" project.  It is basically what you are describing
(AFAIK).  It makes sense, because a lot of the OS/2 folks are now working
on Linux.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

  reply	other threads:[~2001-02-27 17:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-27 16:43 Dynamically altering code segments Collins, Tom
2001-02-27 17:05 ` Andreas Dilger [this message]
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=200102271705.f1RH5bB27105@webber.adilger.net \
    --to=adilger@turbolinux.com \
    --cc=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).