From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6690 invoked by alias); 29 Nov 2005 18:54:15 -0000 Received: (qmail 6684 invoked by uid 22791); 29 Nov 2005 18:54:15 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from fmr24.intel.com (HELO scsfmr004.sc.intel.com) (143.183.121.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Nov 2005 18:54:14 +0000 Received: from scsfmr100.sc.intel.com (scsfmr100.sc.intel.com [10.3.253.9]) by scsfmr004.sc.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id jATIsApm031403 for ; Tue, 29 Nov 2005 18:54:10 GMT Received: from unix-os.sc.intel.com (unix-os.sc.intel.com [172.25.110.7]) by scsfmr100.sc.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with ESMTP id jATC4u7b016090; Tue, 29 Nov 2005 12:04:56 GMT Received: (from askeshav@localhost) by unix-os.sc.intel.com (8.11.6/8.11.2) id jATIs7M00653; Tue, 29 Nov 2005 10:54:07 -0800 Date: Tue, 29 Nov 2005 18:54:00 -0000 From: Keshavamurthy Anil S To: "Zhang, Yanmin" Cc: systemtap@sources.redhat.com, "Keshavamurthy, Anil S" , "Mao, Bibo" Subject: Re: jprobe question Message-ID: <20051129105407.A31310@unix-os.sc.intel.com> Reply-To: Keshavamurthy Anil S References: <8126E4F969BA254AB43EA03C59F44E8404056CCD@pdsmsx404> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <8126E4F969BA254AB43EA03C59F44E8404056CCD@pdsmsx404>; from yanmin.zhang@intel.com on Mon, Nov 28, 2005 at 07:53:12PM -0800 X-Scanned-By: MIMEDefang 2.52 on 10.3.253.9 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2005-q4/txt/msg00298.txt.bz2 On Mon, Nov 28, 2005 at 07:53:12PM -0800, Zhang, Yanmin wrote: > > Mostly, jprobe handler has parameters. If the parameters are changed > in the jprobe handler, should the original function use the changed > values? Good question. > My answer is no. Because c compiler might change the parameter values > even though we don't change them in c codes sometimes. > > What's your idea? > You are correct, gcc assumes that the callee owns the argument space and could overwrite it. If you see the code in function setjmp_pre_handler() (for i386 & x86_64), we are saving this area and restoring it back before passing the control back to the probed(original) function. For Ia64, I was under the assumption that this might not be the case, but you proved it wrong. So for Ia64 also we need to implement the similar logic of saving and restoring the register stack space. Will open a bugzilla entry for this to track this bug. Patch welcome. Thanks, -Anil Keshavamurthy