harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Ozhdikhin" <pavel.ozhdik...@gmail.com>
Subject Re: [jitrino]question about instrument
Date Fri, 21 Sep 2007 07:37:49 GMT
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 <lyy1105@gmail.com> 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 < pavel.ozhdikhin@gmail.com>:
> >
> > 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 < lyy1105@gmail.com> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message