harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r448929 - in /incubator/harmony/standard/site: ./ docs/ docs/subcomponents/drlvm/ docs/subcomponents/drlvm/images/ xdocs/subcomponents/drlvm/ xdocs/subcomponents/drlvm/images/
Date Fri, 22 Sep 2006 13:48:23 GMT
Author: geirm
Date: Fri Sep 22 06:48:22 2006
New Revision: 448929

URL: http://svn.apache.org/viewvc?view=rev&rev=448929
Log:
HARMONY-1401

- new doc on execution manager
- added new way of dealing w/ images so local is same as deployed
  (we need to rethink some of this...)



Added:
    incubator/harmony/standard/site/docs/subcomponents/drlvm/EM.html
    incubator/harmony/standard/site/docs/subcomponents/drlvm/images/
    incubator/harmony/standard/site/docs/subcomponents/drlvm/images/EM_interfaces.gif   (with props)
    incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.html
    incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.xml
    incubator/harmony/standard/site/xdocs/subcomponents/drlvm/images/
    incubator/harmony/standard/site/xdocs/subcomponents/drlvm/images/EM_interfaces.gif   (with props)
Modified:
    incubator/harmony/standard/site/build.xml
    incubator/harmony/standard/site/docs/license.html
    incubator/harmony/standard/site/docs/mailing.html
    incubator/harmony/standard/site/docs/quickhelp_contributors.html
    incubator/harmony/standard/site/docs/quickhelp_users.html
    incubator/harmony/standard/site/docs/subcomponents/drlvm/index.html
    incubator/harmony/standard/site/xdocs/subcomponents/drlvm/index.xml

Modified: incubator/harmony/standard/site/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/build.xml?view=diff&rev=448929&r1=448928&r2=448929
==============================================================================
--- incubator/harmony/standard/site/build.xml (original)
+++ incubator/harmony/standard/site/build.xml Fri Sep 22 06:48:22 2006
@@ -67,8 +67,20 @@
            templatePath="xdocs/stylesheets">
       </anakia>
 
+      <!-- top level images -->
+
       <copy todir="${docs.dest}/images" filtering="no">
           <fileset dir="${docs.src}/images">
+              <include name="**/*.gif"/>
+              <include name="**/*.jpeg"/>
+              <include name="**/*.jpg"/>
+              <include name="**/*.png"/>
+          </fileset>
+      </copy>
+
+      <!-- images for drlvm sub component -->
+      <copy todir="${docs.dest}/subcomponents/drlvm/images" filtering="no">
+          <fileset dir="${docs.src}/subcomponents/drlvm/images">
               <include name="**/*.gif"/>
               <include name="**/*.jpeg"/>
               <include name="**/*.jpg"/>

Modified: incubator/harmony/standard/site/docs/license.html
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/docs/license.html?view=diff&rev=448929&r1=448928&r2=448929
==============================================================================
--- incubator/harmony/standard/site/docs/license.html (original)
+++ incubator/harmony/standard/site/docs/license.html Fri Sep 22 06:48:22 2006
@@ -418,7 +418,7 @@
    limitations under the License.
 
 
- </pre></td>
+ </pre>
     </div>
                            
       </td></tr>

Modified: incubator/harmony/standard/site/docs/mailing.html
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/docs/mailing.html?view=diff&rev=448929&r1=448928&r2=448929
==============================================================================
--- incubator/harmony/standard/site/docs/mailing.html (original)
+++ incubator/harmony/standard/site/docs/mailing.html Fri Sep 22 06:48:22 2006
@@ -327,7 +327,7 @@
         Subject : [classlib][io] Problem with java.io.OutputSocket
 
         ....
-    </pre></td>
+    </pre>
     </div>
                             
       </td></tr>

Modified: incubator/harmony/standard/site/docs/quickhelp_contributors.html
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/docs/quickhelp_contributors.html?view=diff&rev=448929&r1=448928&r2=448929
==============================================================================
--- incubator/harmony/standard/site/docs/quickhelp_contributors.html (original)
+++ incubator/harmony/standard/site/docs/quickhelp_contributors.html Fri Sep 22 06:48:22 2006
@@ -273,7 +273,7 @@
                                                     <div>
 <pre>
  $ svn co https://svn.apache.org/repos/asf/incubator/harmony/enhanced/trunk
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             This will checkout a directory structure that contains a <code>working_classlib</code>
@@ -305,7 +305,7 @@
                                                     <div>
 <pre>
 $ ant populate_source
-         </pre></td>
+         </pre>
     </div>
                                                 <p>
             This will checkout classlib and DRLVM into the working_classlib and working_vm
@@ -325,7 +325,7 @@
 <pre>
 $ cd working_classlib
 $ svn update
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             These are full, valid checkouts of the classlibrary and DRLVM.  Any modifications
@@ -361,7 +361,7 @@
 $ cd working_classlib
 $ ant fetch-depends
 $ ant
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             If the above succeeds, you now have built the Apache Harmony classlibrary, both
@@ -379,7 +379,7 @@
                                                     <div>
 <pre>
  $ ant test
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             Which will run the full testsuite for the classlibrary.
@@ -394,7 +394,7 @@
 <pre>
  $ cd working_vm
  $ cd build
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             The first thing we have to do is tell the DRLVM build where to find the class library.
@@ -407,7 +407,7 @@
                                                     <div>
 <pre>
  $ cp drlvm.properties.example drlvm.properties
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             If you are a windows user, note that you <i>must</i> be working from the Visual
@@ -419,7 +419,7 @@
                                                     <div>
 <pre>
  C:...\trunk\working_vm\build&gt; set CXX=msvc
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             Now you are ready to build.  To do so, we first fetch our dependencies.  Please note that this
@@ -432,7 +432,7 @@
 
 On Windows :
 C:...\trunk\working_vm\build&gt;build.bat update
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             Once we have obtained our dependencies, we can proceed with the build :
@@ -444,7 +444,7 @@
 
 On Windows :
 C:...\trunk\working_vm\build&gt;build.bat
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             and when complete, with the tests :
@@ -456,7 +456,7 @@
 
 On Windows :
 C:...\trunk\working_vm\build&gt;build.bat test
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             Note that the so-called "kernel" tests don't currently pass.  If you get through the
@@ -476,7 +476,7 @@
 pre-alpha : not complete or compatible
 svn = r448280, (Sep 21 2006), Linux/ia32/gcc 3.4.6, debug build
 http://incubator.apache.org/harmon
-        </pre></td>
+        </pre>
     </div>
                             
       </td></tr>

Modified: incubator/harmony/standard/site/docs/quickhelp_users.html
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/docs/quickhelp_users.html?view=diff&rev=448929&r1=448928&r2=448929
==============================================================================
--- incubator/harmony/standard/site/docs/quickhelp_users.html (original)
+++ incubator/harmony/standard/site/docs/quickhelp_users.html Fri Sep 22 06:48:22 2006
@@ -260,7 +260,7 @@
                                                     <div>
 <pre>
 $ tar -tzf latest-harmony-jre-linux.tar.gz
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             This will unpack the JRE directory tree into the current directory.
@@ -311,7 +311,7 @@
 $ export JAVA_HOME=`pwd`
 $ cd bin
 $ export PATH=`pwd`:$PATH
-        </pre></td>
+        </pre>
     </div>
                                                 <p>
             Note that this assumed your current directory was the parent directory of the
@@ -328,7 +328,7 @@
 C:\jre&gt;set JAVA_HOME=C:\jre
 C:\jre&gt; cd bin
 C:\jre\bin&gt; set PATH=C:\jre\bin;%PATH%
-        </pre></td>
+        </pre>
     </div>
                             
       </td></tr>
@@ -350,7 +350,7 @@
 <pre>
 $ java Foo
 $ java -jar myjar.jar
-        </pre></td>
+        </pre>
     </div>
                             
       </td></tr>

Added: incubator/harmony/standard/site/docs/subcomponents/drlvm/EM.html
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/docs/subcomponents/drlvm/EM.html?view=auto&rev=448929
==============================================================================
--- incubator/harmony/standard/site/docs/subcomponents/drlvm/EM.html (added)
+++ incubator/harmony/standard/site/docs/subcomponents/drlvm/EM.html Fri Sep 22 06:48:22 2006
@@ -0,0 +1,905 @@
+<!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.
+-->
+
+
+<!-- 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 - Thread Manager</title>
+
+                                <link rel="Stylesheet" type="text/css" href="site.css"/>
+        </head>
+
+        <body>        
+            <table  width="100%" cellspacing="0">
+                <!-- TOP IMAGE -->
+                <tr>
+                    <td align='LEFT'>
+                    <table><tr><td>
+                    <td>
+<a href="http://incubator.apache.org/harmony/"><img  src="../../images/harmony-logo.png" alt="Apache Harmony" /></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" /></a>                    
+                    </td>
+                </tr>
+            </table>
+            <table width="100%" cellspacing="4">
+                <tr><td colspan="2">
+                    <hr noshade="" size="1"/>
+                </td></tr>
+
+                <tr>
+                    <!-- LEFT SIDE NAVIGATION -->
+                    <td class="menuItem" width="20%" nowrap="true">
+
+                    <!-- special ACon Logo - leave here for next time -->
+                    <a href="http://www.us.apachecon.com/">
+                        <img src="http://www.apache.org/ads/ApacheCon/240x120-2006-us.gif"
+                             alt="ApacheCon US 2006" />
+                    </a>
+
+                   <!-- regular menu -->
+
+                    
+    <!-- ============================================================ -->
+
+                <p class="menuItem"><strong>General</strong></p>
+        <ul>
+                    <li class="menuItem">    <a href="../../index.html">Home</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../license.html">License</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../contribution_policy.html">Contribution Policy</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../guidelines.html">Project Guidelines</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="http://www.apache.org/">ASF</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../downloads.html">Downloads</a>
+</li>
+            
+           
+                        
+                </ul>
+            <p class="menuItem"><strong>Community</strong></p>
+        <ul>
+                    <li class="menuItem">    <a href="../../get-involved.html">Get Involved</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../contributors.html">Committers</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../mailing.html">Mailing Lists</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../documentation/documentation.html">Documentation</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../faq.html">FAQ</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="http://wiki.apache.org/harmony">Wiki</a>
+</li>
+            
+           
+                        
+                </ul>
+            <p class="menuItem"><strong>Development</strong></p>
+        <ul>
+                    <li class="menuItem">    <a href="../../status.html">How Are We Doing?</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../roadmap.html">Road Map / TODO</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../svn.html">Source Code</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="http://issues.apache.org/jira/browse/HARMONY">JIRA</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../related.html">Other Projects</a>
+</li>
+            
+           
+                        
+                </ul>
+            <p class="menuItem"><strong>Subcomponents</strong></p>
+        <ul>
+                    <li class="menuItem">    <a href="../../subcomponents/buildtest/index.html">Build-Test Framework</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/classlibrary/index.html">Class Library</a>
+</li>
+            
+           
+                           <table>
+              <tr><td class="menuItem">
+                &nbsp;&nbsp;&nbsp;&nbsp;    <a href="../../subcomponents/classlibrary/status.html">Status</a>
+                </td></tr>
+              </table>
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/drlvm/index.html">DRLVM</a>
+</li>
+            
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/jchevm/index.html">JCHEVM</a>
+</li>
+            
+           
+                        
+                </ul>
+                        </td>
+                    <td width="80%" valign="top"><a name="top"></a>
+                                        
+                                                                <div>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+   <head>
+      <meta http-equiv="Content-Type"
+      content="text/html; charset=windows-1251" />
+      <link rel="Stylesheet" type="text/css" href="site.css" />
+      <title>
+         DRLVM Execution Manager
+      </title>
+   </head>
+   <body>
+      <h1>
+         <a id="top" name="top"></a>Execution Manager Component Description
+      </h1>
+      <p class="TOCHeading">
+         <a href="#About_this_document">1. About this Document</a>
+      </p>
+      <p class="TOC">
+         <a href="#Purpose">1.1 Purpose</a>
+      </p>
+      <p class="TOC">
+         <a href="#Intended_Audience">1.2 Intended Audience</a>
+      </p>
+      <p class="TOC">
+         <a href="#Using_this_document">1.3 Using This Document</a>
+      </p>
+      <p class="TOC">
+         <a href="#Conventions_and_Symbols">1.4 Conventions and Symbols</a>
+      </p>
+      <p class="TOCHeading">
+         <a href="#Overview">2. Overview</a>
+      </p>
+      <p class="TOC">
+         <a href="#Key_features">2.1 Key Features</a>
+      </p>
+      <p class="TOCHeading">
+         <a href="#Architecture">3. Architecture</a>
+      </p>
+      <p class="TOC">
+         <a href="#EM">3.1 Execution Manager in VM</a>
+      </p>
+      <p class="TOC">
+         <a href="#PC">3.2 Profile Collector</a>
+      </p>
+      <blockquote>
+         <p class="TOC">
+            <a href="#EM_PC">3.2.1 EM_PC Interface</a>
+         </p>
+         <p class="TOC">
+            <a href="#PlugIn_PC">3.2.2 How to plug in a custom PC</a>
+         </p>
+      </blockquote>
+      <p class="TOC">
+         <a href="#Profiler_thread">3.3 Profiler Thread</a>
+      </p>
+      <p class="TOCHeading">
+         <a href="#Processes">4. Processes</a>
+      </p>
+      <p class="TOC">
+         <a href="#Recompilation">4.1 Recompilation</a>
+      </p>
+      <p class="TOC">
+         <a href="#Execution_Management">4.2 Execution Management</a>
+      </p>
+      <blockquote>
+         <p class="TOC">
+            <a href="#Instantiation">4.2.1 Instantiation</a>
+         </p>
+         <p class="TOC">
+            <a href="#Method_Execution">4.2.2 Method Execution</a>
+         </p>
+      </blockquote>
+      <p class="TOCHeading">
+         <a href="#Interfaces">5. Public Interfaces</a>
+      </p>
+      <p class="TOC">
+         <a href="#EM_VM">5.1 EM_VM Interface</a>
+      </p>
+      <p class="TOC">
+         <a href="#EM_JIT">5.2 EM_JIT Interface</a>
+      </p>
+      <p class="TOCHeading">
+         <a href="#References">6. References</a>
+      </p>
+      <h1>
+         <a id="About_this_document" name="About_this_document"></a>1. About
+         this document
+      </h1>
+      <h2>
+         <a id="Purpose" name="Purpose"></a>1.1 Purpose
+      </h2>
+      <p>
+         This document describes the internal structure of the execution
+         manager component deployed with the virtual machine as part of the DRL
+         (Dynamic Runtime Layer) initiative. The description covers the
+         internal design of the execution manager and its interaction with
+         other DRLVM components. The document is targeted at DRLVM developers
+         with special interest in code execution algorithms. The information
+         can be helpful for future development of DRL execution management
+         techniques and can serve as an example for those implementing an
+         execution manager from scratch.
+      </p>
+      <p>
+         In this document, you can find implementation-specific details of the
+         execution manager. General information on the EM role in overall
+         virtual machine design and VM-level requirements are out of scope of
+         this document and are covered in the <i>DRLVM Developer's Guide</i>
+         [<a href="#DRLDevGuide">3</a>] .
+      </p>
+      <h2>
+         <a id="Intended_Audience" name="Intended_Audience"></a>1.2 Intended
+         Audience
+      </h2>
+      <p>
+         The target audience for the document includes a wide community of
+         engineers interested in using DRLVM and in working further with the
+         product to contribute to its development. The document assumes that
+         readers understand the concepts of dynamic optimizations,
+         recompilation and profile collection.
+      </p>
+      <h2>
+         <a id="Using_this_document" name="Using_this_document"></a>1.3 Using
+         This Document
+      </h2>
+      <p>
+         The DRLVM execution manager description has the following major
+         sections:
+      </p>
+      <ul>
+         <li>
+            <a href="#Overview">Overview</a>: a definition of the execution
+            manager component and its key features
+         </li>
+         <li>
+            <a href="#Architecture">Architecture</a>: a description of EM
+            internal architecture, its profile collector subcomponent and the
+            interfaces it uses, as well as other implementation-specific data
+         </li>
+         <li>
+            <a href="#Processes">Processes</a>: an overview and a step-by-step
+            description of dynamic recompilation, the central EM process
+         </li>
+         <li>
+            <a href="#Interfaces">Public interfaces</a>: a definition of major
+            functional groups that the execution manager exports for
+            interaction with other components <br />
+            <br />
+         </li>
+      </ul>
+      <h2>
+         <a id="Conventions_and_Symbols" name="Conventions_and_Symbols"></a>1.4
+         Conventions and Symbols
+      </h2>
+      <p>
+         This document uses the <a href="conventions.htm">unified
+         conventions</a> for the DRL documentation kit.
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="Overview" name="Overview"></a>2. Overview
+      </h1>
+      <p>
+         The execution manager is responsible for selecting execution engines
+         (a JIT compiler or an interpreter) for method compilation and
+         execution at run time. The execution manager (EM) takes input from its
+         configuration settings and run-time profile information. The DRL
+         execution manager also uses <a href="#PC">profile collectors</a> to
+         gather run-time data associated with method code and the just-in-time
+         (JIT) compiler that produced the code. The execution manager, profile
+         collectors, and execution engines plugged in VM make up the <i>dynamic
+         optimization</i> subsystem [<a href="#DynOpt_ref">1</a>], [<a
+         href="#SurveyOpt_ref">2</a>].
+      </p>
+      <p>
+         The execution manager instantiates execution engines depending on its
+         configuration [<a href="#DRLEmGuide">4</a>] and the current VM mode.
+      </p>
+      <ul>
+         <li>
+            In the <i>interpreter</i> mode, EM delegates execution of all
+            methods to interpreter
+         </li>
+         <li>
+            In the <i>JIT compiler</i> mode, EM does the following: 
+            <ul>
+               <li>
+                  Instantiates and configures profile collectors
+               </li>
+               <li>
+                  Configures execution engines to enable using profile
+                  collectors as required
+               </li>
+               <li>
+                  Defines the (re)compilation and dynamic optimization logic
+                  using method profiles
+               </li>
+            </ul>
+         </li>
+      </ul>
+      <p>
+         For a definition of the role of EM in the architecture of DRLVM [<a
+         href="#DRLDevGuide">3</a>].
+      </p>
+      <h2>
+         <a id="Key_features" name="Key_features"></a>2.1 Key Features
+      </h2>
+      <p>
+         The key features of the DRL execution manager include the following:
+      </p>
+      <ul>
+         <li>
+            Clear interfaces to plug in new profile collectors and execution
+            engines
+         </li>
+         <li>
+            An i nterface for method profile access
+         </li>
+         <li>
+            Support for time-based sampling profile collectors
+</li>
+         <li>
+            Configurable selection of an execution engine per method by using
+            method filters
+         </li>
+         <li>
+            Configurable recompilation scenarios
+         </li>
+      </ul>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="Architecture" name="Architecture"></a>3. Architecture
+      </h1>
+      <p>
+         This section of the document describes the internal architecture of
+         the execution manager and its external connections with other
+         components of the virtual machine. In brief, EM communicates with the
+         VM core and with execution engine(s) at the VM level. Internally, the
+         execution manager has a profile collector as its subcomponent, and
+         uses internal functional interfaces to communicate with it, as
+         described in section 3.2 <a href="#PC">Profile Collector</a>.
+      </p>
+      <h2>
+         <a id="EM" name="EM"></a>3.1 Execution Manager in VM
+      </h2>
+      <p>
+         The VM core component sends requests to EM to execute methods. VM
+         passes a method handle and parameters to the execution manager through
+         the <code><a href="#EM_VM">EM_VM</a></code> interface. EM selects the
+         engine for compiling the method and sends a compilation request to VM
+         to compile the method with the selected engine.
+      </p>
+      <p>
+         Instantiating and configuring JIT compilers goes through
+         the <code>JIT_EM</code> interface [<a href="#DRLDevGuide">3</a>]. In
+         its turn, the execution manager exports the <code>EM_JIT</code>
+         interface for accessing method profiles and profile collectors.
+         Specifically, the <a href="#EM_JIT">EM_JIT</a> interface consists of
+         two parts:
+      </p>
+      <ul>
+         <li>
+            The <i>profile access interface</i> is the generic interface for
+            accessing method profiles. Via this interface, a JIT compiler can
+            get basic profile properties, such as the profile type.
+         </li>
+         <li>
+            The <i>custom profile collector interface</i> is a custom extension
+            of the profile access interface. This interface provides access to
+            method profiles of a specific type.
+         </li>
+      </ul>
+      <p>
+         These interface interactions are shown in Figure 1 and described in
+         detail in section 5 <a href="#Interfaces">Public Interfaces</a>.
+      </p>
+      <p style="text-align: center">
+         <img border="0" src="images/EM_interfaces.gif"
+         alt="Interaction between Execution Manager, JIT, and VM" />
+      </p>
+      <p class="special">
+         Figure 1. Execution Manager Interfaces
+      </p>
+      <p class="notetext">
+         In the figure, several blocks of the same type identify instances of
+         the same component, as in the case with profile collectors and JIT
+         compilers. For details on interfaces displayed in the figure, see
+         section <a href="#Interfaces">Public Interfaces</a>.
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h2>
+         <a id="PC" name="PC"></a>3.2 Profile Collector
+      </h2>
+      <p>
+         The <i>profile collector</i> (PC) is a subcomponent of the execution
+         manager that collects method profiles for Java<a href="#*">*</a>
+         methods compiled by a JIT or executed by the interpreter. DRL EM
+         instantiates and configures profile collectors according to the
+         settings of its configuration file.
+      </p>
+      <p>
+         The profile collector can collect method profiles only for the methods
+         compiled by a single JIT. To collect the same type of profile
+         information for methods compiled by different JIT compilers, the
+         execution manager uses different PC instances.
+      </p>
+      <p>
+         After PC collects a method profile, subsequent JIT compilers in the
+           <a href="#Recompilation">recompilation chain</a> can re-use this profile. A JIT can only use a
+         collected method profile if it is explicitly indicated in the EM
+         configuration file [<a href="#DRLEmGuide">4</a>]. If a JIT compiler is
+         expected to use a method profile, the execution manager defines the
+         <i>JIT role</i>, that is, configures the JIT compiler to generate or
+         to use a specific profile in the file <code>include/open/em.h</code>
+         using the following format:
+      </p>
+<pre>
+enum EM_JIT_PC_Role {
+
+ EM_JIT_PROFILE_ROLE_GEN=1,
+
+ EM_JIT_PROFILE_ROLE_USE=2
+
+ };
+</pre>
+      <p>
+         With this model, instances of the compiler work independently of each
+         other at run time. A JIT compiler can always use a PC handle to access
+         the profile data that is assigned to be collected or used by this JIT
+         compiler.<br />
+          The profile collector does not trigger method recompilation. Instead,
+         PC notifies the execution manager that a method profile is ready. To
+         detect profile readiness, PC uses its own heuristics and configuration
+         settings passed from EM during profile collector initialization. When
+         the profile is ready, EM initiates recompilation of the method.
+      </p>
+      <h3>
+         <a id="EM_PC" name="EM_PC"></a>3.2.1 EM_PC interface
+      </h3>
+      <p>
+         The <code>EM_PC</code> interface handles interaction between the
+         execution manager and the profile collectors and consists of the
+         following function groups:
+      </p>
+      <ul>
+         <li>
+            The <i>time-based sampling support</i> interface (TBS) enables EM
+            to register time-based sampling callbacks and to configure settings
+            of method profiles. The profile collector checks readiness of
+            method profiles by using this interface.
+         </li>
+         <li>
+            The <i>profile-related events</i> interface enables PC to report to
+            the execution manager when a method profile is ready.
+         </li>
+      </ul>
+      <p>
+         For details on the <code>EM_PC</code> interface functions, generate
+         from the <code>include/open/em_profile_access.h</code> header file by
+         using Doxygen.
+      </p>
+      <h3>
+         <a id="PlugIn_PC" name="PlugIn_PC"></a>3.2.2 How to Plug in a Custom
+         PC
+      </h3>
+      <p>
+         Currently, EM supports only statically linked profile collectors. To
+         add a new profile collector, you must add the profile
+         collector&rsquo;s code to the EM package, add the methods specific for
+         the new profile collector to the profile access interface and enable
+         EM to create the new profile collector. Follow this step-by-step
+         instruction to plug in your new profile collector into the current EM
+         package.
+      </p>
+      <ol>
+         <li>
+            Extend the <code>ProfileCollector</code> abstract class and define
+            all pure virtual methods. This class is in the
+            <code>em/src/DrlProfileCollectionFramework.h</code> file.
+         </li>
+         <li>
+            Add methods specific for the new profile collector to the
+            <code>include/open/em_profile_access.h</code> file and register its
+            new <code>EM_PCTYPE</code>.
+         </li>
+         <li>
+            Adjust <code>em/src/DrlEMImpl.cpp::initProfileAccess()</code> to
+            initialize access methods to the new profiler type with valid
+            function pointers.
+         </li>
+         <li>
+            Adjust <code>em/src/DrlEMImpl.cpp::createProfileCollector()</code>
+            factory method to create the new profile collector type if its name
+            is specified in the configuration file.
+         </li>
+      </ol>
+      <p>
+         As an example, you can use one of the two profiler collectors in the
+         current EM package: the entry-backedge profile collector and the edge
+         profile collector. The entry-backedge profile collector can work in
+         the synchronous and asynchronous modes. The synchronous mode means
+         that the profile is checked for readiness in a user Java<a
+         href="#*">*</a> thread during code execution. The asynchronous mode
+         means that the profile readiness is checked and hot methods are
+         detected and recompiled in a separate provider thread managed by EM.
+      </p>
+      <h2>
+         <a id="Profiler_thread" name="Profiler_thread"></a>3.3 Profiler Thread
+      </h2>
+      <p>
+         To enable a profile collector to check profile readiness
+         asynchronously, the execution manager requires a special thread
+         created by the VM core. This thread must be an ordinary Java<a
+         href="#*">*</a> thread because method compilation may result in
+         execution of JIT-compiled code during class resolution or side-effect
+         analysis.
+      </p>
+      <p>
+         After loading all core classes and before executing the method
+         <code>main()</code>, the execution manager starts the recompilation
+         thread. EM configures this thread to call back in a specified period
+         of time. During this callback, the execution manger requests profile
+         collectors to check profiles and runs method recompilation as
+         required.
+      </p>
+      <p>
+         The execution manager only starts the profiler thread when the profile
+         collector requires asynchronous support. For example, no profiler
+         thread support is needed when the profile check goes in parallel with
+         code execution or is done by an external event from the PMU driver.
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="Processes" name="Processes"></a>4. Processes
+      </h1>
+      <h2>
+         <a id="Recompilation" name="Recompilation"></a>4.1 Recompilation
+      </h2>
+      <p>
+         Optimization of compiled code may result in recompilation of Java<a
+         href="#*">*</a> code. The execution manager determines the
+         recompilation logic using <i>recompilation chains</i> that can connect
+         multiple profile-compatible JIT compilers into a single recompilation
+         queue. Recompilation chains are static and defined in the EM
+         configuration file [<a href="#DRLEmGuide">4</a>]. A method is
+         permanently matched against one recompilation chain.
+      </p>
+      <p>
+         To compile a method for the first time, the execution manager calls
+         the first JIT compiler in the chain. After profiling information about
+         the method is collected, the next JIT in the chain is ready to
+         recompile the method applying more aggressive optimizations. The data
+         from the method profile can be used during method recompilation to
+         adjust custom optimization parameters.
+      </p>
+      <p>
+         Recompilation chains can be useful in different modes of VM operation,
+         as illustrated in the examples below.
+      </p>
+      <p class="example">
+         Example 1. Custom profiling mode
+      </p>
+      <p class="exampletext">
+         If a compiler JIT1 does the initial method compilation with
+         instrumentation enabled and a compiler JIT2 does the recompilation,
+         you can avoid recompilation by redirecting certain methods to be
+         initially compiled by a third compiler JIT3 without instrumentation.
+         In this case, EM creates two compilation chains: the first chain
+         contains JIT1 and JIT2, and the second chain contains JIT3. To select
+         the chain for compiling a method, use method filters.<br />
+          You may want to avoid instrumentation for class initializers or
+         methods that already have a persistent profile collected during the
+         previous session.
+      </p>
+      <p class="example">
+         Example 2. Bug-fixing mode
+      </p>
+      <p class="exampletext">
+         A stable compiler JIT1 is used for compiling all methods except
+         problem ones, and another one JIT2 compiles problem methods
+         only.<br />
+          This mode can be useful for localizing specific problems in a new
+         JIT.
+      </p>
+      <p>
+         If multiple recompilation chains co-exist at run time, EM selects the
+         appropriate recompilation chain to initially compile a method. Method
+         filters associated with chains can configure the execution manager to
+         use a specific chain for method compilation. Method filters can
+         identify a method by its name, class name, signature or ordinal
+         compilation number.
+      </p>
+      <h2>
+         <a id="Execution_Management" name="Execution_Management"></a>4.2
+         Execution Management
+      </h2>
+      <p>
+         This section describes how the execution manager is involved in DRLVM
+         operation.
+      </p>
+      <h3>
+         <a id="Instantiation" name="Instantiation"></a>4.2.1 Instantiation
+      </h3>
+      <p>
+         Before loading an execution engine, the VM core creates an instance of
+         the execution manager. This is the only instance used during the VM
+         lifetime. Depending on its configuration, the execution manager
+         initializes execution engines and profile collectors.
+      </p>
+      <p>
+         During JIT compiler instantiation, the execution manager:
+      </p>
+      <ol>
+         <li>
+            Provides the JIT with a name and registers a run-time JIT handle
+            for it. The JIT can now use this name to distinguish its persistent
+            settings from settings of other execution engines. A compiler can
+            also use the handle to distinguish itself from other JIT compilers
+            at run time.
+         </li>
+         <li>
+            Configures the JIT to generate a new profile or to use an existing
+            profile via the <a href="#EM_JIT">profile access interface</a>. 
+            <p>
+               When the JIT is configured to use or generate a profile, it
+               checks the compatibility with the given profile type. If the JIT
+               does not support the given profile type, it can reject profile
+               generation or usage.
+            </p>
+         </li>
+      </ol>
+      <h3>
+         <a id="Method_Execution" name="Method_Execution"></a>4.2.2 Method
+         Execution
+      </h3>
+      <p>
+         In DRLVM, execution of a method goes as follows:
+      </p>
+      <ol>
+         <li>
+            VM calls the execution manager to execute a method.
+         </li>
+         <li>
+            EM uses method filters to select the appropriate recompilation
+            chain for each method.
+         </li>
+         <li>
+            EM instructs the first JIT in the chain to compile a method.
+         </li>
+         <li>
+            After the method is compiled, VM proceeds with its execution.
+         </li>
+         <li>
+            For hot methods, EM initiates recompilation by the next JIT in the
+            compilation chain.
+         </li>
+      </ol>
+      <p class="note">
+         Note
+      </p>
+      <p class="notetext">
+         A method is <i>hot</i> when a profile associated with it satisfies
+         specific parameters in the PC configuration settings. For example, for
+         an entry and back-edge profile collector, these parameters are the
+         entry and back-edge counters' limits. When a counter value reaches the
+         limit, the method becomes hot.
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="Interfaces" name="Interfaces"></a>5. Public Interfaces
+      </h1>
+      <p>
+         The execution manager interacts with the virtual machine and JIT
+         compilers by using specific interfaces. In addition to these external
+         interfaces, EM uses its internal interface to communicate with profile
+         collectors. This section describes the functional interfaces that the
+         execution manager exports for the VM core and the JIT compilers.
+      </p>
+      <h2>
+         <a id="EM_VM" name="EM_VM"></a>5.1 EM_VM Interface
+      </h2>
+      <p>
+         The execution manager exports this interface to provide VM with method
+         compilation and execution functions. For a detailed description of the
+         interface, generate documentation from the <code>em_vm.h</code> header
+         file by using Doxygen. For a description of the <code>VM_EM</code>
+         interface made up of functions that the virtual machine exports for
+         the execution manager, see the <em>DRLVM Developer's Guide</em> [<a
+         href="#DRLDevGuide">3</a>].
+      </p>
+      <h2>
+         <a id="EM_JIT" name="EM_JIT"></a>5.2 EM_JIT Interface
+      </h2>
+      <p>
+         The execution manager exports this interface to enable JIT compilers
+         to access method profiles. For details on the interface functions,
+         generate reference documentation from files
+         <code>em_profile_access.h</code> and <code>ee_em_intf.h</code> by
+         using Doxygen. For a description of the <code>JIT_EM</code> interface
+         made up of functions that the virtual machine exports for the
+         execution manager, see the <em>DRLVM Developer's Guide</em> [<a
+         href="#DRLDevGuide">3</a>].
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="References" name="References"></a>6. References
+      </h1>
+      <p>
+         [<a id="DynOpt_ref" name="DynOpt_ref"></a>1] Toshio Suganuma, Toshiaki
+         Yasue, A dynamic optimization framework for a Java just-in-time
+         compiler, <a href="http://portal.acm.org/citation.cfm?id=504296"
+         target="_blank">http://portal.acm.org/citation.cfm?id=504296</a>
+      </p>
+      <p>
+         [<a id="SurveyOpt_ref" name="SurveyOpt_ref"></a>2] A Survey of
+         Adaptive Optimization in Virtual Machines (2004) Matthew Arnold,
+         Stephen J. Fink, David Grove, Michael Hind, Peter F. Sweeney <a
+         href="http://citeseer.ist.psu.edu/arnold04survey.html"
+         target="_blank">http://citeseer.ist.psu.edu/arnold04survey.html</a>
+      </p>
+      <p>
+         [<a name="DRLDevGuide" id="DRLDevGuide"></a>3] DRLVM Developer's
+         Guide, <a
+         href="http://incubator.apache.org/harmony/subcomponents/drlvm/index.html"
+          target="_blank">http://incubator.apache.org/harmony/subcomponents/drlvm/index.html</a>
+      </p>
+      <p>
+         [<a name="DRLEmGuide" id="DRLEmGuide"></a>4] Guide to Execution
+         Manager Configuration, <a
+         href="http://incubator.apache.org/harmony/subcomponents/drlvm/emguide.html"
+          target="_blank">http://incubator.apache.org/harmony/subcomponents/drlvm/emguide.html</a>
+      </p>
+      <p>
+          
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <p>
+         (C) Copyright 2006 Intel Corporation
+      </p>
+      <p>
+         <a id="*" name="*">*</a> Other brands and names are the property of
+         their respective owners.
+      </p>
+   </body>
+</html>
+
+</div>
+                                        </td>
+                </tr>
+
+                <!-- FOOTER -->
+                <tr><td colspan="2">
+                    <hr noshade="" size="1"/>
+                </td></tr>
+                <tr><td colspan="2">
+                    <div class="special"><em>
+                    Copyright &#169; 2003-2006, The Apache Software Foundation
+                    </em></div>
+                </td></tr>
+            </table>
+        </body>
+    </html>
+<!-- end the processing -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: incubator/harmony/standard/site/docs/subcomponents/drlvm/images/EM_interfaces.gif
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/docs/subcomponents/drlvm/images/EM_interfaces.gif?view=auto&rev=448929
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/standard/site/docs/subcomponents/drlvm/images/EM_interfaces.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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?view=diff&rev=448929&r1=448928&r2=448929
==============================================================================
--- incubator/harmony/standard/site/docs/subcomponents/drlvm/index.html (original)
+++ incubator/harmony/standard/site/docs/subcomponents/drlvm/index.html Fri Sep 22 06:48:22 2006
@@ -255,6 +255,10 @@
               Guide to debugging VM and Jitrino.JET source code covering
               basic actions and some useful tips
             </li>
+            <li> <a href="EM.html">Execution Manager Component Description</a>
+              <br />
+                Detailed description of the Execution Manager current implementation<br />
+            </li>
             <li>
               <a href="emguide.html">Configuring Execution Manager</a>
               <br />

Added: incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.html
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.html?view=auto&rev=448929
==============================================================================
--- incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.html (added)
+++ incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.html Fri Sep 22 06:48:22 2006
@@ -0,0 +1,660 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+   <head>
+      <meta http-equiv="Content-Type"
+      content="text/html; charset=windows-1251" />
+      <link rel="Stylesheet" type="text/css" href="site.css" />
+      <title>
+         DRLVM Execution Manager
+      </title>
+   </head>
+   <body>
+      <h1>
+         <a id="top" name="top"></a>Execution Manager Component Description
+      </h1>
+      <p class="TOCHeading">
+         <a href="#About_this_document">1. About this Document</a>
+      </p>
+      <p class="TOC">
+         <a href="#Purpose">1.1 Purpose</a>
+      </p>
+      <p class="TOC">
+         <a href="#Intended_Audience">1.2 Intended Audience</a>
+      </p>
+      <p class="TOC">
+         <a href="#Using_this_document">1.3 Using This Document</a>
+      </p>
+      <p class="TOC">
+         <a href="#Conventions_and_Symbols">1.4 Conventions and Symbols</a>
+      </p>
+      <p class="TOCHeading">
+         <a href="#Overview">2. Overview</a>
+      </p>
+      <p class="TOC">
+         <a href="#Key_features">2.1 Key Features</a>
+      </p>
+      <p class="TOCHeading">
+         <a href="#Architecture">3. Architecture</a>
+      </p>
+      <p class="TOC">
+         <a href="#EM">3.1 Execution Manager in VM</a>
+      </p>
+      <p class="TOC">
+         <a href="#PC">3.2 Profile Collector</a>
+      </p>
+      <blockquote>
+         <p class="TOC">
+            <a href="#EM_PC">3.2.1 EM_PC Interface</a>
+         </p>
+         <p class="TOC">
+            <a href="#PlugIn_PC">3.2.2 How to plug in a custom PC</a>
+         </p>
+      </blockquote>
+      <p class="TOC">
+         <a href="#Profiler_thread">3.3 Profiler Thread</a>
+      </p>
+      <p class="TOCHeading">
+         <a href="#Processes">4. Processes</a>
+      </p>
+      <p class="TOC">
+         <a href="#Recompilation">4.1 Recompilation</a>
+      </p>
+      <p class="TOC">
+         <a href="#Execution_Management">4.2 Execution Management</a>
+      </p>
+      <blockquote>
+         <p class="TOC">
+            <a href="#Instantiation">4.2.1 Instantiation</a>
+         </p>
+         <p class="TOC">
+            <a href="#Method_Execution">4.2.2 Method Execution</a>
+         </p>
+      </blockquote>
+      <p class="TOCHeading">
+         <a href="#Interfaces">5. Public Interfaces</a>
+      </p>
+      <p class="TOC">
+         <a href="#EM_VM">5.1 EM_VM Interface</a>
+      </p>
+      <p class="TOC">
+         <a href="#EM_JIT">5.2 EM_JIT Interface</a>
+      </p>
+      <p class="TOCHeading">
+         <a href="#References">6. References</a>
+      </p>
+      <h1>
+         <a id="About_this_document" name="About_this_document"></a>1. About
+         this document
+      </h1>
+      <h2>
+         <a id="Purpose" name="Purpose"></a>1.1 Purpose
+      </h2>
+      <p>
+         This document describes the internal structure of the execution
+         manager component deployed with the virtual machine as part of the DRL
+         (Dynamic Runtime Layer) initiative. The description covers the
+         internal design of the execution manager and its interaction with
+         other DRLVM components. The document is targeted at DRLVM developers
+         with special interest in code execution algorithms. The information
+         can be helpful for future development of DRL execution management
+         techniques and can serve as an example for those implementing an
+         execution manager from scratch.
+      </p>
+      <p>
+         In this document, you can find implementation-specific details of the
+         execution manager. General information on the EM role in overall
+         virtual machine design and VM-level requirements are out of scope of
+         this document and are covered in the <i>DRLVM Developer's Guide</i>
+         [<a href="#DRLDevGuide">3</a>] .
+      </p>
+      <h2>
+         <a id="Intended_Audience" name="Intended_Audience"></a>1.2 Intended
+         Audience
+      </h2>
+      <p>
+         The target audience for the document includes a wide community of
+         engineers interested in using DRLVM and in working further with the
+         product to contribute to its development. The document assumes that
+         readers understand the concepts of dynamic optimizations,
+         recompilation and profile collection.
+      </p>
+      <h2>
+         <a id="Using_this_document" name="Using_this_document"></a>1.3 Using
+         This Document
+      </h2>
+      <p>
+         The DRLVM execution manager description has the following major
+         sections:
+      </p>
+      <ul>
+         <li>
+            <a href="#Overview">Overview</a>: a definition of the execution
+            manager component and its key features
+         </li>
+         <li>
+            <a href="#Architecture">Architecture</a>: a description of EM
+            internal architecture, its profile collector subcomponent and the
+            interfaces it uses, as well as other implementation-specific data
+         </li>
+         <li>
+            <a href="#Processes">Processes</a>: an overview and a step-by-step
+            description of dynamic recompilation, the central EM process
+         </li>
+         <li>
+            <a href="#Interfaces">Public interfaces</a>: a definition of major
+            functional groups that the execution manager exports for
+            interaction with other components <br />
+            <br />
+         </li>
+      </ul>
+      <h2>
+         <a id="Conventions_and_Symbols" name="Conventions_and_Symbols"></a>1.4
+         Conventions and Symbols
+      </h2>
+      <p>
+         This document uses the <a href="conventions.htm">unified
+         conventions</a> for the DRL documentation kit.
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="Overview" name="Overview"></a>2. Overview
+      </h1>
+      <p>
+         The execution manager is responsible for selecting execution engines
+         (a JIT compiler or an interpreter) for method compilation and
+         execution at run time. The execution manager (EM) takes input from its
+         configuration settings and run-time profile information. The DRL
+         execution manager also uses <a href="#PC">profile collectors</a> to
+         gather run-time data associated with method code and the just-in-time
+         (JIT) compiler that produced the code. The execution manager, profile
+         collectors, and execution engines plugged in VM make up the <i>dynamic
+         optimization</i> subsystem [<a href="#DynOpt_ref">1</a>], [<a
+         href="#SurveyOpt_ref">2</a>].
+      </p>
+      <p>
+         The execution manager instantiates execution engines depending on its
+         configuration [<a href="#DRLEmGuide">4</a>] and the current VM mode.
+      </p>
+      <ul>
+         <li>
+            In the <i>interpreter</i> mode, EM delegates execution of all
+            methods to interpreter
+         </li>
+         <li>
+            In the <i>JIT compiler</i> mode, EM does the following: 
+            <ul>
+               <li>
+                  Instantiates and configures profile collectors
+               </li>
+               <li>
+                  Configures execution engines to enable using profile
+                  collectors as required
+               </li>
+               <li>
+                  Defines the (re)compilation and dynamic optimization logic
+                  using method profiles
+               </li>
+            </ul>
+         </li>
+      </ul>
+      <p>
+         For a definition of the role of EM in the architecture of DRLVM [<a
+         href="#DRLDevGuide">3</a>].
+      </p>
+      <h2>
+         <a id="Key_features" name="Key_features"></a>2.1 Key Features
+      </h2>
+      <p>
+         The key features of the DRL execution manager include the following:
+      </p>
+      <ul>
+         <li>
+            Clear interfaces to plug in new profile collectors and execution
+            engines
+         </li>
+         <li>
+            An i nterface for method profile access
+         </li>
+         <li>
+            Support for time-based sampling profile collectors
+</li>
+         <li>
+            Configurable selection of an execution engine per method by using
+            method filters
+         </li>
+         <li>
+            Configurable recompilation scenarios
+         </li>
+      </ul>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="Architecture" name="Architecture"></a>3. Architecture
+      </h1>
+      <p>
+         This section of the document describes the internal architecture of
+         the execution manager and its external connections with other
+         components of the virtual machine. In brief, EM communicates with the
+         VM core and with execution engine(s) at the VM level. Internally, the
+         execution manager has a profile collector as its subcomponent, and
+         uses internal functional interfaces to communicate with it, as
+         described in section 3.2 <a href="#PC">Profile Collector</a>.
+      </p>
+      <h2>
+         <a id="EM" name="EM"></a>3.1 Execution Manager in VM
+      </h2>
+      <p>
+         The VM core component sends requests to EM to execute methods. VM
+         passes a method handle and parameters to the execution manager through
+         the <code><a href="#EM_VM">EM_VM</a></code> interface. EM selects the
+         engine for compiling the method and sends a compilation request to VM
+         to compile the method with the selected engine.
+      </p>
+      <p>
+         Instantiating and configuring JIT compilers goes through
+         the <code>JIT_EM</code> interface [<a href="#DRLDevGuide">3</a>]. In
+         its turn, the execution manager exports the <code>EM_JIT</code>
+         interface for accessing method profiles and profile collectors.
+         Specifically, the <a href="#EM_JIT">EM_JIT</a> interface consists of
+         two parts:
+      </p>
+      <ul>
+         <li>
+            The <i>profile access interface</i> is the generic interface for
+            accessing method profiles. Via this interface, a JIT compiler can
+            get basic profile properties, such as the profile type.
+         </li>
+         <li>
+            The <i>custom profile collector interface</i> is a custom extension
+            of the profile access interface. This interface provides access to
+            method profiles of a specific type.
+         </li>
+      </ul>
+      <p>
+         These interface interactions are shown in Figure 1 and described in
+         detail in section 5 <a href="#Interfaces">Public Interfaces</a>.
+      </p>
+      <p style="text-align: center">
+         <img border="0" src="images/EM_interfaces.gif"
+         alt="Interaction between Execution Manager, JIT, and VM" />
+      </p>
+      <p class="special">
+         Figure 1. Execution Manager Interfaces
+      </p>
+      <p class="notetext">
+         In the figure, several blocks of the same type identify instances of
+         the same component, as in the case with profile collectors and JIT
+         compilers. For details on interfaces displayed in the figure, see
+         section <a href="#Interfaces">Public Interfaces</a>.
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h2>
+         <a id="PC" name="PC"></a>3.2 Profile Collector
+      </h2>
+      <p>
+         The <i>profile collector</i> (PC) is a subcomponent of the execution
+         manager that collects method profiles for Java<a href="#*">*</a>
+         methods compiled by a JIT or executed by the interpreter. DRL EM
+         instantiates and configures profile collectors according to the
+         settings of its configuration file.
+      </p>
+      <p>
+         The profile collector can collect method profiles only for the methods
+         compiled by a single JIT. To collect the same type of profile
+         information for methods compiled by different JIT compilers, the
+         execution manager uses different PC instances.
+      </p>
+      <p>
+         After PC collects a method profile, subsequent JIT compilers in the
+           <a href="#Recompilation">recompilation chain</a> can re-use this profile. A JIT can only use a
+         collected method profile if it is explicitly indicated in the EM
+         configuration file [<a href="#DRLEmGuide">4</a>]. If a JIT compiler is
+         expected to use a method profile, the execution manager defines the
+         <i>JIT role</i>, that is, configures the JIT compiler to generate or
+         to use a specific profile in the file <code>include/open/em.h</code>
+         using the following format:
+      </p>
+<pre>
+enum EM_JIT_PC_Role {
+
+ EM_JIT_PROFILE_ROLE_GEN=1,
+
+ EM_JIT_PROFILE_ROLE_USE=2
+
+ };
+</pre>
+      <p>
+         With this model, instances of the compiler work independently of each
+         other at run time. A JIT compiler can always use a PC handle to access
+         the profile data that is assigned to be collected or used by this JIT
+         compiler.<br />
+          The profile collector does not trigger method recompilation. Instead,
+         PC notifies the execution manager that a method profile is ready. To
+         detect profile readiness, PC uses its own heuristics and configuration
+         settings passed from EM during profile collector initialization. When
+         the profile is ready, EM initiates recompilation of the method.
+      </p>
+      <h3>
+         <a id="EM_PC" name="EM_PC"></a>3.2.1 EM_PC interface
+      </h3>
+      <p>
+         The <code>EM_PC</code> interface handles interaction between the
+         execution manager and the profile collectors and consists of the
+         following function groups:
+      </p>
+      <ul>
+         <li>
+            The <i>time-based sampling support</i> interface (TBS) enables EM
+            to register time-based sampling callbacks and to configure settings
+            of method profiles. The profile collector checks readiness of
+            method profiles by using this interface.
+         </li>
+         <li>
+            The <i>profile-related events</i> interface enables PC to report to
+            the execution manager when a method profile is ready.
+         </li>
+      </ul>
+      <p>
+         For details on the <code>EM_PC</code> interface functions, generate
+         from the <code>include/open/em_profile_access.h</code> header file by
+         using Doxygen.
+      </p>
+      <h3>
+         <a id="PlugIn_PC" name="PlugIn_PC"></a>3.2.2 How to Plug in a Custom
+         PC
+      </h3>
+      <p>
+         Currently, EM supports only statically linked profile collectors. To
+         add a new profile collector, you must add the profile
+         collector&rsquo;s code to the EM package, add the methods specific for
+         the new profile collector to the profile access interface and enable
+         EM to create the new profile collector. Follow this step-by-step
+         instruction to plug in your new profile collector into the current EM
+         package.
+      </p>
+      <ol>
+         <li>
+            Extend the <code>ProfileCollector</code> abstract class and define
+            all pure virtual methods. This class is in the
+            <code>em/src/DrlProfileCollectionFramework.h</code> file.
+         </li>
+         <li>
+            Add methods specific for the new profile collector to the
+            <code>include/open/em_profile_access.h</code> file and register its
+            new <code>EM_PCTYPE</code>.
+         </li>
+         <li>
+            Adjust <code>em/src/DrlEMImpl.cpp::initProfileAccess()</code> to
+            initialize access methods to the new profiler type with valid
+            function pointers.
+         </li>
+         <li>
+            Adjust <code>em/src/DrlEMImpl.cpp::createProfileCollector()</code>
+            factory method to create the new profile collector type if its name
+            is specified in the configuration file.
+         </li>
+      </ol>
+      <p>
+         As an example, you can use one of the two profiler collectors in the
+         current EM package: the entry-backedge profile collector and the edge
+         profile collector. The entry-backedge profile collector can work in
+         the synchronous and asynchronous modes. The synchronous mode means
+         that the profile is checked for readiness in a user Java<a
+         href="#*">*</a> thread during code execution. The asynchronous mode
+         means that the profile readiness is checked and hot methods are
+         detected and recompiled in a separate provider thread managed by EM.
+      </p>
+      <h2>
+         <a id="Profiler_thread" name="Profiler_thread"></a>3.3 Profiler Thread
+      </h2>
+      <p>
+         To enable a profile collector to check profile readiness
+         asynchronously, the execution manager requires a special thread
+         created by the VM core. This thread must be an ordinary Java<a
+         href="#*">*</a> thread because method compilation may result in
+         execution of JIT-compiled code during class resolution or side-effect
+         analysis.
+      </p>
+      <p>
+         After loading all core classes and before executing the method
+         <code>main()</code>, the execution manager starts the recompilation
+         thread. EM configures this thread to call back in a specified period
+         of time. During this callback, the execution manger requests profile
+         collectors to check profiles and runs method recompilation as
+         required.
+      </p>
+      <p>
+         The execution manager only starts the profiler thread when the profile
+         collector requires asynchronous support. For example, no profiler
+         thread support is needed when the profile check goes in parallel with
+         code execution or is done by an external event from the PMU driver.
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="Processes" name="Processes"></a>4. Processes
+      </h1>
+      <h2>
+         <a id="Recompilation" name="Recompilation"></a>4.1 Recompilation
+      </h2>
+      <p>
+         Optimization of compiled code may result in recompilation of Java<a
+         href="#*">*</a> code. The execution manager determines the
+         recompilation logic using <i>recompilation chains</i> that can connect
+         multiple profile-compatible JIT compilers into a single recompilation
+         queue. Recompilation chains are static and defined in the EM
+         configuration file [<a href="#DRLEmGuide">4</a>]. A method is
+         permanently matched against one recompilation chain.
+      </p>
+      <p>
+         To compile a method for the first time, the execution manager calls
+         the first JIT compiler in the chain. After profiling information about
+         the method is collected, the next JIT in the chain is ready to
+         recompile the method applying more aggressive optimizations. The data
+         from the method profile can be used during method recompilation to
+         adjust custom optimization parameters.
+      </p>
+      <p>
+         Recompilation chains can be useful in different modes of VM operation,
+         as illustrated in the examples below.
+      </p>
+      <p class="example">
+         Example 1. Custom profiling mode
+      </p>
+      <p class="exampletext">
+         If a compiler JIT1 does the initial method compilation with
+         instrumentation enabled and a compiler JIT2 does the recompilation,
+         you can avoid recompilation by redirecting certain methods to be
+         initially compiled by a third compiler JIT3 without instrumentation.
+         In this case, EM creates two compilation chains: the first chain
+         contains JIT1 and JIT2, and the second chain contains JIT3. To select
+         the chain for compiling a method, use method filters.<br />
+          You may want to avoid instrumentation for class initializers or
+         methods that already have a persistent profile collected during the
+         previous session.
+      </p>
+      <p class="example">
+         Example 2. Bug-fixing mode
+      </p>
+      <p class="exampletext">
+         A stable compiler JIT1 is used for compiling all methods except
+         problem ones, and another one JIT2 compiles problem methods
+         only.<br />
+          This mode can be useful for localizing specific problems in a new
+         JIT.
+      </p>
+      <p>
+         If multiple recompilation chains co-exist at run time, EM selects the
+         appropriate recompilation chain to initially compile a method. Method
+         filters associated with chains can configure the execution manager to
+         use a specific chain for method compilation. Method filters can
+         identify a method by its name, class name, signature or ordinal
+         compilation number.
+      </p>
+      <h2>
+         <a id="Execution_Management" name="Execution_Management"></a>4.2
+         Execution Management
+      </h2>
+      <p>
+         This section describes how the execution manager is involved in DRLVM
+         operation.
+      </p>
+      <h3>
+         <a id="Instantiation" name="Instantiation"></a>4.2.1 Instantiation
+      </h3>
+      <p>
+         Before loading an execution engine, the VM core creates an instance of
+         the execution manager. This is the only instance used during the VM
+         lifetime. Depending on its configuration, the execution manager
+         initializes execution engines and profile collectors.
+      </p>
+      <p>
+         During JIT compiler instantiation, the execution manager:
+      </p>
+      <ol>
+         <li>
+            Provides the JIT with a name and registers a run-time JIT handle
+            for it. The JIT can now use this name to distinguish its persistent
+            settings from settings of other execution engines. A compiler can
+            also use the handle to distinguish itself from other JIT compilers
+            at run time.
+         </li>
+         <li>
+            Configures the JIT to generate a new profile or to use an existing
+            profile via the <a href="#EM_JIT">profile access interface</a>. 
+            <p>
+               When the JIT is configured to use or generate a profile, it
+               checks the compatibility with the given profile type. If the JIT
+               does not support the given profile type, it can reject profile
+               generation or usage.
+            </p>
+         </li>
+      </ol>
+      <h3>
+         <a id="Method_Execution" name="Method_Execution"></a>4.2.2 Method
+         Execution
+      </h3>
+      <p>
+         In DRLVM, execution of a method goes as follows:
+      </p>
+      <ol>
+         <li>
+            VM calls the execution manager to execute a method.
+         </li>
+         <li>
+            EM uses method filters to select the appropriate recompilation
+            chain for each method.
+         </li>
+         <li>
+            EM instructs the first JIT in the chain to compile a method.
+         </li>
+         <li>
+            After the method is compiled, VM proceeds with its execution.
+         </li>
+         <li>
+            For hot methods, EM initiates recompilation by the next JIT in the
+            compilation chain.
+         </li>
+      </ol>
+      <p class="note">
+         Note
+      </p>
+      <p class="notetext">
+         A method is <i>hot</i> when a profile associated with it satisfies
+         specific parameters in the PC configuration settings. For example, for
+         an entry and back-edge profile collector, these parameters are the
+         entry and back-edge counters' limits. When a counter value reaches the
+         limit, the method becomes hot.
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="Interfaces" name="Interfaces"></a>5. Public Interfaces
+      </h1>
+      <p>
+         The execution manager interacts with the virtual machine and JIT
+         compilers by using specific interfaces. In addition to these external
+         interfaces, EM uses its internal interface to communicate with profile
+         collectors. This section describes the functional interfaces that the
+         execution manager exports for the VM core and the JIT compilers.
+      </p>
+      <h2>
+         <a id="EM_VM" name="EM_VM"></a>5.1 EM_VM Interface
+      </h2>
+      <p>
+         The execution manager exports this interface to provide VM with method
+         compilation and execution functions. For a detailed description of the
+         interface, generate documentation from the <code>em_vm.h</code> header
+         file by using Doxygen. For a description of the <code>VM_EM</code>
+         interface made up of functions that the virtual machine exports for
+         the execution manager, see the <em>DRLVM Developer's Guide</em> [<a
+         href="#DRLDevGuide">3</a>].
+      </p>
+      <h2>
+         <a id="EM_JIT" name="EM_JIT"></a>5.2 EM_JIT Interface
+      </h2>
+      <p>
+         The execution manager exports this interface to enable JIT compilers
+         to access method profiles. For details on the interface functions,
+         generate reference documentation from files
+         <code>em_profile_access.h</code> and <code>ee_em_intf.h</code> by
+         using Doxygen. For a description of the <code>JIT_EM</code> interface
+         made up of functions that the virtual machine exports for the
+         execution manager, see the <em>DRLVM Developer's Guide</em> [<a
+         href="#DRLDevGuide">3</a>].
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <h1>
+         <a id="References" name="References"></a>6. References
+      </h1>
+      <p>
+         [<a id="DynOpt_ref" name="DynOpt_ref"></a>1] Toshio Suganuma, Toshiaki
+         Yasue, A dynamic optimization framework for a Java just-in-time
+         compiler, <a href="http://portal.acm.org/citation.cfm?id=504296"
+         target="_blank">http://portal.acm.org/citation.cfm?id=504296</a>
+      </p>
+      <p>
+         [<a id="SurveyOpt_ref" name="SurveyOpt_ref"></a>2] A Survey of
+         Adaptive Optimization in Virtual Machines (2004) Matthew Arnold,
+         Stephen J. Fink, David Grove, Michael Hind, Peter F. Sweeney <a
+         href="http://citeseer.ist.psu.edu/arnold04survey.html"
+         target="_blank">http://citeseer.ist.psu.edu/arnold04survey.html</a>
+      </p>
+      <p>
+         [<a name="DRLDevGuide" id="DRLDevGuide"></a>3] DRLVM Developer's
+         Guide, <a
+         href="http://incubator.apache.org/harmony/subcomponents/drlvm/index.html"
+          target="_blank">http://incubator.apache.org/harmony/subcomponents/drlvm/index.html</a>
+      </p>
+      <p>
+         [<a name="DRLEmGuide" id="DRLEmGuide"></a>4] Guide to Execution
+         Manager Configuration, <a
+         href="http://incubator.apache.org/harmony/subcomponents/drlvm/emguide.html"
+          target="_blank">http://incubator.apache.org/harmony/subcomponents/drlvm/emguide.html</a>
+      </p>
+      <p>
+          
+      </p>
+      <p class="backtotop">
+         <a href="#top">Back to Top</a>
+      </p>
+      <p>
+         (C) Copyright 2006 Intel Corporation
+      </p>
+      <p>
+         <a id="*" name="*">*</a> Other brands and names are the property of
+         their respective owners.
+      </p>
+   </body>
+</html>
+

Added: incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.xml?view=auto&rev=448929
==============================================================================
--- incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.xml (added)
+++ incubator/harmony/standard/site/xdocs/subcomponents/drlvm/EM.xml Fri Sep 22 06:48:22 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+    Copyright 2005-2006 The Apache Software Foundation or its licensors, as applicable.
+
+    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.
+
+-->
+
+<document>
+
+  <properties>
+    <title>Thread Manager</title>
+    <author email="harmony-dev@incubator.apache.org">Harmony Documentation Team</author>
+
+  </properties>
+
+  <body>
+    <docinclude name="subcomponents/drlvm/EM.html"/>
+  </body>
+</document>

Added: incubator/harmony/standard/site/xdocs/subcomponents/drlvm/images/EM_interfaces.gif
URL: http://svn.apache.org/viewvc/incubator/harmony/standard/site/xdocs/subcomponents/drlvm/images/EM_interfaces.gif?view=auto&rev=448929
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/standard/site/xdocs/subcomponents/drlvm/images/EM_interfaces.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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?view=diff&rev=448929&r1=448928&r2=448929
==============================================================================
--- incubator/harmony/standard/site/xdocs/subcomponents/drlvm/index.xml (original)
+++ incubator/harmony/standard/site/xdocs/subcomponents/drlvm/index.xml Fri Sep 22 06:48:22 2006
@@ -67,6 +67,10 @@
               Guide to debugging VM and Jitrino.JET source code covering
               basic actions and some useful tips
             </li>
+            <li> <a href="EM.html">Execution Manager Component Description</a>
+              <br/>
+                Detailed description of the Execution Manager current implementation<br/>
+            </li>
             <li>
               <a href="emguide.html">Configuring Execution Manager</a>
               <br />



Mime
View raw message