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/
|