Estelle,
Unless you inline HIR of the callee into the foo(), your changes in this HIR will be lost after compilation of foo() is complete. I see several ways to instrument callees: 1. Instrument all methods and then filter out those you don't need. The list of callees or a call graph may be obtained during the compilation of foo(). This looks to me as the simplest way but the overhead may be big. 2. Use CompilationInterface.compileMethod() routine to run a full compilation of a callee from a compilation session of foo(). You may organize pasing a parameter to designate that the compiled method must be instrumented. This is quite a simple to do but compiling one method from another may be unsafe in case on complex type dependencies. 3. Create a list of callees during the first run and then instrument the callees during the next run. Thanks, Pavel On 9/21/07, Estelle Liu <[EMAIL PROTECTED]> wrote: > Pavel, > My case is :The insertion of instrumentation code occurs in an optpass > applied to a method(suppose foo), and TranslatorSession is used to > translate > the callees of foo. My question is whether the instrumentation code > injected > to callees of foo there is permanent. If not, how can I make that modified > HIR permanent? > > Thanks, > > 2007/9/19, Pavel Ozhdikhin < [EMAIL PROTECTED]>: > > > > Estelle, > > > > Could you please give more details - what information do you want to > > obtain > > from the JIT? > > For example, the simplest case is when the methods in the call chain are > > inlined - you may adjust the inliner to insert the instrumentation code. > > > > Thanks, > > Pavel > > > > > > On 9/16/07, Estelle Liu < [EMAIL PROTECTED]> wrote: > > > > > > Hi,everyone, > > > I'd like to instrument in the HIR of a method chain with call > relations. > > > Is there any way to go? > > > > > > -- > > > Estelle > > > > > > > > > -- > Estelle >
