pro64-support
[Top] [All Lists]

Re: confusion on parameters of __profile_call_entry

To: Peng Zhao <pengzhao@xxxxxxxxxxxxxx>
Subject: Re: confusion on parameters of __profile_call_entry
From: David Stephenson <dlstephe@xxxxxxx>
Date: Sat, 12 May 2001 15:17:44 -0700
Cc: sgi <pro64-support@xxxxxxxxxxx>
Organization: SGI -- Compilers
References: <Pine.LNX.4.21.0105112302530.32733-200000@peers.cs.ualberta.ca>
Sender: owner-pro64-support@xxxxxxxxxxx
Peng Zhao wrote:

>         I dumped the whirl tree of the instrumented program. I got
> confused on the number of the parameters of __profile_call_entry
> and __profile_call_exit.
> 
>         The prototype of __profile_call_exit is
> void __profile_call_entry(void *pu_handle, int call_id);
> 
> but in the dumped whirl tree, it seems to me that it get three parameters:
...
>     U8U8LDID 264 <1,5,.preg_U8> T<9,.predef_U8,8> # pu_instrument_handle
>    U8PARM 2 T<9,.predef_U8,8> # by_value
>     I4INTCONST 0 (0x0)
>    I4PARM 2 T<4,.predef_I4,4> # by_value
>     U8LDA 0 <1,26,(7_bytes)_"printf\000"> T<34,anon_ptr.,8>
>    U8PARM 2 T<9,.predef_U8,8> # by_value
>   VCALL 126 <1,27,__profile_call_entry> # flags 0x7e
...
>         What happens? It seems to me that Instrument_Call calls the wrong
> Gen_Call (or Gen_Call_Shell).

You are right.  I'm a little surprised that this isn't causing problems,
but perhaps the third parameter is being harmlessly ignored.  My guess
is that it's obsolete.  I'll try updating Instrument_Call in
be/com/wn_instrument.cxx to avoid producing the third parameter.

Thanks for pointing that out.  I like deleting code.

                                                                - David

-- 
David Stephenson        http://reality.sgi.com/dlstephe_engr/

<Prev in Thread] Current Thread [Next in Thread>