harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r429032 - in /incubator/harmony/standard/site: docs/subcomponents/drlvm/emguide.html docs/subcomponents/drlvm/index.html xdocs/subcomponents/drlvm/emguide.xml xdocs/subcomponents/drlvm/index.xml
Date Sat, 05 Aug 2006 18:51:36 GMT
Author: geirm
Date: Sat Aug  5 11:51:36 2006
New Revision: 429032

URL: http://svn.apache.org/viewvc?rev=429032&view=rev
Log:
more from HARMONY-1058, update to drlvm index 
page and new execution manager guide

Added:
    incubator/harmony/standard/site/docs/subcomponents/drlvm/emguide.html   (with props)
    incubator/harmony/standard/site/xdocs/subcomponents/drlvm/emguide.xml   (with props)
Modified:
    incubator/harmony/standard/site/docs/subcomponents/drlvm/index.html
    incubator/harmony/standard/site/xdocs/subcomponents/drlvm/index.xml

Added: incubator/harmony/standard/site/docs/subcomponents/drlvm/emguide.html
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/docs/subcomponents/drlvm/emguide.html?rev=429032&view=auto
==============================================================================
--- incubator/harmony/standard/site/docs/subcomponents/drlvm/emguide.html (added)
+++ incubator/harmony/standard/site/docs/subcomponents/drlvm/emguide.html Sat Aug  5 11:51:36
2006
@@ -0,0 +1,663 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<!--
+Copyright 1999-2004 The Apache Software Foundation
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+
+<!-- Content Stylesheet for Site -->
+
+        
+<!-- start the processing -->
+    <!-- ====================================================================== -->
+    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
+    <!-- Main Page Section -->
+    <!-- ====================================================================== -->
+    <html>
+        <head>
+            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+
+                                                    <meta name="author" value="Harmony
Documentation Team">
+            <meta name="email" value="harmony-dev@incubator.apache.org">
+            
+           
+            
+            
+            
+            
+            
+            <title>Apache Harmony - Apache Harmony</title>
+
+                                    
+        </head>
+
+        <body bgcolor="#ffffff" text="#000000" link="#525D76">        
+            <table border="0" width="100%" cellspacing="0">
+                <!-- TOP IMAGE -->
+                <tr>
+                    <td align='LEFT'>
+                    <table><tr><td>
+                    <td align="left">
+<a href="http://incubator.apache.org/harmony/"><img  src="../../images/harmony-logo.png"
alt="Apache Harmony" border="0"/></a>
+</td>
+</td>
+                    </td></tr></table>
+                    </td>
+                    <td align='RIGHT'>
+                    <a href="http://incubator.apache.org/harmony/">
+                    <img src="http://incubator.apache.org/harmony/images/apache-incubator-logo.png"
+                    	alt="Apache Harmony" border="0"/></a>                    
+                    </td>
+                </tr>
+            </table>
+            <table border="0" width="100%" cellspacing="4">
+                <tr><td colspan="2">
+                    <hr noshade="" size="1"/>
+                </td></tr>
+
+                <tr>
+                    <!-- LEFT SIDE NAVIGATION -->
+                    <td width="20%" valign="top" nowrap="true">
+
+                    <!-- special ACon Logo - leave here for next time -->
+                    <a href="http://www.asia.apachecon.com/">
+                        <img src="http://www.apache.org/ads/ApacheCon/234x60-2006-asia.gif"
+                             border="0" alt="ApacheCon Asia 2006" />
+                    </a>
+
+                   <!-- regular menu -->
+
+                    
+    <!-- ============================================================ -->
+
+                <p><strong>General</strong></p>
+        <ul>
+                    <li>    <a href="../../index.html">Home</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../license.html">License</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../contribution_policy.html">Contribution
Policy</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../guidelines.html">Project Guidelines</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="http://www.apache.org/">ASF</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../downloads.html">Downloads</a>
+</li>
+            
+            <table>
+                        </table>
+                </ul>
+            <p><strong>Community</strong></p>
+        <ul>
+                    <li>    <a href="../../get-involved.html">Get Involved</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../contributors.html">Committers</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../mailing.html">Mailing Lists</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../documentation/documentation.html">Documentation</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../faq.html">FAQ</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="http://wiki.apache.org/harmony">Wiki</a>
+</li>
+            
+            <table>
+                        </table>
+                </ul>
+            <p><strong>Development</strong></p>
+        <ul>
+                    <li>    <a href="../../status.html">How Are We Doing?</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../roadmap.html">Road Map / TODO</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../svn.html">Source Code</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="http://issues.apache.org/jira/browse/HARMONY">JIRA</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../related.html">Other Projects</a>
+</li>
+            
+            <table>
+                        </table>
+                </ul>
+            <p><strong>Subcomponents</strong></p>
+        <ul>
+                    <li>    <a href="../../subcomponents/buildtest/index.html">Build-Test
Framework</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../subcomponents/classlibrary/index.html">Class
Library</a>
+</li>
+            
+            <table>
+                          <tr><td>
+                &nbsp;&nbsp;    <a href="../../subcomponents/classlibrary/status.html">Status</a>
+              </td></tr>
+                        </table>
+                    <li>    <a href="../../subcomponents/drlvm/index.html">DRLVM</a>
+</li>
+            
+            <table>
+                        </table>
+                    <li>    <a href="../../subcomponents/jchevm/index.html">JCHEVM</a>
+</li>
+            
+            <table>
+                        </table>
+                </ul>
+                        </td>
+                    <td width="80%" align="left" valign="top">
+                                                                    <table border="0"
cellspacing="0" cellpadding="2" width="100%">
+      <tr><td bgcolor="#525D76">
+        <font color="#ffffff" face="arial,helvetica,sanserif">
+          <a name="Guide to Execution Manager Configuration"><strong>Guide to
Execution Manager Configuration</strong></a>
+        </font>
+      </td></tr>
+      <tr><td>
+        <blockquote>
+                                        <table border="0" cellspacing="0" cellpadding="2"
width="100%">
+      <tr><td bgcolor="#828DA6">
+        <font color="#ffffff" face="arial,helvetica,sanserif">
+          <a name="Contents"><strong>Contents</strong></a>
+        </font>
+      </td></tr>
+      <tr><td>
+        <blockquote>
+                                    <ol>
+<li><a href="#1. What is EM?">What is EM?</a></li>
+<li><a href="#2. EM Configuration File">EM Configuration File</a></li>
+<li><a href="#3. EM Tracing Options">EM tracing options</a></li>
+<li><a href="#4. More EM Configuration Samples">More EM Configuration Samples</a></li>
+</ol>
+                            </blockquote>
+      </td></tr>
+      <tr><td><br/></td></tr>
+    </table>
+                                                    <table border="0" cellspacing="0"
cellpadding="2" width="100%">
+      <tr><td bgcolor="#828DA6">
+        <font color="#ffffff" face="arial,helvetica,sanserif">
+          <a name="1. What is EM?"><strong>1. What is EM?</strong></a>
+        </font>
+      </td></tr>
+      <tr><td>
+        <blockquote>
+                                    <p>
+Execution Manager (EM) is a component in DRLVM that controls 
+profile collection and recompilation processes.
+<br />
+For detailed information on EM can be found, see the 
+ <a href="http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/drlvm/trunk/vm/doc/DeveloperGuide.htm#EM">
+DRLVM Developers Guide</a>
+</p>
+                            </blockquote>
+      </td></tr>
+      <tr><td><br/></td></tr>
+    </table>
+                                                    <table border="0" cellspacing="0"
cellpadding="2" width="100%">
+      <tr><td bgcolor="#828DA6">
+        <font color="#ffffff" face="arial,helvetica,sanserif">
+          <a name="2. EM Configuration File"><strong>2. EM Configuration File</strong></a>
+        </font>
+      </td></tr>
+      <tr><td>
+        <blockquote>
+                                    <p>
+The set of JIT compilers and profile collectors used at run time and their
+ relations is stored in the <i>EM configuration file</i>.
+During the VM initialization phase, EM uses hard-coded configuration or reads 
+it from the config file, if specified. 
+<br />
+You can use the following command-line option to make EM read its 
+configuration from the file:<br />
+<code>-Xem &lt;path to configuration file&gt;</code>
+<br />
+or   <br />
+<code>-Dem.properties=&lt;configuration.file.path&gt;</code>
+</p>
+                                                <p>
+The following is a line-by-line description of the default EM configuration. 
+These configuration settings can be used as a prototype to create 
+new custom EM configuration files.
+The default configuration is:
+</p>
+                                                <p><pre>
+chains=chain1,chain2
+
+chain1.jits=JET_CLINIT
+chain2.jits=JET_DPGO,OPT
+
+chain1.filter=+::&lt;clinit&gt;
+chain1.filter=-
+
+JET_CLINIT.file=&lt;path to dll&gt;
+JET_DPGO.file=&lt;path to dll&gt;
+OPT.file=&lt;path to dll&gt;
+
+JET_DPGO.genProfile=JET_DPGO_PROFILE
+JET_DPGO_PROFILE.profilerType=ENTRY_BACKEDGE_PROFILER
+OPT.useProfile=JET_DPGO_PROFILE
+
+JET_DPGO_PROFILE. mode=SYNC
+JET_DPGO_PROFILE.entryThreshold=10000
+JET_DPGO_PROFILE.backedgeThreshold=100000
+</pre></p>
+                                                <p>A line-by-line description of the
settings follows. </p>
+                                                <pre>
+chains=chain1,chain2
+</pre>
+                                                <p>
+Every EM configuration file must define the <code>chains</code> property 
+to indicate sequences of JIT compilers to be used to compile and/or recompile
+ a method. In this example, two recompilation chains are set for the system: 
+<code>chain1</code> and <code>chain2</code>. EM analyzes chains until
it has 
+chosen the chain for the method. 
+</p>
+                                                <pre>
+chain1.jits=JET_CLINIT
+chain2.jits=JET_DPGO,OPT
+</pre>
+                                                <p>
+In this case, <code>chain1</code> has one JIT compiler 
+<code>JET_CLINIT</code>, and <code>chain2</code> has
+ two compilers: <code>JET_DPGO</code> and <code>OPT</code>.
+Using these JIT names, EM reads JIT-specific configuration 
+and passes the names to JIT instances during initialization. 
+A compiler instance can use its name to distinguish between 
+its own properties and those of other JITs.  <br />
+</p>
+                                                <p>
+<b>Note:</b> Jitrino, the current default DRLVM JIT compiler, 
+selects Jitrino.JET (fast, non-optimizing compiler) if the name 
+starts with the <code>JET</code> prefix. Otherwise, the JIT 
+instance is treated as Jitrino.OPT.
+</p>
+                                                <pre>
+chain1.filter=+::&lt;clinit&gt; 
+chain1.filter=-
+</pre>
+                                                <p>
+Method filters are used to select methods that will be compiled
+ by the first JIT in a chain. 
+In this example, the first line configures <code>chain1</code> 
+to accept all <code>&lt;clinits&gt;</code> methods 
+and the second line - to refuse to compile all other methods. <br />
+The order of filters for every chain is significant. Chain
+ filters can be considered as if-else clauses: <br />
+If a filter matches a method, EM stops examining other filters
+ and analyzes the first sign in the filter: <br />
+<ul>
+<li>For a <code>+</code>, EM requests the first JIT in the 
+chain to compile the method. </li>
+<li>For a <code>-</code>, EM tries the next chain in the list. </li>
+</ul>
+If no filter has matched the compilation request, EM considers 
+that the method is accepted to be compiled by the chain. 
+<br />
+Here is a format of all currently supported method filters. 
+</p>
+                                                <br />
+                                                <table>
+                        <tr>
+                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+<b>Filter Type</b>
+
+            </font>
+</td>
+                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+<b>Filter Format   </b>
+
+            </font>
+</td>
+                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+<b>Filter Examples </b>
+
+            </font>
+</td>
+            </tr>
+                                <tr>
+                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+Name filter
+
+            </font>
+</td>
+                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+&lt;class-name&gt;::&lt;method_name&gt;&lt;signature&gt;
+
+            </font>
+</td>
+                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+'<i>-</i> rejects all methods.<br />'
+'<i>+java/lang</i>' accepts all methods from the .java/lang package.<br />
+'<i>+java/lang/Thread::s</i>' accepts all methods of 
+java.lang.Thread that starts with the letter 's'.<br />
+
+            </font>
+</td>
+            </tr>
+                                <tr>
+                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+Size filter
+
+            </font>
+</td>
+                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+NUMB or NUM1B..NUM2B
+
+            </font>
+</td>
+                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+'<i>+10B..100B</i>' accepts all methods of bytecode size in range of 
+[10..100].<br />
+'<i>-20B</i>' rejects all methods of bytecode size equal to 20. 
+
+            </font>
+</td>
+            </tr>
+                                <tr>
+                        <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+Compile-num filter
+
+            </font>
+</td>
+                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+NUM or NUM..NUM
+
+            </font>
+</td>
+                                <td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top"
align="left">
+    <font color="#000000" size="-1" face="arial,helvetica,sanserif">
+                
+'<i>+1..1000</i>' accepts all methods from 1 to 1000 (inclusive).<br />
+'<i>-800</i>' rejects to compile method that is compiled by number 800. 
+
+            </font>
+</td>
+            </tr>
+            </table>
+                                                <br />
+                                                <p>
+<b>Note:</b> The sequential method number could be changed from run 
+to run in multithreaded environments. 
+</p>
+                                                <p><pre>
+JET_CLINIT.file=&lt;path to dll&gt;
+JET_DPGO.file=&lt;path to dll&gt;
+OPT.file=&lt;path to dll&gt;
+</pre></p>
+                                                <p>
+For every JIT, the configuration file must define the location of the library
+ file location.
+Multiple JIT compilers can be associated with the same library. 
+For example, all paths can point to the same jit.dll file. 
+</p>
+                                                <p><pre>
+JET_DPGO.genProfile=JET_DPGO_PROFILE
+JET_DPGO_PROFILE.profilerType=ENTRY_BACKEDGE_PROFILER
+OPT.useProfile=JET_DPGO_PROFILE
+</pre></p>
+                                                <p>
+These settings define profile collection and recompilation event 
+configuration for two JIT compilers: <code>JET_DPGO</code> 
+and <code>OPT</code>.
+The first line configures <code>JET_DPGO</code> to generate a 
+profile <code>JET_DPGO_PROFILE</code>, 
+with the type of associated profile collector specified in the 
+second line. <code>ENTRY_BACKEDGE_PROFILER</code> 
+is the built-in DRL EM profile collector type. 
+In the third line, the <code>OPT</code> compiler is configured 
+to use the new profile.
+After reading these configuration settings, the execution 
+manager does the following: <br />
+<ol>
+<li>Instantiates the profile collector of the type 
+<code>ENTRY_BACKEDGE_PROFILER</code>. </li>
+<li>Checks whether the <code>JET_DPGO</code> JIT can generate 
+method profiles of this type; if so, requests the JIT to enable
+ profile generation. </li>
+<li>Checks whether the <code>OPT JIT</code> can use method 
+profiles of this type. </li>
+<li>Registers the profile collector as active. </li>
+</ol>
+</p>
+                                                <p><pre>
+JET_DPGO_PROFILE. mode=SYNC
+JET_DPGO_PROFILE.entryThreshold=10000
+JET_DPGO_PROFILE.backedgeThreshold=100000 
+</pre></p>
+                                                <p>
+The last 4 lines contain the configuration of the <code>JET_DPGO_PROFILE</code>
+ profiler. These properties are specific for every profile collector type. 
+The first option runs entry-backedge profile mode in the SYNC mode: counters 
+check is done during the code execution. Use  ASYNC to run counters 
+checking in a separate thread. The last 2 options set the profile readiness 
+threshold. Once the profile is ready, EM dispatches the method for 
+recompilation with the next JIT in the current chain.
+</p>
+                            </blockquote>
+      </td></tr>
+      <tr><td><br/></td></tr>
+    </table>
+                                                    <table border="0" cellspacing="0"
cellpadding="2" width="100%">
+      <tr><td bgcolor="#828DA6">
+        <font color="#ffffff" face="arial,helvetica,sanserif">
+          <a name="3. EM Tracing Options"><strong>3. EM Tracing Options</strong></a>
+        </font>
+      </td></tr>
+      <tr><td>
+        <blockquote>
+                                    <p>
+Use the following command-line options to trace EM events:
+<br />
+<code>-verbose:em</code> dumps all EM events.<br />
+<code>-verbose:em.JIT_NAME</code> dumps only JIT named 
+"<code>JIT_NAME</code>" related events. <br />
+<code>-verbose:em.profiler.PROFILER_NAME</code> dumps only profiler
+ "<code>PROFILER_NAME</code>" related events.<br />
+</p>
+                                                <p>
+<b>Example:</b></p>
+                                                <p>
+For the default EM configuration file, </p>
+                                                <p><code>
+-verbose:em.OPT 
+</code> dumps all methods names that are compiled with the 
+<code>OPT</code> JIT. According to the configuration details, these methods 
+are hot methods.
+</p>
+                                                <p>Alternatively, you can get almost
the same information by using 
+the following: 
+</p>
+                                                <p><code>
+-verbose:em.profiler.JET_DPGO_PROFILE 
+</code> additionally dumps information about hot method profiles.
+</p>
+                                                <p><b>Examples of output:</b>
+</p>
+                                                <p><code>
+C:\tools\decapo&gt;c:\tools\harmony0706\bin\java.exe  -verbose:em.OPT -jar dacapo-beta051009.jar
xalan<br />
+EM: recompile start:[OPT n=1] java/io/ByteArrayOutputStream::write(I)V<br />
+EM: recompile done:[OPT n=1] java/io/ByteArrayOutputStream::write(I)V<br />
+EM: recompile start:[OPT n=2] java/lang/String::hashCode()I<br />
+EM: recompile done:[OPT n=2] java/lang/String::hashCode()I<br />
+...
+</code>
+<br />
+<code>
+C:\tools\decapo&gt;c:\tools\harmony0706\bin\java.exe  -verbose:em.profiler.JET_DPGO_PROFILE
-jar dacapo-beta051009.jar xalan<br />
+EM: entry-backedge profiler intialized: JET_DPGO_PROFILE entry threshold:10000 backedge threshold:100000
mode:SYNC<br />
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/io/ByteArrayOutputStream::write(I)V<br
/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:59575] java/lang/String::hashCode()I<br
/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/lang/String::length()I<br
/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/lang/String::charAt(I)C<br
/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/charset/Charset::isLetter(C)Z<br
/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/charset/Charset::isDigit(C)Z<br
/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/Buffer::remaining()I<br
/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/util/HashMap::getModuloHash(Ljava/lang/Object;)I<br
/>
+...
+</code>
+</p>
+                            </blockquote>
+      </td></tr>
+      <tr><td><br/></td></tr>
+    </table>
+                                                    <table border="0" cellspacing="0"
cellpadding="2" width="100%">
+      <tr><td bgcolor="#828DA6">
+        <font color="#ffffff" face="arial,helvetica,sanserif">
+          <a name="4. More EM Configuration Samples"><strong>4. More EM Configuration
Samples</strong></a>
+        </font>
+      </td></tr>
+      <tr><td>
+        <blockquote>
+                                    <p>
+EM has two more hard-coded configurations: '<code>-Xem opt</code>'
+ and '<code>-Xem jet</code>'.<br />
+These configuration are almost identical and rely on the Jitrino 
+JIT naming convention: any JIT instance with the <code>JET</code> 
+prefix in the name is a Jitrino.JET instance.
+</p>
+                                                <p><b>JET Configuration</b></p>
+                                                <p><pre>
+chains=chain1
+chain1.jits=JET
+JET.file=&lt;path to dll&gt;
+</pre></p>
+                                                <p><b>OPT Configuration</b></p>
+                                                <p><pre>
+chains=chain1
+chain1.jits=OPT
+OPT.file=&lt;path to dll&gt;
+</pre></p>
+                                                <p>
+These configurations have only one JIT and no profile collection or recompilation.
+</p>
+                                                <p>
+<b>Note:</b> to run VM in the intereter mode, use the <code>-Xint</code>

+command-line option to override any other EM settings. Currently, DRLVM does
+ not support the mixed mode of the JIT compiler plus interpreter.
+</p>
+                            </blockquote>
+      </td></tr>
+      <tr><td><br/></td></tr>
+    </table>
+                            </blockquote>
+        </p>
+      </td></tr>
+      <tr><td><br/></td></tr>
+    </table>
+                    
+                                                            </td>
+                </tr>
+
+                <!-- FOOTER -->
+                <tr><td colspan="2">
+                    <hr noshade="" size="1"/>
+                </td></tr>
+                <tr><td colspan="2">
+                    <div align="center"><font color="#525D76" size="-1"><em>
+                    Copyright &#169; 2003-2006, The Apache Software Foundation
+                    </em></font></div>
+                </td></tr>
+            </table>
+        </body>
+    </html>
+<!-- end the processing -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: incubator/harmony/standard/site/docs/subcomponents/drlvm/emguide.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/standard/site/docs/subcomponents/drlvm/index.html
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/docs/subcomponents/drlvm/index.html?rev=429032&r1=429031&r2=429032&view=diff
==============================================================================
--- incubator/harmony/standard/site/docs/subcomponents/drlvm/index.html (original)
+++ incubator/harmony/standard/site/docs/subcomponents/drlvm/index.html Sat Aug  5 11:51:36
2006
@@ -225,8 +225,8 @@
         <li><em>Performance:</em> Interfaces fully enable implementation
of modules optimized for specific target platforms.</li>
     </ul>
                                                 <p>
-		The following documentation links are specific to the class library effort underway at
Apache Harmony.
-	</p>
+                The following documentation links are specific to the class library effort
underway at Apache Harmony.
+        </p>
                                                     <table border="0" cellspacing="0"
cellpadding="2" width="100%">
       <tr><td bgcolor="#828DA6">
         <font color="#ffffff" face="arial,helvetica,sanserif">
@@ -284,6 +284,11 @@
                     and configuring the DRL virtual machine to use it with a real-life example
                     of a copying GC implementation (source included) <br />
                     Currently, <a href="http://issues.apache.org/jira/browse/HARMONY-951"
target="_blank">JIRA issue 951</a>
+                </blockquote>
+            </li>
+            <li> <a href="emguide.html" target="_blank">Configuring Execution
Manager</a>
+                <blockquote>
+                    Guide to Execution Manager (EM) options and configuration file format.<br
/>
                 </blockquote>
             </li>
         </ul>

Added: incubator/harmony/standard/site/xdocs/subcomponents/drlvm/emguide.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/xdocs/subcomponents/drlvm/emguide.xml?rev=429032&view=auto
==============================================================================
--- incubator/harmony/standard/site/xdocs/subcomponents/drlvm/emguide.xml (added)
+++ incubator/harmony/standard/site/xdocs/subcomponents/drlvm/emguide.xml Sat Aug  5 11:51:36
2006
@@ -0,0 +1,326 @@
+<document>
+
+ <properties>
+  <title>Apache Harmony</title>
+  <author email="harmony-dev@incubator.apache.org">Harmony Documentation Team</author>
+ </properties>
+
+<body>
+<section name="Guide to Execution Manager Configuration">
+<subsection name="Contents">
+<ol>
+<li><a href="#1. What is EM?">What is EM?</a></li>
+<li><a href="#2. EM Configuration File">EM Configuration File</a></li>
+<li><a href="#3. EM Tracing Options">EM tracing options</a></li>
+<li><a href="#4. More EM Configuration Samples">More EM Configuration Samples</a></li>
+</ol>
+</subsection>
+
+<subsection name="1. What is EM?">
+<p>
+Execution Manager (EM) is a component in DRLVM that controls 
+profile collection and recompilation processes.
+<br/>
+For detailed information on EM can be found, see the 
+ <a href="http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/harmony/enhanced/drlvm/trunk/vm/doc/DeveloperGuide.htm#EM">
+DRLVM Developers Guide</a>
+</p>
+</subsection>
+<subsection name="2. EM Configuration File">
+<p>
+The set of JIT compilers and profile collectors used at run time and their
+ relations is stored in the <i>EM configuration file</i>.
+During the VM initialization phase, EM uses hard-coded configuration or reads 
+it from the config file, if specified. 
+<br/>
+You can use the following command-line option to make EM read its 
+configuration from the file:<br/>
+<code>-Xem &lt;path to configuration file&gt;</code>
+<br/>
+or   <br/>
+<code>-Dem.properties=&lt;configuration.file.path&gt;</code>
+</p>
+<p>
+The following is a line-by-line description of the default EM configuration. 
+These configuration settings can be used as a prototype to create 
+new custom EM configuration files.
+The default configuration is:
+</p>
+<p><pre>
+chains=chain1,chain2
+
+chain1.jits=JET_CLINIT
+chain2.jits=JET_DPGO,OPT
+
+chain1.filter=+::&lt;clinit&gt;
+chain1.filter=-
+
+JET_CLINIT.file=&lt;path to dll&gt;
+JET_DPGO.file=&lt;path to dll&gt;
+OPT.file=&lt;path to dll&gt;
+
+JET_DPGO.genProfile=JET_DPGO_PROFILE
+JET_DPGO_PROFILE.profilerType=ENTRY_BACKEDGE_PROFILER
+OPT.useProfile=JET_DPGO_PROFILE
+
+JET_DPGO_PROFILE. mode=SYNC
+JET_DPGO_PROFILE.entryThreshold=10000
+JET_DPGO_PROFILE.backedgeThreshold=100000
+</pre></p>
+<p>A line-by-line description of the settings follows. </p>
+<pre>
+chains=chain1,chain2
+</pre>
+<p>
+Every EM configuration file must define the <code>chains</code> property 
+to indicate sequences of JIT compilers to be used to compile and/or recompile
+ a method. In this example, two recompilation chains are set for the system: 
+<code>chain1</code> and <code>chain2</code>. EM analyzes chains until
it has 
+chosen the chain for the method. 
+</p>
+<pre>
+chain1.jits=JET_CLINIT
+chain2.jits=JET_DPGO,OPT
+</pre>
+<p>
+In this case, <code>chain1</code> has one JIT compiler 
+<code>JET_CLINIT</code>, and <code>chain2</code> has
+ two compilers: <code>JET_DPGO</code> and <code>OPT</code>.
+Using these JIT names, EM reads JIT-specific configuration 
+and passes the names to JIT instances during initialization. 
+A compiler instance can use its name to distinguish between 
+its own properties and those of other JITs.  <br/>
+</p>
+<p>
+<b>Note:</b> Jitrino, the current default DRLVM JIT compiler, 
+selects Jitrino.JET (fast, non-optimizing compiler) if the name 
+starts with the <code>JET</code> prefix. Otherwise, the JIT 
+instance is treated as Jitrino.OPT.
+</p>
+<pre>
+chain1.filter=+::&lt;clinit&gt; 
+chain1.filter=-
+</pre>
+<p>
+Method filters are used to select methods that will be compiled
+ by the first JIT in a chain. 
+In this example, the first line configures <code>chain1</code> 
+to accept all <code>&lt;clinits&gt;</code> methods 
+and the second line - to refuse to compile all other methods. <br />
+The order of filters for every chain is significant. Chain
+ filters can be considered as if-else clauses: <br/>
+If a filter matches a method, EM stops examining other filters
+ and analyzes the first sign in the filter: <br/>
+<ul>
+<li>For a <code>+</code>, EM requests the first JIT in the 
+chain to compile the method. </li>
+<li>For a <code>-</code>, EM tries the next chain in the list. </li>
+</ul>
+If no filter has matched the compilation request, EM considers 
+that the method is accepted to be compiled by the chain. 
+<br/>
+Here is a format of all currently supported method filters. 
+</p><br/>
+<table border="1">
+<tr>
+<td>
+<b>Filter Type</b>
+</td>
+<td>
+<b>Filter Format   </b>
+</td>
+<td>
+<b>Filter Examples </b>
+</td>
+</tr>
+
+<tr>
+<td>
+Name filter
+</td>
+<td>
+&lt;class-name&gt;::&lt;method_name&gt;&lt;signature&gt;
+</td>
+<td>
+'<i>-</i> rejects all methods.<br/>'
+'<i>+java/lang</i>' accepts all methods from the .java/lang package.<br/>
+'<i>+java/lang/Thread::s</i>' accepts all methods of 
+java.lang.Thread that starts with the letter 's'.<br/>
+</td>
+</tr>
+
+<tr>
+<td>
+Size filter
+</td>
+<td>
+NUMB or NUM1B..NUM2B
+</td>
+<td>
+'<i>+10B..100B</i>' accepts all methods of bytecode size in range of 
+[10..100].<br/>
+'<i>-20B</i>' rejects all methods of bytecode size equal to 20. 
+</td>
+</tr>
+
+<tr>
+<td>
+Compile-num filter
+</td>
+<td>
+NUM or NUM..NUM
+</td>
+<td>
+'<i>+1..1000</i>' accepts all methods from 1 to 1000 (inclusive).<br/>
+'<i>-800</i>' rejects to compile method that is compiled by number 800. 
+</td>
+</tr>
+
+</table>
+<br/>
+<p>
+<b>Note:</b> The sequential method number could be changed from run 
+to run in multithreaded environments. 
+</p>
+<p><pre>
+JET_CLINIT.file=&lt;path to dll&gt;
+JET_DPGO.file=&lt;path to dll&gt;
+OPT.file=&lt;path to dll&gt;
+</pre></p>
+<p>
+For every JIT, the configuration file must define the location of the library
+ file location.
+Multiple JIT compilers can be associated with the same library. 
+For example, all paths can point to the same jit.dll file. 
+</p>
+<p><pre>
+JET_DPGO.genProfile=JET_DPGO_PROFILE
+JET_DPGO_PROFILE.profilerType=ENTRY_BACKEDGE_PROFILER
+OPT.useProfile=JET_DPGO_PROFILE
+</pre></p>
+<p>
+These settings define profile collection and recompilation event 
+configuration for two JIT compilers: <code>JET_DPGO</code> 
+and <code>OPT</code>.
+The first line configures <code>JET_DPGO</code> to generate a 
+profile <code>JET_DPGO_PROFILE</code>, 
+with the type of associated profile collector specified in the 
+second line. <code>ENTRY_BACKEDGE_PROFILER</code> 
+is the built-in DRL EM profile collector type. 
+In the third line, the <code>OPT</code> compiler is configured 
+to use the new profile.
+After reading these configuration settings, the execution 
+manager does the following: <br/>
+<ol>
+<li>Instantiates the profile collector of the type 
+<code>ENTRY_BACKEDGE_PROFILER</code>. </li>
+<li>Checks whether the <code>JET_DPGO</code> JIT can generate 
+method profiles of this type; if so, requests the JIT to enable
+ profile generation. </li>
+<li>Checks whether the <code>OPT JIT</code> can use method 
+profiles of this type. </li>
+<li>Registers the profile collector as active. </li>
+</ol>
+</p>
+<p><pre>
+JET_DPGO_PROFILE. mode=SYNC
+JET_DPGO_PROFILE.entryThreshold=10000
+JET_DPGO_PROFILE.backedgeThreshold=100000 
+</pre></p>
+<p>
+The last 4 lines contain the configuration of the <code>JET_DPGO_PROFILE</code>
+ profiler. These properties are specific for every profile collector type. 
+The first option runs entry-backedge profile mode in the SYNC mode: counters 
+check is done during the code execution. Use  ASYNC to run counters 
+checking in a separate thread. The last 2 options set the profile readiness 
+threshold. Once the profile is ready, EM dispatches the method for 
+recompilation with the next JIT in the current chain.
+</p>
+</subsection>
+<subsection name="3. EM Tracing Options">
+<p>
+Use the following command-line options to trace EM events:
+<br/>
+<code>-verbose:em</code> dumps all EM events.<br/>
+<code>-verbose:em.JIT_NAME</code> dumps only JIT named 
+"<code>JIT_NAME</code>" related events. <br/>
+<code>-verbose:em.profiler.PROFILER_NAME</code> dumps only profiler
+ "<code>PROFILER_NAME</code>" related events.<br/>
+</p>
+<p>
+<b>Example:</b></p>
+<p>
+For the default EM configuration file, </p>
+<p><code>
+-verbose:em.OPT 
+</code> dumps all methods names that are compiled with the 
+<code>OPT</code> JIT. According to the configuration details, these methods 
+are hot methods.
+</p>
+<p>Alternatively, you can get almost the same information by using 
+the following: 
+</p>
+<p><code>
+-verbose:em.profiler.JET_DPGO_PROFILE 
+</code> additionally dumps information about hot method profiles.
+</p>
+
+<p><b>Examples of output:</b>
+</p>
+<p><code>
+C:\tools\decapo&gt;c:\tools\harmony0706\bin\java.exe  -verbose:em.OPT -jar dacapo-beta051009.jar
xalan<br/>
+EM: recompile start:[OPT n=1] java/io/ByteArrayOutputStream::write(I)V<br/>
+EM: recompile done:[OPT n=1] java/io/ByteArrayOutputStream::write(I)V<br/>
+EM: recompile start:[OPT n=2] java/lang/String::hashCode()I<br/>
+EM: recompile done:[OPT n=2] java/lang/String::hashCode()I<br/>
+...
+</code>
+<br/>
+<code>
+C:\tools\decapo&gt;c:\tools\harmony0706\bin\java.exe  -verbose:em.profiler.JET_DPGO_PROFILE
-jar dacapo-beta051009.jar xalan<br/>
+EM: entry-backedge profiler intialized: JET_DPGO_PROFILE entry threshold:10000 backedge threshold:100000
mode:SYNC<br/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/io/ByteArrayOutputStream::write(I)V<br/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:59575] java/lang/String::hashCode()I<br/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/lang/String::length()I<br/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/lang/String::charAt(I)C<br/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/charset/Charset::isLetter(C)Z<br/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/charset/Charset::isDigit(C)Z<br/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/Buffer::remaining()I<br/>
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/util/HashMap::getModuloHash(Ljava/lang/Object;)I<br/>
+...
+</code>
+</p>
+</subsection>
+<subsection name="4. More EM Configuration Samples">
+<p>
+EM has two more hard-coded configurations: '<code>-Xem opt</code>'
+ and '<code>-Xem jet</code>'.<br/>
+These configuration are almost identical and rely on the Jitrino 
+JIT naming convention: any JIT instance with the <code>JET</code> 
+prefix in the name is a Jitrino.JET instance.
+</p>
+<p><b>JET Configuration</b></p>
+<p><pre>
+chains=chain1
+chain1.jits=JET
+JET.file=&lt;path to dll&gt;
+</pre></p>
+<p><b>OPT Configuration</b></p>
+<p><pre>
+chains=chain1
+chain1.jits=OPT
+OPT.file=&lt;path to dll&gt;
+</pre></p>
+<p>
+These configurations have only one JIT and no profile collection or recompilation.
+</p>
+<p>
+<b>Note:</b> to run VM in the intereter mode, use the <code>-Xint</code>

+command-line option to override any other EM settings. Currently, DRLVM does
+ not support the mixed mode of the JIT compiler plus interpreter.
+</p>
+</subsection>
+</section>
+
+</body>
+</document>

Propchange: incubator/harmony/standard/site/xdocs/subcomponents/drlvm/emguide.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/standard/site/xdocs/subcomponents/drlvm/index.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/xdocs/subcomponents/drlvm/index.xml?rev=429032&r1=429031&r2=429032&view=diff
==============================================================================
--- incubator/harmony/standard/site/xdocs/subcomponents/drlvm/index.xml (original)
+++ incubator/harmony/standard/site/xdocs/subcomponents/drlvm/index.xml Sat Aug  5 11:51:36
2006
@@ -40,9 +40,9 @@
         <li><em>Performance:</em> Interfaces fully enable implementation
of modules optimized for specific target platforms.</li>
     </ul>
     <p>
-		The following documentation links are specific to the class library effort underway at
Apache Harmony.
-	</p>
-	
+                The following documentation links are specific to the class library effort
underway at Apache Harmony.
+        </p>
+        
     <subsection name="Developing and Building the code">
         <ul>
             <li>
@@ -88,8 +88,14 @@
                     Currently, <a href="http://issues.apache.org/jira/browse/HARMONY-951"
target="_blank">JIRA issue 951</a>
                 </blockquote>
             </li>
+            <li> <a href="emguide.html" target="_blank">Configuring Execution
Manager</a>
+                <blockquote>
+                    Guide to Execution Manager (EM) options and configuration file format.<br/>
+                </blockquote>
+            </li>
         </ul>
     </subsection>
+
 
  </section>
 



Mime
View raw message