public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com>
To: "Zhang, Yanmin" <yanmin.zhang@intel.com>
Cc: systemtap@sources.redhat.com,         "Keshavamurthy,
	Anil S" <anil.s.keshavamurthy@intel.com>,
	        "Mao, Bibo" <bibo.mao@intel.com>
Subject: Re: jprobe question
Date: Tue, 29 Nov 2005 18:54:00 -0000	[thread overview]
Message-ID: <20051129105407.A31310@unix-os.sc.intel.com> (raw)
In-Reply-To: <8126E4F969BA254AB43EA03C59F44E8404056CCD@pdsmsx404>; from yanmin.zhang@intel.com on Mon, Nov 28, 2005 at 07:53:12PM -0800

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

       reply	other threads:[~2005-11-29 18:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8126E4F969BA254AB43EA03C59F44E8404056CCD@pdsmsx404>
2005-11-29 18:54 ` Keshavamurthy Anil S [this message]
2005-12-01  1:39 Keshavamurthy, Anil S
  -- strict thread matches above, loose matches on Subject: below --
2005-12-01  0:47 Zhang, Yanmin
2005-11-30 21:43 Keshavamurthy, Anil S
2005-11-30  1:46 Zhang, Yanmin
2005-11-29  3:54 Zhang, Yanmin
2005-11-29  5:33 ` Ananth N Mavinakayanahalli

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=20051129105407.A31310@unix-os.sc.intel.com \
    --to=anil.s.keshavamurthy@intel.com \
    --cc=bibo.mao@intel.com \
    --cc=systemtap@sources.redhat.com \
    --cc=yanmin.zhang@intel.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).