Differences between revisions 2 and 3
Revision 2 as of 2008-05-14 07:36:34
Size: 1262
Comment:
Revision 3 as of 2009-09-20 21:54:21
Size: 1267
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
[[BR]][[BR]] <<BR>><<BR>>
Line 4: Line 4:
[[BR]]
The resulted map of counters is registered in [http://harmony.apache.org/subcomponents/drlvm/EM.html#PC edge profile collector].
[[BR]]
<<BR>>
The resulted map of counters is registered in [[http://harmony.apache.org/subcomponents/drlvm/EM.html#PC|edge profile collector]].
<<BR>>
Line 8: Line 8:
[[BR]]
[[BR]]
<<BR>>
<<BR>>
Line 11: Line 11:
[[BR]] <<BR>>
Line 13: Line 13:
[[BR]] <<BR>>
Line 15: Line 15:
[[BR]][[BR]]
To use IR based profile mapping compiler must ensure that the IR of the method is the same during instrumentation and [:Jitrino_OPT/edge_annotate: annotation] phases
[[BR]][[BR]]
<<BR>><<BR>>
To use IR based profile mapping compiler must ensure that the IR of the method is the same during instrumentation and [[Jitrino_OPT/edge_annotate| annotation]] phases
<<BR>><<BR>>
Line 20: Line 20:
implementation file: [http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp?view=markup http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp] implementation file: [[http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp?view=markup|http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp]]

'edge_instrument' - instruments HIR with extra instructions to collect edge profile information

The optimization creates a map of counters and inserts counter increment instructions for every edge in Control Flow Graph.
The resulted map of counters is registered in edge profile collector.
Once profile collector decides that method profile is ready it initiates method recompilation process.

There are 2 ways of mapping of profile information to the methods IR:
1) IR based profile mapping
2) Bytecode based profile mapping

To use IR based profile mapping compiler must ensure that the IR of the method is the same during instrumentation and annotation phases

Bytecode based profile mapping is compiler independent. The 'key' for a counter is a 32-bit value composed from 16-bit offsets in bytecode: jump-offset and target-offset.

implementation file: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/dynopt/EdgeProfiler.cpp

Jitrino_OPT/edge_instrument (last edited 2009-09-20 21:54:21 by localhost)