Re: [Open64-devel] instering function calls in whirl.
Brought to you by:
ributzka,
suneeljain
From: Thierry B. <thi...@st...> - 2005-03-08 09:32:33
|
I think also that you can convert the instrumented whirl to C code. All __profile_* calls to the instrumentation library will appear then. However that's what I remenber... Thierry Chunhua Liao wrote: >I tried whirl2c on whirl2 binary files dumped right after the frontend as >*.B and right before the CG as *.o, both works properly and the generated >source files can be compiled. I guess it should handle any whirl2 binary >dumped between those two stages. Just a guess. :-) > >-----Original Message----- >From: ope...@li... >[mailto:ope...@li...] On Behalf Of Peng Zhao >Sent: Monday, March 07, 2005 1:16 PM >To: Spundun Bhatt >Cc: Thierry BIDAULT; Open64 >Subject: Re: [Open64-devel] instering function calls in whirl. > > > >>Ah, thanks for the help.. I think thats what I was looking for. I am >>reading the source code right now. Btw, wn_instrument.* are in be/com .. >>I was wondering if the instrumenting functionality of open64 can be >>used for source-to-source transformation... since its in be.. does >>that mean that its being generated too late to convert the whirl file >>back to source code? >> >> > >Hi, > > The WHIRL intrumentation/annotation occurs very early in the backend >(It is almost at the begining of the BE). And if you do your transformation >at sites near the annotation, you can see all the high level control flow >constructs such as if/loop/switch-case. > > But I don't know for sure what is the exact input requirement of the >WHIRL2C facility. YOu need to check whether WHIRL2C accepts the WHIRL input >generated so early. Maybe other people can shed a light. Actually I often >used WHIRL2C to transform .N files back to C files and compile them again >successfully. And those .N files occur later than the >instrumentation/annotation. > > > > >>Thank you. >>Spundun. >> >>Btw: your these files might contain answer to my other question also >>(about writing annotation to the whirl file). >> >> >> >>>I hope it helps. >>> >>>-- >>>Thierry >>> >>>Spundun Bhatt wrote: >>> >>> >>> >>>>Hi all.... >>>>I am looking for tricks to insert function calls in the middle of >>>>the code in PUs. Thats baasically adding statements to the code >>>>that call a function.. (the function will be already declared). Is >>>>there an example of something similar being done in any of the >>>>modules in open64, that I can look at and fingureout what they use? >>>>Right now I am looking at the inliner code hoping to find something >>>> >>>> >there. > > >>>>Thaks >>>>Spundun. >>>>ps: I am still waiting for a respponse about adding persistent >>>>annotations to whirl. i.e. Adding annotations and then being able >>>>to save it in a whirl file. >>>> >>>> >>>> >>>------------------------------------------------------- >>>SF email is sponsored by - The IT Product Guide Read honest & candid >>>reviews on hundreds of IT Products from real users. >>>Discover which products truly live up to the hype. Start reading now. >>>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>>_______________________________________________ >>>Open64-devel mailing list >>>Ope...@li... >>>https://lists.sourceforge.net/lists/listinfo/open64-devel >>> >>> >>> >> >> >> > > > |