harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r535532 [9/11] - in /harmony/standard/site: docs/ docs/documentation/ docs/subcomponents/buildtest/ docs/subcomponents/classlibrary/ docs/subcomponents/drlvm/ docs/subcomponents/jchevm/ docs/subcomponents/stresstest/ xdocs/stylesheets/
Date Sat, 05 May 2007 14:37:21 GMT
Propchange: harmony/standard/site/docs/subcomponents/drlvm/JIT_PMF.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/standard/site/docs/subcomponents/drlvm/JVMTI-PopFrame.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/subcomponents/drlvm/JVMTI-PopFrame.html?view=diff&rev=535532&r1=535531&r2=535532
==============================================================================
--- harmony/standard/site/docs/subcomponents/drlvm/JVMTI-PopFrame.html (original)
+++ harmony/standard/site/docs/subcomponents/drlvm/JVMTI-PopFrame.html Sat May  5 07:37:18 2007
@@ -1,538 +1,538 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You 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="dev@harmony.apache.org">
-            
-           
-            
-            
-            
-            
-            
-            <title>Apache Harmony - JVMTI Implementation of Pop Frame</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://harmony.apache.org/"><img  src="../../images/harmony-logo-new.png" alt="Apache Harmony" /></a>
-</td>
-</td>
-                    </td></tr></table>
-                    </td>
-                    <td align='RIGHT'>
-                    <a href="http://www.apachecon.com/2007/EU/index.html">
-                    <img src="http://www.apache.org/ads/ApacheCon/2007-europe-234x60.png"
-                    	alt="ApacheCon Europe 2007" /></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/2007-europe-125x125.png"
-                             alt="ApacheCon Europe 2007" />
-                    </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="http://apache.org">ASF</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../contribution_policy.html">Contribution Policy</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../downloads.html">Downloads</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../faq.html">FAQ</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">Who we are</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../mailing.html">Mailing Lists</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="http://issues.apache.org/jira/browse/HARMONY">Bug Tracker</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../related.html">Other Projects</a>
-</li>
-           
-                        
-        
-        </ul>
-            <p class="menuItem"><strong>Development</strong></p>
-        <ul>
-                    <li class="menuItem">    <a href="../../svn.html">Source Code</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../quickhelp_contributors.html">Getting Started</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../roadmap.html">Project Roadmap</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../issue_resolution_guideline.html">Resolution Guideline</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../performance.html">Performance</a>
-</li>
-           
-                        
-        
-        </ul>
-            <p class="menuItem"><strong>Documentation</strong></p>
-        <ul>
-                    <li class="menuItem">    <a href="../../sitemap.html">Sitemap</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="http://wiki.apache.org/harmony">Wiki</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../hdk.html">HDK</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../subcomponents/drlvm/index.html">DRLVM</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../subcomponents/classlibrary/index.html">Class Library</a>
-</li>
-           
-                        
-                    <li class="menuItem">    <a href="../../subcomponents/buildtest/index.html">Build-test Framework</a>
-</li>
-           
-                        
-        
-        </ul>
-                        </td>
-                    <td width="80%" valign="top"><a name="top"></a>
-                                                                    <h1>
-      <a name="JVMTI Pop Frame">JVMTI Pop Frame</a>
-    </h1>
-                        <ol id="TOC">
-              <li><a href="#About This Document">About This Document</a></li>
-              <li><a href="#Introduction">Introduction</a></li>
-              <li><a href="#How to Pop a Frame">How to Pop a Frame</a></li>
-              <li><a href="#Implementation Specifics">Implementation Specifics</a></li>
-              <li><a href="#Related Information">Related Information</a></li>
-          </ol>
-                                    
-    <h2>
-        <a name="About This Document">About This Document</a>
-    </h2>
-      
-                        <p>
-            Here is a description of how popping a frame is currently
-            implemented in the DRLVM tool interface (JVMTI). For a
-            definition of the pop frame functionality, consult the JVMTI
-            specification [<a href="#JVMTISpec">1</a>]. For generic
-            information on JVMTI in the DRL virtual machine and for definition
-            of related terms, see the <a href="developers_guide.html" title="DRLVM Developer's Guide">developer's
-            guide</a>.
-         </p>
-                   
-                                    
-    <h2>
-        <a name="Introduction">Introduction</a>
-    </h2>
-      
-                        <p> Popping a stack frame becomes necessary when execution is in a native
-           function and a <a href="developers_guide.html#M2nFrame">managed-to-native
-           frame</a> (M2nFrame) is on the stack. This means that the JVMTI 
-       component pops the M2nFrame and the Java frame above it. A frame is popped
-           each time the JVMTI function <code>PopFrame()</code> is
-       called. The current pop-frame implementation is based on the exception
-       handling mechanism for transferring execution control. This way, VM pops
-       frames on the current thread only. To pop frames on other threads, VM
-       uses the M2nFrame flag system and callbacks.</p>
-                   
-                                    
-    <h2>
-        <a name="How to Pop a Frame">How to Pop a Frame</a>
-    </h2>
-      
-                        <p>To pop a frame on the current thread, refer to the following core
-            functions:
-         </p>
-                                <table>
-                        <tr>
-                        <th class="TableHeading" colspan="" rowspan="">
-                
-                     Function Name 
-        </th>
-                                <th class="TableHeading" colspan="" rowspan="">
-                
-                     Role
-        </th>
-            </tr>
-                                <tr>
-                        <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     <code>jvmti_jit_prepare_pop_frame</code>
-              
-        </td>
-                                <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     Finds register context for the previous frame using the
-                     <a href="developers_guide.html#Stack_Iterator">stack iterator</a>.
-        </td>
-            </tr>
-                                <tr>
-                        <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     <code>jvmti_jit_complete_pop_frame</code>
-              
-        </td>
-                                <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     Transfers control to the saved register context for the
-                     popped frame.
-              
-        </td>
-            </tr>
-                                <tr>
-                        <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     <code>jvmti_ji_do_pop_frame</code>
-              
-        </td>
-                                <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     Transfers control to the previous frame. This function is
-                     a simple and fast combination of sequential calls of
-                     <code>jvmti_jit_prepare_pop_frame</code> and
-                     <code>jvmti_jit_complete_pop_frame</code>.
-              
-        </td>
-            </tr>
-            </table>
-                                <p>The state of a frame with regard to popping is indicated in the
-          <code>frame_type</code>
-           field. This field can have the following values: </p>
-                                <table>
-                        <tr>
-                        <th class="TableHeading" colspan="" rowspan="">
-                
-                   Flag Name
-                   
-        </th>
-                                <th class="TableHeading" colspan="" rowspan="">
-                
-                     Meaning
-        </th>
-            </tr>
-                                <tr>
-                        <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     <code>FRAME_UNPOPABLE</code>
-              
-        </td>
-                                <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     The frame cannot be popped.
-              
-        </td>
-            </tr>
-                                <tr>
-                        <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     <code>FRAME_POPABLE</code>
-              
-        </td>
-                                <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     The frame can be popped but is not.
-              
-        </td>
-            </tr>
-                                <tr>
-                        <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     <code>FRAME_POP_NOW</code>
-              
-        </td>
-                                <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     The frame is popped and the state of VM can be
-                     unpredictable and unexpected. JVMTI cannot work in this
-                     state and waits until the popped frame is resumed and the
-                     frame state is changed.
-              
-        </td>
-            </tr>
-                                <tr>
-                        <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     <code>FRAME_POP_DONE =
-                     FRAME_POPABLE |FRAME_POP_NOW</code>
-              
-        </td>
-                                <td class="TableCell" colspan="" rowspan="" >
-    
-                
-                     The frame is popped now but VM state is OK and JVMTI can
-                     work without thread resume.
-              
-        </td>
-            </tr>
-            </table>
-                                <p>
-            In the current implementation, popping a frame goes in the
-            following way:
-         </p>
-                                <ol>
-            <li>
-               VM suspends the popped thread in one of these functions:
-               <code>thread_suspend_disable()</code> or in <code>hythread_safe_point()</code>.
-            </li>
-           <li>
-             The JVMTI Agent calls <code>PopFrame()</code> and does the following:
-             <ul>
-               <li>
-                 Checks that the flag for the topmost M2nFrame is set to <code>FRAME_POPABLE</code>,
-                 which means that the frame can be popped.
-               </li>
-               <li>
-                 Changes the flag
-                 to <code>FRAME_POP_NOW</code>.
-               </li>
-               <li>
-                 Sets the safe point for the callback function. The suspended thread
-                 executes the callback while staying in the function where the
-                 thread is suspended.
-               </li>
-             </ul>
-           </li>
-           <li>
-             The callback
-             function pops the frame in one of the following ways depending on
-             the function and on area of the stack:
-             <ul>
-               <li>
-                 For <b>hythread_safe_point():</b>
-                 <ul>
-                   <li>
-                     VM finds the register
-                     context for the previous frame and saves it in the current M2nFrame.
-                     The frame type flag changed to <code>FRAME_POP_DONE</code>.
-                   </li>
-                   <li>
-                     VM exits the safe point and checks the frame status. If
-                     the frame is popped, VM transfers control to the saved register
-                     context. Otherwise, VM exits normally.
-                   </li>
-                 </ul>
-               </li>
-               <li>
-                 For the <b>suspend_disable()</b> function in an
-                 <a href="developers_guide.html#Exception_Handling">
-                   unwindable area of the stack</a>:
-                 <ul>
-                   <li>
-                     The callback explicitly calls <code>hythread_safe_point()</code> to
-                     stop the current thread in the safe point and wait until
-                     the thread is resumed by another thread.
-                   </li>
-                   <li>
-                     When the thread is resumed, the callback pops the frame
-                     for the current thread and transfers control to the previous
-                     frame.
-                   </li>
-                 </ul>
-               </li>
-               <li>
-                 For the <strong>suspend_disable()</strong> function in a
-                 <a href="developers_guide.html#Exception_Handling">
-                   non-unwindable area of the stack</a>:
-                 <ul>
-                   <li>
-                     VM raises a special exception object and waits for the end
-                     of the area.
-                   </li>
-                   <li>
-                     After exiting the area, VM checks whether the exception
-                     is set and pops the frame for the current thread and transfers
-                     control to the previous frame.
-                   </li>
-                 </ul>
-               </li>
-              </ul>
-           </li>
-         </ol>
-                   
-                                    
-    <h2>
-        <a name="Implementation Specifics">Implementation Specifics</a>
-    </h2>
-      
-                        <ul>
-           <li>Because the implementation re-uses the exception scheme, popping
-              a frame does not transfer control to the beginning of the bytecode
-        invoke instruction, but to the native call instruction. This is possible
-             because the JIT compiles an invoke instruction into
-              several native instructions including the call.<br />
-              A better way of handling the operation is to make VM transfer
-              control to the beginning of the invoke instruction block. </li>
-           <li> In the exception handling mechanism, control is returned to the
-               instruction pointer (IP) after the call instruction. This way, VM
-                must find the call IP of the previous instruction by using
-                information on JIT calling conventions.<br />
-It is advisory to move the corresponding functionality to JIT so that VM has no data
-on JIT calling conventions. </li>
-           <li> Object references in popped frames can become outdated during
-                garbage collection because VM components do not enumerate the stack
-                for such frames. For GC purposes, JVM TI enumerates popped frames
-                until the thread is resumed and control is transferred. </li>
-           <li> Due to specifics of the current thread manager implementation,
-                the pop frame cannot guarantee synchronization of thread-suspend
-                states across different threads. This way, if Thread A suspends
-                Thread B, the current implementation cannot guarantee that Thread
-             B is not resumed by another thread. In such a situation, operation of
-                Thread A can be unstable because it relies on Thread B being
-                suspended. </li>
-         </ul>
-                   
-                                    
-    <h2>
-        <a name="Related Information">Related Information</a>
-    </h2>
-      
-                        <p>[<a name="JVMTISpec" id="JVMTISpec" />1] JVM
-         Tool Interface Specification, <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html" target="_blank">http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html</a> </p>
-                   
-                <p><a href="#top">Back to top</a></p>
-                    
-                                                            </td>
-                </tr>
-
-                <!-- FOOTER -->
-                <tr><td colspan="2">
-                    <hr noshade="" size="1"/>
-                </td></tr>
-                <tr><td colspan="2">
-                    <div class="special"><em>
-                    Copyright &#169; 2003-2007, The Apache Software Foundation
-                    </em></div>
-                </td></tr>
-            </table>
-        </body>
-    </html>
-<!-- end the processing -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You 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="dev@harmony.apache.org">
+            
+           
+            
+            
+            
+            
+            
+            <title>Apache Harmony - JVMTI Implementation of Pop Frame</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://harmony.apache.org/"><img  src="../../images/harmony-logo-new.png" alt="Apache Harmony" /></a>
+</td>
+</td>
+                    </td></tr></table>
+                    </td>
+                    <td align='RIGHT'>
+                    <a href="http://www.us.apachecon.com/">
+                    <img src="http://www.apache.org/ads/ApacheCon/2007-usa-234x60.png"
+                    	alt="ApacheCon US 2007" /></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/2007-europe-125x125.png"
+                             alt="ApacheCon Europe 2007" />
+                    </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="http://apache.org">ASF</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../contribution_policy.html">Contribution Policy</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../downloads.html">Downloads</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../faq.html">FAQ</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">Who we are</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../mailing.html">Mailing Lists</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://issues.apache.org/jira/browse/HARMONY">Bug Tracker</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../related.html">Other Projects</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem"><strong>Development</strong></p>
+        <ul>
+                    <li class="menuItem">    <a href="../../svn.html">Source Code</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../quickhelp_contributors.html">Getting Started</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../roadmap.html">Project Roadmap</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../issue_resolution_guideline.html">Resolution Guideline</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../performance.html">Performance</a>
+</li>
+           
+                        
+        
+        </ul>
+            <p class="menuItem"><strong>Documentation</strong></p>
+        <ul>
+                    <li class="menuItem">    <a href="../../sitemap.html">Sitemap</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="http://wiki.apache.org/harmony">Wiki</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../hdk.html">HDK</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/drlvm/index.html">DRLVM</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/classlibrary/index.html">Class Library</a>
+</li>
+           
+                        
+                    <li class="menuItem">    <a href="../../subcomponents/buildtest/index.html">Build-test Framework</a>
+</li>
+           
+                        
+        
+        </ul>
+                        </td>
+                    <td width="80%" valign="top"><a name="top"></a>
+                                                                    <h1>
+      <a name="JVMTI Pop Frame">JVMTI Pop Frame</a>
+    </h1>
+                        <ol id="TOC">
+              <li><a href="#About This Document">About This Document</a></li>
+              <li><a href="#Introduction">Introduction</a></li>
+              <li><a href="#How to Pop a Frame">How to Pop a Frame</a></li>
+              <li><a href="#Implementation Specifics">Implementation Specifics</a></li>
+              <li><a href="#Related Information">Related Information</a></li>
+          </ol>
+                                    
+    <h2>
+        <a name="About This Document">About This Document</a>
+    </h2>
+      
+                        <p>
+            Here is a description of how popping a frame is currently
+            implemented in the DRLVM tool interface (JVMTI). For a
+            definition of the pop frame functionality, consult the JVMTI
+            specification [<a href="#JVMTISpec">1</a>]. For generic
+            information on JVMTI in the DRL virtual machine and for definition
+            of related terms, see the <a href="developers_guide.html" title="DRLVM Developer's Guide">developer's
+            guide</a>.
+         </p>
+                   
+                                    
+    <h2>
+        <a name="Introduction">Introduction</a>
+    </h2>
+      
+                        <p> Popping a stack frame becomes necessary when execution is in a native
+           function and a <a href="developers_guide.html#M2nFrame">managed-to-native
+           frame</a> (M2nFrame) is on the stack. This means that the JVMTI 
+       component pops the M2nFrame and the Java frame above it. A frame is popped
+           each time the JVMTI function <code>PopFrame()</code> is
+       called. The current pop-frame implementation is based on the exception
+       handling mechanism for transferring execution control. This way, VM pops
+       frames on the current thread only. To pop frames on other threads, VM
+       uses the M2nFrame flag system and callbacks.</p>
+                   
+                                    
+    <h2>
+        <a name="How to Pop a Frame">How to Pop a Frame</a>
+    </h2>
+      
+                        <p>To pop a frame on the current thread, refer to the following core
+            functions:
+         </p>
+                                <table>
+                        <tr>
+                        <th class="TableHeading" colspan="" rowspan="">
+                
+                     Function Name 
+        </th>
+                                <th class="TableHeading" colspan="" rowspan="">
+                
+                     Role
+        </th>
+            </tr>
+                                <tr>
+                        <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     <code>jvmti_jit_prepare_pop_frame</code>
+              
+        </td>
+                                <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     Finds register context for the previous frame using the
+                     <a href="developers_guide.html#Stack_Iterator">stack iterator</a>.
+        </td>
+            </tr>
+                                <tr>
+                        <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     <code>jvmti_jit_complete_pop_frame</code>
+              
+        </td>
+                                <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     Transfers control to the saved register context for the
+                     popped frame.
+              
+        </td>
+            </tr>
+                                <tr>
+                        <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     <code>jvmti_ji_do_pop_frame</code>
+              
+        </td>
+                                <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     Transfers control to the previous frame. This function is
+                     a simple and fast combination of sequential calls of
+                     <code>jvmti_jit_prepare_pop_frame</code> and
+                     <code>jvmti_jit_complete_pop_frame</code>.
+              
+        </td>
+            </tr>
+            </table>
+                                <p>The state of a frame with regard to popping is indicated in the
+          <code>frame_type</code>
+           field. This field can have the following values: </p>
+                                <table>
+                        <tr>
+                        <th class="TableHeading" colspan="" rowspan="">
+                
+                   Flag Name
+                   
+        </th>
+                                <th class="TableHeading" colspan="" rowspan="">
+                
+                     Meaning
+        </th>
+            </tr>
+                                <tr>
+                        <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     <code>FRAME_UNPOPABLE</code>
+              
+        </td>
+                                <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     The frame cannot be popped.
+              
+        </td>
+            </tr>
+                                <tr>
+                        <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     <code>FRAME_POPABLE</code>
+              
+        </td>
+                                <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     The frame can be popped but is not.
+              
+        </td>
+            </tr>
+                                <tr>
+                        <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     <code>FRAME_POP_NOW</code>
+              
+        </td>
+                                <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     The frame is popped and the state of VM can be
+                     unpredictable and unexpected. JVMTI cannot work in this
+                     state and waits until the popped frame is resumed and the
+                     frame state is changed.
+              
+        </td>
+            </tr>
+                                <tr>
+                        <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     <code>FRAME_POP_DONE =
+                     FRAME_POPABLE |FRAME_POP_NOW</code>
+              
+        </td>
+                                <td class="TableCell" colspan="" rowspan="" >
+    
+                
+                     The frame is popped now but VM state is OK and JVMTI can
+                     work without thread resume.
+              
+        </td>
+            </tr>
+            </table>
+                                <p>
+            In the current implementation, popping a frame goes in the
+            following way:
+         </p>
+                                <ol>
+            <li>
+               VM suspends the popped thread in one of these functions:
+               <code>thread_suspend_disable()</code> or in <code>hythread_safe_point()</code>.
+            </li>
+           <li>
+             The JVMTI Agent calls <code>PopFrame()</code> and does the following:
+             <ul>
+               <li>
+                 Checks that the flag for the topmost M2nFrame is set to <code>FRAME_POPABLE</code>,
+                 which means that the frame can be popped.
+               </li>
+               <li>
+                 Changes the flag
+                 to <code>FRAME_POP_NOW</code>.
+               </li>
+               <li>
+                 Sets the safe point for the callback function. The suspended thread
+                 executes the callback while staying in the function where the
+                 thread is suspended.
+               </li>
+             </ul>
+           </li>
+           <li>
+             The callback
+             function pops the frame in one of the following ways depending on
+             the function and on area of the stack:
+             <ul>
+               <li>
+                 For <b>hythread_safe_point():</b>
+                 <ul>
+                   <li>
+                     VM finds the register
+                     context for the previous frame and saves it in the current M2nFrame.
+                     The frame type flag changed to <code>FRAME_POP_DONE</code>.
+                   </li>
+                   <li>
+                     VM exits the safe point and checks the frame status. If
+                     the frame is popped, VM transfers control to the saved register
+                     context. Otherwise, VM exits normally.
+                   </li>
+                 </ul>
+               </li>
+               <li>
+                 For the <b>suspend_disable()</b> function in an
+                 <a href="developers_guide.html#Exception_Handling">
+                   unwindable area of the stack</a>:
+                 <ul>
+                   <li>
+                     The callback explicitly calls <code>hythread_safe_point()</code> to
+                     stop the current thread in the safe point and wait until
+                     the thread is resumed by another thread.
+                   </li>
+                   <li>
+                     When the thread is resumed, the callback pops the frame
+                     for the current thread and transfers control to the previous
+                     frame.
+                   </li>
+                 </ul>
+               </li>
+               <li>
+                 For the <strong>suspend_disable()</strong> function in a
+                 <a href="developers_guide.html#Exception_Handling">
+                   non-unwindable area of the stack</a>:
+                 <ul>
+                   <li>
+                     VM raises a special exception object and waits for the end
+                     of the area.
+                   </li>
+                   <li>
+                     After exiting the area, VM checks whether the exception
+                     is set and pops the frame for the current thread and transfers
+                     control to the previous frame.
+                   </li>
+                 </ul>
+               </li>
+              </ul>
+           </li>
+         </ol>
+                   
+                                    
+    <h2>
+        <a name="Implementation Specifics">Implementation Specifics</a>
+    </h2>
+      
+                        <ul>
+           <li>Because the implementation re-uses the exception scheme, popping
+              a frame does not transfer control to the beginning of the bytecode
+        invoke instruction, but to the native call instruction. This is possible
+             because the JIT compiles an invoke instruction into
+              several native instructions including the call.<br />
+              A better way of handling the operation is to make VM transfer
+              control to the beginning of the invoke instruction block. </li>
+           <li> In the exception handling mechanism, control is returned to the
+               instruction pointer (IP) after the call instruction. This way, VM
+                must find the call IP of the previous instruction by using
+                information on JIT calling conventions.<br />
+It is advisory to move the corresponding functionality to JIT so that VM has no data
+on JIT calling conventions. </li>
+           <li> Object references in popped frames can become outdated during
+                garbage collection because VM components do not enumerate the stack
+                for such frames. For GC purposes, JVM TI enumerates popped frames
+                until the thread is resumed and control is transferred. </li>
+           <li> Due to specifics of the current thread manager implementation,
+                the pop frame cannot guarantee synchronization of thread-suspend
+                states across different threads. This way, if Thread A suspends
+                Thread B, the current implementation cannot guarantee that Thread
+             B is not resumed by another thread. In such a situation, operation of
+                Thread A can be unstable because it relies on Thread B being
+                suspended. </li>
+         </ul>
+                   
+                                    
+    <h2>
+        <a name="Related Information">Related Information</a>
+    </h2>
+      
+                        <p>[<a name="JVMTISpec" id="JVMTISpec" />1] JVM
+         Tool Interface Specification, <a href="http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html" target="_blank">http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html</a> </p>
+                   
+                <p><a href="#top">Back to top</a></p>
+                    
+                                                            </td>
+                </tr>
+
+                <!-- FOOTER -->
+                <tr><td colspan="2">
+                    <hr noshade="" size="1"/>
+                </td></tr>
+                <tr><td colspan="2">
+                    <div class="special"><em>
+                    Copyright &#169; 2003-2007, The Apache Software Foundation
+                    </em></div>
+                </td></tr>
+            </table>
+        </body>
+    </html>
+<!-- end the processing -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

Modified: harmony/standard/site/docs/subcomponents/drlvm/TM.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/subcomponents/drlvm/TM.html?view=diff&rev=535532&r1=535531&r2=535532
==============================================================================
--- harmony/standard/site/docs/subcomponents/drlvm/TM.html (original)
+++ harmony/standard/site/docs/subcomponents/drlvm/TM.html Sat May  5 07:37:18 2007
@@ -56,9 +56,9 @@
                     </td></tr></table>
                     </td>
                     <td align='RIGHT'>
-                    <a href="http://www.apachecon.com/2007/EU/index.html">
-                    <img src="http://www.apache.org/ads/ApacheCon/2007-europe-234x60.png"
-                    	alt="ApacheCon Europe 2007" /></a>                    
+                    <a href="http://www.us.apachecon.com/">
+                    <img src="http://www.apache.org/ads/ApacheCon/2007-usa-234x60.png"
+                    	alt="ApacheCon US 2007" /></a>                    
                     </td>
                 </tr>
             </table>

Modified: harmony/standard/site/docs/subcomponents/drlvm/debugging_VM_and_JIT.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/subcomponents/drlvm/debugging_VM_and_JIT.html?view=diff&rev=535532&r1=535531&r2=535532
==============================================================================
--- harmony/standard/site/docs/subcomponents/drlvm/debugging_VM_and_JIT.html (original)
+++ harmony/standard/site/docs/subcomponents/drlvm/debugging_VM_and_JIT.html Sat May  5 07:37:18 2007
@@ -56,9 +56,9 @@
                     </td></tr></table>
                     </td>
                     <td align='RIGHT'>
-                    <a href="http://www.apachecon.com/2007/EU/index.html">
-                    <img src="http://www.apache.org/ads/ApacheCon/2007-europe-234x60.png"
-                    	alt="ApacheCon Europe 2007" /></a>                    
+                    <a href="http://www.us.apachecon.com/">
+                    <img src="http://www.apache.org/ads/ApacheCon/2007-usa-234x60.png"
+                    	alt="ApacheCon US 2007" /></a>                    
                     </td>
                 </tr>
             </table>

Modified: harmony/standard/site/docs/subcomponents/drlvm/developers_guide.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/subcomponents/drlvm/developers_guide.html?view=diff&rev=535532&r1=535531&r2=535532
==============================================================================
--- harmony/standard/site/docs/subcomponents/drlvm/developers_guide.html (original)
+++ harmony/standard/site/docs/subcomponents/drlvm/developers_guide.html Sat May  5 07:37:18 2007
@@ -56,9 +56,9 @@
                     </td></tr></table>
                     </td>
                     <td align='RIGHT'>
-                    <a href="http://www.apachecon.com/2007/EU/index.html">
-                    <img src="http://www.apache.org/ads/ApacheCon/2007-europe-234x60.png"
-                    	alt="ApacheCon Europe 2007" /></a>                    
+                    <a href="http://www.us.apachecon.com/">
+                    <img src="http://www.apache.org/ads/ApacheCon/2007-usa-234x60.png"
+                    	alt="ApacheCon US 2007" /></a>                    
                     </td>
                 </tr>
             </table>

Modified: harmony/standard/site/docs/subcomponents/drlvm/emguide.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/docs/subcomponents/drlvm/emguide.html?view=diff&rev=535532&r1=535531&r2=535532
==============================================================================
--- harmony/standard/site/docs/subcomponents/drlvm/emguide.html (original)
+++ harmony/standard/site/docs/subcomponents/drlvm/emguide.html Sat May  5 07:37:18 2007
@@ -56,9 +56,9 @@
                     </td></tr></table>
                     </td>
                     <td align='RIGHT'>
-                    <a href="http://www.apachecon.com/2007/EU/index.html">
-                    <img src="http://www.apache.org/ads/ApacheCon/2007-europe-234x60.png"
-                    	alt="ApacheCon Europe 2007" /></a>                    
+                    <a href="http://www.us.apachecon.com/">
+                    <img src="http://www.apache.org/ads/ApacheCon/2007-usa-234x60.png"
+                    	alt="ApacheCon US 2007" /></a>                    
                     </td>
                 </tr>
             </table>



Mime
View raw message