From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21129 invoked by alias); 5 Oct 2005 18:18:34 -0000 Mailing-List: contact systemtap-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sources.redhat.com Received: (qmail 21120 invoked by uid 22791); 5 Oct 2005 18:18:31 -0000 X-Authentication-Warning: toenail.toronto.redhat.com: fche set sender to fche@redhat.com using -f To: Badari Pulavarty Cc: systemtap@sources.redhat.com Subject: Re: pfaults.stp fix (for 2.6.13 and beyond) References: <1128525662.4754.59.camel@dyn9047017102.beaverton.ibm.com> <4343FC3D.1070604@redhat.com> <1128533722.4754.65.camel@dyn9047017102.beaverton.ibm.com> From: fche@redhat.com (Frank Ch. Eigler) Date: Wed, 05 Oct 2005 18:18:00 -0000 In-Reply-To: <1128533722.4754.65.camel@dyn9047017102.beaverton.ibm.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-q4/txt/msg00009.txt.bz2 Badari Pulavarty writes: > Yes. I noticed that too. Is there a sane of handling these between > two kernel versions ? (like function name changes, #define changes, > disappearing functions). There isn't an easy way for end-user scripts. Scripts installed under tapset/ can use the kernel-version-sensitive search paths. I envisioned hiding such version drift in these tapset variants exactly so that end-user scripts would not need to be aware. But perhaps this is not sufficient. > I tried doing, > #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) > probe kernel.function("handle_mm_fault") { > #else > probe kernel.function("__handle_mm_fault") { > #endif > But doesn't work. That is because stp sources are not processed through cpp, and even if they were, it'd have to be told to locate kernel headers that define such macros, and yet avoid pulling in all the C code. Several people have suggested a version-sensitive ifdef construct for the scripting language, and I'm finally coming around on that. I'll open a bugzilla entry to track its implementation. - FChE