Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 27 Feb 2001 12:06:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 27 Feb 2001 12:06:00 -0500 Received: from h24-65-192-120.cg.shawcable.net ([24.65.192.120]:33523 "EHLO webber.adilger.net") by vger.kernel.org with ESMTP id ; Tue, 27 Feb 2001 12:05:46 -0500 From: Andreas Dilger Message-Id: <200102271705.f1RH5bB27105@webber.adilger.net> Subject: Re: Dynamically altering code segments In-Reply-To: from "Collins, Tom" at "Feb 27, 2001 10:43:02 am" To: "Collins, Tom" Date: Tue, 27 Feb 2001 10:05:37 -0700 (MST) CC: linux-kernel@vger.kernel.org X-Mailer: ELM [version 2.4ME+ PL66 (25)] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/