You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by na...@apache.org on 2007/03/07 14:29:13 UTC
svn commit: r515560 [3/3] - in /harmony/standard/site:
docs/subcomponents/classlibrary/ docs/subcomponents/drlvm/ xdocs/
xdocs/documentation/ xdocs/subcomponents/classlibrary/
xdocs/subcomponents/drlvm/
Modified: harmony/standard/site/xdocs/subcomponents/drlvm/encoder_library.xml
URL: http://svn.apache.org/viewvc/harmony/standard/site/xdocs/subcomponents/drlvm/encoder_library.xml?view=diff&rev=515560&r1=515559&r2=515560
==============================================================================
--- harmony/standard/site/xdocs/subcomponents/drlvm/encoder_library.xml (original)
+++ harmony/standard/site/xdocs/subcomponents/drlvm/encoder_library.xml Wed Mar 7 05:29:12 2007
@@ -32,7 +32,7 @@
<li>
<a href="#1. Revision History">Revision Ristory</a>
</li>
- <li><a href="#2. About this document">About
+ <li><a href="#2. About this document">About
this Document</a> </li>
<li>
@@ -51,429 +51,429 @@
<ul>
<li><a href="#6.1 Usage Model">6.1 Usage Model</a></li>
- <li><a href="#6.2 Under the Hood">6.2 Under the
+ <li><a href="#6.2 Under the Hood">6.2 Under the
Hood</a></li>
<ul>
- <li><a href="#6.2.1 Fast Opcode Lookup">6.2.1 Fast
+ <li><a href="#6.2.1 Fast Opcode Lookup">6.2.1 Fast
Opcode Lookup</a>
</li>
- <li><a href="#6.2.2 Fast Code Generation">6.2.2 Fast
+ <li><a href="#6.2.2 Fast Code Generation">6.2.2 Fast
Code Generation</a></li>
</ul>
</ul>
</ol>
- </subsection>
-
- <subsection name="1. Revision History">
-
- <table>
- <tr>
- <th class="TableHeading">Version</th>
-
- <th class="TableHeading">Version Information</th>
-
- <th class="TableHeading">Date</th>
- </tr>
-
- <tr>
- <td class="TableCell">Initial version</td>
-
- <td class="TableCell">
- Alexander Astapchuk, Svetlana
- Konovalova: document created.
- </td>
-
- <td class="TableCell">January 30, 2007</td>
- </tr>
- </table>
-
- </subsection>
- <subsection name="2. About this Document">
- <p>
- This document introduces the encoder library component
- delivered as a part of the DRL (Dynamic Runtime Layer)
- initiative. This document focuses on the specifics of the
- current implementation showing the encoder library structure
- and role inside the DRL virtual machine.
- </p>
-
- </subsection>
- <subsection name="3. Overview">
- <p>
- The encoder library is a DRLVM component for code
- generation, or encoding. This library is separate, static and
- mostly independent from other components. The following
- components use the encoder library:
- </p>
-
- <ul>
- <li>
- <a href="TM.html">Thread Manager</a>
- </li>
-
- <li>
- <a href="JIT.html#OPT">Jitrino.OPT</a>
- </li>
-
- <li>
- <a href="JIT.html#JET">Jitrino.JET</a>
- </li>
-
- <li>
- <a href="index.html">DRLVM</a> to generate stubs using
- direct calls to the encoder and the LIL code generator
- </li>
- </ul>
-
- </subsection>
- <subsection name="4. Goals and Targets">
-
-
- <p>The encoder library meets the following requirements:</p>
-
- <ul>
- <li>
- To be as fast as <code>jet</code>, which is crucial for
- client applications startup
- </li>
-
- <li>
- To maintain instructions data easily, which is crucial
- for any application
- </li>
-
- <li>
- To provide a simple and generic interface:
- <code>::encode(mnemonic, arguments)</code>
-
- <p class="note">Note</p>
-
- <p class="notetext">
- The encoder library provides a
- simple and generic interface. Clients with special
- needs should use <a href="#6. How It Works">adapters</a>,
- which provide a handy and convenient interface and then
- translate the data into the generic interface.
- </p>
- </li>
- </ul>
-
- </subsection>
-
- <subsection name="5. Structure">
-
- <p>The encoder library includes the following modules:</p>
-
- <ul>
- <li>
- An <i>encoding engine</i> with the generic interface to
- generate CPU instructions for IA-32 and Intel64
- platforms
- </li>
-
- <li>
- About 150 instructions covering the following areas:
-
- <ul>
- <li>arguments quantity</li>
-
- <li>arguments legal combinations</li>
-
- <li>
- arguments roles, that is, whether an argument
- changes in operation or not
- </li>
-
- <li>
- encoding an operation (binary
- representation)
- </li>
-
- <li>
- additional miscellaneous information, for
- example, whether an operation is symmetric, or uses
- flags, etc.
- </li>
- </ul>These instructions are in place already -
- <code>MOV</code>, <code>JUMP</code>, <code>CALL</code>,
- <code>ALU</code>, <code>SSE</code>, <code>FPU</code>,
- string, etc.
- </li>
-
- <li>
- A <i>generic interface adapter</i> for convenient usage
- in a program
- </li>
-
- <li>
- A <i>decoding engine</i> to disassemble CPU
- instructions for IA-32 and Intel64 platforms
- </li>
- </ul>
-
- <p>
- The encoder library consists of the following files located
- at <code>vm/port/src/encoder/ia32_em64t</code>:
- </p>
-
- <table>
- <tr>
- <th class="TableHeading">Filename</th>
-
- <th class="TableHeading">Description</th>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>dec_base.cpp</code>
- </td>
-
- <td class="TableCell">decoding routines</td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>dec_base.h</code>
- </td>
-
- <td class="TableCell">
- decoding routines
- declarations
- </td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>enc_base.cpp</code>
- </td>
-
- <td class="TableCell">base encoding engine</td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>enc_base.h</code>
- </td>
-
- <td class="TableCell">
- base encoding engine
- declarations
- </td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>enc_prvt.h</code>
- </td>
-
- <td class="TableCell">
- internal stuff of encoding
- engine
- </td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>encoder.cpp</code>
- </td>
-
- <td class="TableCell">
- handy adapter for use in
- programs
- </td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>encoder.h</code>
- </td>
-
- <td class="TableCell">handy adapter declaration</td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>encoder.inl</code>
- </td>
-
- <td class="TableCell">
- implementation of most of
- <code>encoder.h</code> functions that are normally
- inline
- </td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>enc_defs.h</code>
- </td>
-
- <td class="TableCell">
- complete instructions list
- including miscellaneous definitions of register names,
- sizes, etc
- </td>
- </tr>
-
- <tr>
- <td class="TableCell">
- <code>enc_tabl.cpp</code>
- </td>
-
- <td class="TableCell">
- comprehensive step-by-step
- comments on how to add new instructions
- </td>
- </tr>
- </table>
-</subsection>
- <subsection name="6. How It Works">
-
-
-
- <a name="6.1 Usage Model"><b>6.1 Usage Model</b></a>
-
- <p>
- The base encoding interface
- <code>EncoderBase::encode()</code> is a common generic
- interface, which is not used in programs directly. Normally,
- applications use an <i>adapter interface</i> to connect
- specific client needs to the <code>EncoderBase</code> generic
- interface. Currently, the following adapters are available:
- </p>
-
- <ul>
- <li>
- <code>Jitrino.OPT</code> described in
- <code>Jitrino/src/codegenerator/ia32/Ia32Encoder.cpp</code>
- </li>
-
- <li>
- <code>Jitrino.JET</code> described in
- <code>Ia32Encoder.h</code> and
- <code>jitrino/src/jet/enc_ia32.cpp</code>,
- <code>enc_ia32.h</code>
- </li>
-
- <li>
- <code>encoder.h</code> described in
- <code>port/src/encoder/encoder.h</code>
- </li>
- </ul>
-
- <p>
- All the <i>adapters</i> are trivial - they fill out
- arguments as <code>EncoderBase::Operands</code>, and then
- invoke <code>EncoderBase::encode()</code>.
- </p>
-
- <p class="example">Example</p>
-
- <p class="exampletext">
- The <code>encoder.h</code> file
- consisting of human-readable function names serves as an
- adapter. This way, to generate a simple code sequence, use the
- <code>encoder.h</code> interface.
- </p>
-
- <p>
- The same usage model applies to the decoder engine: the
- basic generic interface is declared in
- <code>vm/port/src/encoder/ia32_em64t/dec_base.h</code> and the
- specific adapter for JVMTI needs is in
- <code>vm/vmcore/src/jvmti/jvmti_dasm.cpp</code>,
- <code>vm/vmcore/include/jvmti_dasm.h</code>.
- </p>
-
- <a name="6.2 Under the Hood"><b>6.2 Under the Hood</b></a>
-
- <p>
- The engine gets its input as an operation and a set of
- operands, and performs the following operations:
- </p>
-
- <ul>
- <li>Finds a matching record in the table</li>
-
- <li>Generates binary data based on the record found</li>
- </ul>
-
- <p>
- Both steps involve performance-intensive compare and memory
- access operations. To reduce the workload, table maintenance is
- simplified for users, and the application keeps the master
- table plain and elementary. At run time, before the first
- usage, a special version of data is pre-compiled, which
- requires fewer manipulations. The pre-compiled version provides
- the <a href="#6.2.1 Fast Opcode Lookup">fast opcode lookup</a> and
- the <a href="#6.2.2 Fast Code Generation">
- fast code generation</a>.
- </p>
-
- <dl>
- <dt>
- <a name="6.2.1 Fast Opcode Lookup">6.2.1 Fast Opcode Lookup</a>
- </dt>
- </dl>
-
-
- <p>
- Every operand gets its unique hash based on the operand size
- and the memory, or register, or immediate location. If an
- instruction has more than one operand, its hash undergoes the
- OR operation, by the following formula:
- </p>
-<pre>hash = opnd1.hash() | opnd2.hash()<<N | opnd3.hash() << N*2;</pre>
-
- <p>
- A pair of a mnemonic and its hash identifies the needed
- record. The hash is calculated in
- <code>EncoderBase::Operands</code> methods, outside of the hot
- execution path.
- </p>
-
- <dl>
- <dt>
- <a name="6.2.2 Fast Code Generation">6.2.2 Fast Code
- Generation</a>
- </dt>
- </dl>
- <p>
- For fast generation of code, the data is separated into
- <i>static data</i>, which does not depend on operands, and
- <i>dynamic data</i>, which depends on operands. This algorithm
- optimizes and speeds up generation of code by removing the loop
- from the hot execution path, as shown below:
- </p>
-
- <pre>for (bytes-in-opcode-data) {
-// short loop, many miss-predictions, many branches inside, too slow
-if (is_constant_byte) { copy_the_byte(); }
-if (is_operand_data) { encode_operand_data(); }
-...
-}</pre>
-
-
- <p>
- The static data that is a set of bytes is copied into the
- output buffer with no analysis.<br />
- The dynamic data requires several <code>if</code> operators in
- the source code, but is much cheaper than the loop shown
- above.
- </p>
-
- <p>Encoding runs as shown in the following pseudo-code:</p>
-<pre>memcpy(buf, static_data);
-if (opcode_has_dyn_data_1) { gen_opcode_dyn_data(); }
-if (opcode_has_dyn_data_2) { gen_opcode_dyn_data(); }
-return;</pre>
-
- <p>
- For more details on hash calculation and internal
- structures, refer to <code>enc_tabl.cpp</code>.
- </p>
-
-</subsection>
+ </subsection>
+
+ <subsection name="1. Revision History">
+
+ <table>
+ <tr>
+ <th class="TableHeading">Version</th>
+
+ <th class="TableHeading">Version Information</th>
+
+ <th class="TableHeading">Date</th>
+ </tr>
+
+ <tr>
+ <td class="TableCell">Initial version</td>
+
+ <td class="TableCell">
+ Alexander Astapchuk, Svetlana
+ Konovalova: document created.
+ </td>
+
+ <td class="TableCell">January 30, 2007</td>
+ </tr>
+ </table>
+
+ </subsection>
+ <subsection name="2. About this Document">
+ <p>
+ This document introduces the encoder library component
+ delivered as a part of the DRL (Dynamic Runtime Layer)
+ initiative. This document focuses on the specifics of the
+ current implementation showing the encoder library structure
+ and role inside the DRL virtual machine.
+ </p>
+
+ </subsection>
+ <subsection name="3. Overview">
+ <p>
+ The encoder library is a DRLVM component for code
+ generation, or encoding. This library is separate, static and
+ mostly independent from other components. The following
+ components use the encoder library:
+ </p>
+
+ <ul>
+ <li>
+ <a href="TM.html">Thread Manager</a>
+ </li>
+
+ <li>
+ <a href="JIT.html#OPT">Jitrino.OPT</a>
+ </li>
+
+ <li>
+ <a href="JIT.html#JET">Jitrino.JET</a>
+ </li>
+
+ <li>
+ <a href="index.html">DRLVM</a> to generate stubs using
+ direct calls to the encoder and the LIL code generator
+ </li>
+ </ul>
+
+ </subsection>
+ <subsection name="4. Goals and Targets">
+
+
+ <p>The encoder library meets the following requirements:</p>
+
+ <ul>
+ <li>
+ To be as fast as <code>jet</code>, which is crucial for
+ client applications startup
+ </li>
+
+ <li>
+ To maintain instructions data easily, which is crucial
+ for any application
+ </li>
+
+ <li>
+ To provide a simple and generic interface:
+ <code>::encode(mnemonic, arguments)</code>
+
+ <p class="note">Note</p>
+
+ <p class="notetext">
+ The encoder library provides a
+ simple and generic interface. Clients with special
+ needs should use <a href="#6. How It Works">adapters</a>,
+ which provide a handy and convenient interface and then
+ translate the data into the generic interface.
+ </p>
+ </li>
+ </ul>
+
+ </subsection>
+
+ <subsection name="5. Structure">
+
+ <p>The encoder library includes the following modules:</p>
+
+ <ul>
+ <li>
+ An <i>encoding engine</i> with the generic interface to
+ generate CPU instructions for IA-32 and Intel64
+ platforms
+ </li>
+
+ <li>
+ About 150 instructions covering the following areas:
+
+ <ul>
+ <li>arguments quantity</li>
+
+ <li>arguments legal combinations</li>
+
+ <li>
+ arguments roles, that is, whether an argument
+ changes in operation or not
+ </li>
+
+ <li>
+ encoding an operation (binary
+ representation)
+ </li>
+
+ <li>
+ additional miscellaneous information, for
+ example, whether an operation is symmetric, or uses
+ flags, etc.
+ </li>
+ </ul>These instructions are in place already -
+ <code>MOV</code>, <code>JUMP</code>, <code>CALL</code>,
+ <code>ALU</code>, <code>SSE</code>, <code>FPU</code>,
+ string, etc.
+ </li>
+
+ <li>
+ A <i>generic interface adapter</i> for convenient usage
+ in a program
+ </li>
+
+ <li>
+ A <i>decoding engine</i> to disassemble CPU
+ instructions for IA-32 and Intel64 platforms
+ </li>
+ </ul>
+
+ <p>
+ The encoder library consists of the following files located
+ at <code>vm/port/src/encoder/ia32_em64t</code>:
+ </p>
+
+ <table>
+ <tr>
+ <th class="TableHeading">Filename</th>
+
+ <th class="TableHeading">Description</th>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>dec_base.cpp</code>
+ </td>
+
+ <td class="TableCell">decoding routines</td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>dec_base.h</code>
+ </td>
+
+ <td class="TableCell">
+ decoding routines
+ declarations
+ </td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>enc_base.cpp</code>
+ </td>
+
+ <td class="TableCell">base encoding engine</td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>enc_base.h</code>
+ </td>
+
+ <td class="TableCell">
+ base encoding engine
+ declarations
+ </td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>enc_prvt.h</code>
+ </td>
+
+ <td class="TableCell">
+ internal stuff of encoding
+ engine
+ </td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>encoder.cpp</code>
+ </td>
+
+ <td class="TableCell">
+ handy adapter for use in
+ programs
+ </td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>encoder.h</code>
+ </td>
+
+ <td class="TableCell">handy adapter declaration</td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>encoder.inl</code>
+ </td>
+
+ <td class="TableCell">
+ implementation of most of
+ <code>encoder.h</code> functions that are normally
+ inline
+ </td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>enc_defs.h</code>
+ </td>
+
+ <td class="TableCell">
+ complete instructions list
+ including miscellaneous definitions of register names,
+ sizes, etc
+ </td>
+ </tr>
+
+ <tr>
+ <td class="TableCell">
+ <code>enc_tabl.cpp</code>
+ </td>
+
+ <td class="TableCell">
+ comprehensive step-by-step
+ comments on how to add new instructions
+ </td>
+ </tr>
+ </table>
+</subsection>
+ <subsection name="6. How It Works">
+
+
+
+ <a name="6.1 Usage Model"><b>6.1 Usage Model</b></a>
+
+ <p>
+ The base encoding interface
+ <code>EncoderBase::encode()</code> is a common generic
+ interface, which is not used in programs directly. Normally,
+ applications use an <i>adapter interface</i> to connect
+ specific client needs to the <code>EncoderBase</code> generic
+ interface. Currently, the following adapters are available:
+ </p>
+
+ <ul>
+ <li>
+ <code>Jitrino.OPT</code> described in
+ <code>Jitrino/src/codegenerator/ia32/Ia32Encoder.cpp</code>
+ </li>
+
+ <li>
+ <code>Jitrino.JET</code> described in
+ <code>Ia32Encoder.h</code> and
+ <code>jitrino/src/jet/enc_ia32.cpp</code>,
+ <code>enc_ia32.h</code>
+ </li>
+
+ <li>
+ <code>encoder.h</code> described in
+ <code>port/src/encoder/encoder.h</code>
+ </li>
+ </ul>
+
+ <p>
+ All the <i>adapters</i> are trivial - they fill out
+ arguments as <code>EncoderBase::Operands</code>, and then
+ invoke <code>EncoderBase::encode()</code>.
+ </p>
+
+ <p class="example">Example</p>
+
+ <p class="exampletext">
+ The <code>encoder.h</code> file
+ consisting of human-readable function names serves as an
+ adapter. This way, to generate a simple code sequence, use the
+ <code>encoder.h</code> interface.
+ </p>
+
+ <p>
+ The same usage model applies to the decoder engine: the
+ basic generic interface is declared in
+ <code>vm/port/src/encoder/ia32_em64t/dec_base.h</code> and the
+ specific adapter for JVMTI needs is in
+ <code>vm/vmcore/src/jvmti/jvmti_dasm.cpp</code>,
+ <code>vm/vmcore/include/jvmti_dasm.h</code>.
+ </p>
+
+ <a name="6.2 Under the Hood"><b>6.2 Under the Hood</b></a>
+
+ <p>
+ The engine gets its input as an operation and a set of
+ operands, and performs the following operations:
+ </p>
+
+ <ul>
+ <li>Finds a matching record in the table</li>
+
+ <li>Generates binary data based on the record found</li>
+ </ul>
+
+ <p>
+ Both steps involve performance-intensive compare and memory
+ access operations. To reduce the workload, table maintenance is
+ simplified for users, and the application keeps the master
+ table plain and elementary. At run time, before the first
+ usage, a special version of data is pre-compiled, which
+ requires fewer manipulations. The pre-compiled version provides
+ the <a href="#6.2.1 Fast Opcode Lookup">fast opcode lookup</a> and
+ the <a href="#6.2.2 Fast Code Generation">
+ fast code generation</a>.
+ </p>
+
+ <dl>
+ <dt>
+ <a name="6.2.1 Fast Opcode Lookup">6.2.1 Fast Opcode Lookup</a>
+ </dt>
+ </dl>
+
+
+ <p>
+ Every operand gets its unique hash based on the operand size
+ and the memory, or register, or immediate location. If an
+ instruction has more than one operand, its hash undergoes the
+ OR operation, by the following formula:
+ </p>
+<pre>hash = opnd1.hash() | opnd2.hash()<<N | opnd3.hash() << N*2;</pre>
+
+ <p>
+ A pair of a mnemonic and its hash identifies the needed
+ record. The hash is calculated in
+ <code>EncoderBase::Operands</code> methods, outside of the hot
+ execution path.
+ </p>
+
+ <dl>
+ <dt>
+ <a name="6.2.2 Fast Code Generation">6.2.2 Fast Code
+ Generation</a>
+ </dt>
+ </dl>
+ <p>
+ For fast generation of code, the data is separated into
+ <i>static data</i>, which does not depend on operands, and
+ <i>dynamic data</i>, which depends on operands. This algorithm
+ optimizes and speeds up generation of code by removing the loop
+ from the hot execution path, as shown below:
+ </p>
+
+ <pre>for (bytes-in-opcode-data) {
+// short loop, many miss-predictions, many branches inside, too slow
+if (is_constant_byte) { copy_the_byte(); }
+if (is_operand_data) { encode_operand_data(); }
+...
+}</pre>
+
+
+ <p>
+ The static data that is a set of bytes is copied into the
+ output buffer with no analysis.<br />
+ The dynamic data requires several <code>if</code> operators in
+ the source code, but is much cheaper than the loop shown
+ above.
+ </p>
+
+ <p>Encoding runs as shown in the following pseudo-code:</p>
+<pre>memcpy(buf, static_data);
+if (opcode_has_dyn_data_1) { gen_opcode_dyn_data(); }
+if (opcode_has_dyn_data_2) { gen_opcode_dyn_data(); }
+return;</pre>
+
+ <p>
+ For more details on hash calculation and internal
+ structures, refer to <code>enc_tabl.cpp</code>.
+ </p>
+
+</subsection>
</section>
</body>
</document>
Modified: harmony/standard/site/xdocs/subcomponents/drlvm/gc-howto-content.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/xdocs/subcomponents/drlvm/gc-howto-content.html?view=diff&rev=515560&r1=515559&r2=515560
==============================================================================
--- harmony/standard/site/xdocs/subcomponents/drlvm/gc-howto-content.html (original)
+++ harmony/standard/site/xdocs/subcomponents/drlvm/gc-howto-content.html Wed Mar 7 05:29:12 2007
@@ -1,3 +1,19 @@
+<!--
+ 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.
+-->
<!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">
Modified: harmony/standard/site/xdocs/subcomponents/drlvm/internal_profiler.xml
URL: http://svn.apache.org/viewvc/harmony/standard/site/xdocs/subcomponents/drlvm/internal_profiler.xml?view=diff&rev=515560&r1=515559&r2=515560
==============================================================================
--- harmony/standard/site/xdocs/subcomponents/drlvm/internal_profiler.xml (original)
+++ harmony/standard/site/xdocs/subcomponents/drlvm/internal_profiler.xml Wed Mar 7 05:29:12 2007
@@ -1,250 +1,250 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
--->
-
-<document>
-
- <properties>
- <title>Apache Harmony DRL Virtual Machine</title>
- <author email="dev@harmony.apache.org">Harmony Documentation Team</author>
- </properties>
-
- <body>
-
-<section name="Jitrino.OPT Internal Profiler Tool">
-<p>This document defines the internal
-profiler tool (iprof) for <a href="JIT.html">Jitrino.OPT</a>
-code generator and describes how to use it. The internal profiler can instrument
- code so that per-method counters of <i>executed</i> (not just compiled)
- instructions can be dumped. Operation of iprof is configured in the <code>iprof.cfg</code>
- file, as described in this document. For sample iprof tool output, see the<a href="#ExampleOutput">example</a>.</p>
-<p> To enable iprof, do the following:</p>
-<ol>
- <li>Specify the following command-line option to DRLVM on startup: <code><br />
- -XDjit.arg.codegen.iprof=on</code></li>
- <li> Place the configuration file <code>iprof.cfg</code> in the same directory
- where you are starting DRLVM.</li>
-</ol>
-<subsection name="Configuring the Profiler">
-<p>The configuration file <code>iprof.cfg</code> consists of a list of global parameters
- and a list of counters, as defined in this section. For a sample iprof configuration,
- see the <a href="#ExampleConfig">example</a>. </p>
-<h3>Available global parameters</h3>
-<pre>Config.PrintBBStats=false #(boolean)</pre>
-<p>This parameter turns on statistics dumping for all
-basic blocks of a method.</p>
-<h3>Counters</h3>
-<p>Counters collect information about executed
- instructions defined by the filter.
- Counters have the following attributes:</p>
-<ul>
- <li><em>Name</em> identifies the counter. This attribute is defined by the first
- line in a <code>[begin]/[end]</code> section starting with <code>Counter.</code>,
- and all symbols after it and up to
- the next period <code>.</code> or an
- equal mark <code>=</code> or <code>\n</code> constitute the name of the counter.</li>
- <li><em>Title</em> is the for the dumped column. [optional]</li>
- <li><em>Filter</em> lists properties of
- the instructions to count. You can define properties for the instruction
- (mnemonic, the number of operands), for a specific operand (for example,
- the area of placement) or include run-time information (for example, whether
- the call is a helper and the helper name). See the list of filter parameters
- below.
- <br />All filter parameters can be considered parts
- of an <code>AND</code> expression. You can also use the
- <code>IsOr</code> filter attribute to provide an <code>OR</code> operation for all filter parameters, for example:
- <br /><code>Counter.Name0.IsOr=true</code></li>
-</ul>
-<p class="example">Example</p>
-<pre>###########
-[begin]
-Counter.CALL.Mnemonic=CALL
-[end]
-
-[begin]
-Counter.AddCounter.Title=ADD_EAX_COUNTER
-Counter.AddCounter.Mnemonic=ADD
-Counter.AddCounter.Operand.0.RegName=EAX
-[end]
-###########</pre>
-<p>All properties of an instruction correspond to names of entities of the Jitrino
-IA-32 code generator, for example:</p>
-<pre>Mnemonic_CALL => CALL
-OpndKind_Mem => Mem</pre>
-<dl>
-<dt>Operand attributes</dt>
-<dd>
-<code>Operand.OpNum Operand number (can be *)<br />
-Operand.OpNum.OpndRole Operand role<br />
-Operand.OpNum.OpndKind Operand kind<br />
-Operand.OpNum.RegName Register name<br />
-Operand.OpNum.MemOpndKind Memory operand kind</code>
-</dd>
-
-<dt> Instruction attributes</dt>
-<dd>
-<code>Mnemonic Instruction mnemonic<br />
-OperandNumber Number of operands</code>
-</dd>
-
-<dt> Run-time information attributes</dt>
-<dd>
-<code>RuntimeInfo.Kind Runtime information kind<br />
-RuntimeInfo.HelperID VM Helper identifier<br />
-RuntimeInfo.IntHelperName Internal helper name</code>
-</dd>
-
-<dt>Call instruction attributes </dt>
-<dd>
-<code>isNative<br />
-isStatic<br />
-isSynchronized<br />
-isNoInlining<br />
-isInstance<br />
-isFinal<br />
-isVirtual<br />
-isAbstract<br />
-isClassInitializer<br />
-isInstanceInitializer<br />
-isStrict<br />
-isRequireSecObject<br />
-isInitLocals<br />
-isOverridden</code>
-<p>The counter does not work for other instructions.</p>
-</dd>
-</dl>
-<h3>Re-using Filter Parameters between Counters </h3>
-<p>Filter parameters of a counter can be re-used and
-extended by another counter, for example:</p>
-<pre>[begin]
-Counter.CALL_Inst.Mnemonic=CALL
-[end]
-[begin]
-Counter.I_HELPER_CALL=CALL_Inst
-Counter.I_HELPER_CALL.RuntimeInfo.Kind=InternalHelperAddress
-[end]</pre>
-
-<p class="note" >Warning</p>
-<p class="notetext">Space
-characters should not be used outside comments.</p>
-</subsection>
-<subsection name="Dumping of Counters">
-<p>The iprof tool
-creates the file iprof.stat on exit of
-a DRLVM session in the directory where DRLVM was started. Tabbed text format can
- be edited by spreadsheets.</p>
-</subsection>
- </section>
-<section name="Example of iprof Configuration File">
-<a name="ExampleConfig"></a>
-<p>This is an example of the Jitrino.OPT internal profiler configuration.</p>
-<pre>Config.PrintBBStats=true
-[begin]
-#for counting of all instructions you can specify any word as Mnemonic
-Counter.Insts.Mnemonic=Any
-[end]
-
-#hardcoded counters with only parameter "title"
-###############################################
-[begin]
-#Size of java bytecode of a method
-Counter.ByteCodeSize
-[end]
-#
-[begin]
-#Number of execution times of the hottest basic block of a method
-Counter.MaxBBExec
-[end]
-[begin]
-##ID nuber of the hottest basic block
-Counter.HottestBBNum
-[end]
-#
-[begin]
-##Number of exception handlers of a method
-Counter.ExcHandlersNum
-[end]
-#
-[begin]
-#Number of calls of a method
-Counter.MethodExec
-Counter.MethodExec.Title=Number of calls of a method
-[end]
-#
-[begin]
-#Basic block execution count
-Counter.BBExec
-[end]
-################################################
-[begin]
-Counter.OpNum.OpndNumber=3
-[end]
-[begin]
-#count instructions with memory access in first five operands
-Counter.MemOpnd.IsOR=true
-Counter.MemOpnd.Operand.*.OpndKind=Mem
-#Counter.MemOpnd.Operand.1.OpndKind=Mem
-[end]
-[begin]
-Counter.UseOpnd.Operand.0.OpndRole=Use
-[end]
-[begin]
-Counter.EAXOpnd.Operand.0.RegName=EAX
-[end]
-[begin]
-Counter.HeapOpnd.Operand.0.MemOpndKind=Heap
-[end]
-[begin]
-Counter.Method.isNative=true
-Counter.Method.isStatic=true
-Counter.Method.isSynchronized=true
-Counter.Method.isNoInlining=true
-Counter.Method.isInstance=true
-Counter.Method.isFinal=true
-Counter.Method.isVirtual=true
-Counter.Method.isAbstract=true
-Counter.Method.isClassInitializer=true
-Counter.Method.isInstanceInitializer=true
-Counter.Method.isStrict=true
-Counter.Method.isRequireSecObject=true
-Counter.Method.isInitLocals=true
-Counter.Method.isOverridden=true
-[end]
-
-[begin]
-Counter.CALL.Mnemonic=CALL
-[end]
-[begin]
-Counter.I_HELPER_CALL=CALL
-Counter.I_HELPER_CALL.RuntimeInfo.Kind=InternalHelperAddress
-[end]
-[begin]
-Counter.HELPER_CALL=CALL
-Counter.HELPER_CALL.RuntimeInfo.Kind=HelperAddress
-Counter.HELPER_CALL.RuntimeInfo.HelperID=LdString
-[end]</pre>
-</section>
-<section name="Example of Profiler Output">
-<p>This is a fragment of a sample <code>stat</code> file that iprof produces.</p>
-<a name="ExampleOutput"></a>
-<pre>Method name Insts ByteCodeSize MaxBBExec HottestBBNum ExcHandlersNum Number of calls of a method BBExec CALL I_HELPER_CALL HELPER_CALL LDSTRING NEWOBJ_USINGVTABLE NEWVECTOR_USINGVTABLE NEWOBJ NEWVECTOR NEWMULTIARRAY OBJMONITORENTER ObjMonitorExit TYPEMONITORENTER TYPEMONITOREXIT THROW_KEEPSTACKTRACE THROW_SETSTACKTRACE THROW_LAZY NULLPTREXCEPTION ARRAYBOUNDSEXCEPTION ELEMTYPEEXCEPTION DIVIDEBYZEROEXCEPTION THROW_LINKINGEXCEPTION DIVI32 DIVU32 DIVI64 DIVU64 DIVSINGLE DIVDOUBLE REMI32 REMU32 REMI64 REMU64 REMSINGLE RemDouble MulI64 ShlI64 ShrI64 ShruI64 ConvStoI32 ConvStoI64 ConvDtoI32 ConvDtoI64 LdInterface Cast IsInstanceOf InitType IsValidElemType CharArrayCopy MANAGE_CALL MemOpnd Method
-java/lang/Thread.<clinit> 7 13 1 2 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 4 0
-java/lang/Object.<init> 6445 1 6445 2 0 6444 6445 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-java/lang/Thread.<init> 2440 257 24 0 0 24 284 280 0 79 26 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50 0 0 129 800 48 </pre>
-</section>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+-->
+
+<document>
+
+ <properties>
+ <title>Apache Harmony DRL Virtual Machine</title>
+ <author email="dev@harmony.apache.org">Harmony Documentation Team</author>
+ </properties>
+
+ <body>
+
+<section name="Jitrino.OPT Internal Profiler Tool">
+<p>This document defines the internal
+profiler tool (iprof) for <a href="JIT.html">Jitrino.OPT</a>
+code generator and describes how to use it. The internal profiler can instrument
+ code so that per-method counters of <i>executed</i> (not just compiled)
+ instructions can be dumped. Operation of iprof is configured in the <code>iprof.cfg</code>
+ file, as described in this document. For sample iprof tool output, see the<a href="#ExampleOutput">example</a>.</p>
+<p> To enable iprof, do the following:</p>
+<ol>
+ <li>Specify the following command-line option to DRLVM on startup: <code><br />
+ -XDjit.arg.codegen.iprof=on</code></li>
+ <li> Place the configuration file <code>iprof.cfg</code> in the same directory
+ where you are starting DRLVM.</li>
+</ol>
+<subsection name="Configuring the Profiler">
+<p>The configuration file <code>iprof.cfg</code> consists of a list of global parameters
+ and a list of counters, as defined in this section. For a sample iprof configuration,
+ see the <a href="#ExampleConfig">example</a>. </p>
+<h3>Available global parameters</h3>
+<pre>Config.PrintBBStats=false #(boolean)</pre>
+<p>This parameter turns on statistics dumping for all
+basic blocks of a method.</p>
+<h3>Counters</h3>
+<p>Counters collect information about executed
+ instructions defined by the filter.
+ Counters have the following attributes:</p>
+<ul>
+ <li><em>Name</em> identifies the counter. This attribute is defined by the first
+ line in a <code>[begin]/[end]</code> section starting with <code>Counter.</code>,
+ and all symbols after it and up to
+ the next period <code>.</code> or an
+ equal mark <code>=</code> or <code>\n</code> constitute the name of the counter.</li>
+ <li><em>Title</em> is the for the dumped column. [optional]</li>
+ <li><em>Filter</em> lists properties of
+ the instructions to count. You can define properties for the instruction
+ (mnemonic, the number of operands), for a specific operand (for example,
+ the area of placement) or include run-time information (for example, whether
+ the call is a helper and the helper name). See the list of filter parameters
+ below.
+ <br />All filter parameters can be considered parts
+ of an <code>AND</code> expression. You can also use the
+ <code>IsOr</code> filter attribute to provide an <code>OR</code> operation for all filter parameters, for example:
+ <br /><code>Counter.Name0.IsOr=true</code></li>
+</ul>
+<p class="example">Example</p>
+<pre>###########
+[begin]
+Counter.CALL.Mnemonic=CALL
+[end]
+
+[begin]
+Counter.AddCounter.Title=ADD_EAX_COUNTER
+Counter.AddCounter.Mnemonic=ADD
+Counter.AddCounter.Operand.0.RegName=EAX
+[end]
+###########</pre>
+<p>All properties of an instruction correspond to names of entities of the Jitrino
+IA-32 code generator, for example:</p>
+<pre>Mnemonic_CALL => CALL
+OpndKind_Mem => Mem</pre>
+<dl>
+<dt>Operand attributes</dt>
+<dd>
+<code>Operand.OpNum Operand number (can be *)<br />
+Operand.OpNum.OpndRole Operand role<br />
+Operand.OpNum.OpndKind Operand kind<br />
+Operand.OpNum.RegName Register name<br />
+Operand.OpNum.MemOpndKind Memory operand kind</code>
+</dd>
+
+<dt> Instruction attributes</dt>
+<dd>
+<code>Mnemonic Instruction mnemonic<br />
+OperandNumber Number of operands</code>
+</dd>
+
+<dt> Run-time information attributes</dt>
+<dd>
+<code>RuntimeInfo.Kind Runtime information kind<br />
+RuntimeInfo.HelperID VM Helper identifier<br />
+RuntimeInfo.IntHelperName Internal helper name</code>
+</dd>
+
+<dt>Call instruction attributes </dt>
+<dd>
+<code>isNative<br />
+isStatic<br />
+isSynchronized<br />
+isNoInlining<br />
+isInstance<br />
+isFinal<br />
+isVirtual<br />
+isAbstract<br />
+isClassInitializer<br />
+isInstanceInitializer<br />
+isStrict<br />
+isRequireSecObject<br />
+isInitLocals<br />
+isOverridden</code>
+<p>The counter does not work for other instructions.</p>
+</dd>
+</dl>
+<h3>Re-using Filter Parameters between Counters </h3>
+<p>Filter parameters of a counter can be re-used and
+extended by another counter, for example:</p>
+<pre>[begin]
+Counter.CALL_Inst.Mnemonic=CALL
+[end]
+[begin]
+Counter.I_HELPER_CALL=CALL_Inst
+Counter.I_HELPER_CALL.RuntimeInfo.Kind=InternalHelperAddress
+[end]</pre>
+
+<p class="note" >Warning</p>
+<p class="notetext">Space
+characters should not be used outside comments.</p>
+</subsection>
+<subsection name="Dumping of Counters">
+<p>The iprof tool
+creates the file iprof.stat on exit of
+a DRLVM session in the directory where DRLVM was started. Tabbed text format can
+ be edited by spreadsheets.</p>
+</subsection>
+ </section>
+<section name="Example of iprof Configuration File">
+<a name="ExampleConfig"></a>
+<p>This is an example of the Jitrino.OPT internal profiler configuration.</p>
+<pre>Config.PrintBBStats=true
+[begin]
+#for counting of all instructions you can specify any word as Mnemonic
+Counter.Insts.Mnemonic=Any
+[end]
+
+#hardcoded counters with only parameter "title"
+###############################################
+[begin]
+#Size of java bytecode of a method
+Counter.ByteCodeSize
+[end]
+#
+[begin]
+#Number of execution times of the hottest basic block of a method
+Counter.MaxBBExec
+[end]
+[begin]
+##ID nuber of the hottest basic block
+Counter.HottestBBNum
+[end]
+#
+[begin]
+##Number of exception handlers of a method
+Counter.ExcHandlersNum
+[end]
+#
+[begin]
+#Number of calls of a method
+Counter.MethodExec
+Counter.MethodExec.Title=Number of calls of a method
+[end]
+#
+[begin]
+#Basic block execution count
+Counter.BBExec
+[end]
+################################################
+[begin]
+Counter.OpNum.OpndNumber=3
+[end]
+[begin]
+#count instructions with memory access in first five operands
+Counter.MemOpnd.IsOR=true
+Counter.MemOpnd.Operand.*.OpndKind=Mem
+#Counter.MemOpnd.Operand.1.OpndKind=Mem
+[end]
+[begin]
+Counter.UseOpnd.Operand.0.OpndRole=Use
+[end]
+[begin]
+Counter.EAXOpnd.Operand.0.RegName=EAX
+[end]
+[begin]
+Counter.HeapOpnd.Operand.0.MemOpndKind=Heap
+[end]
+[begin]
+Counter.Method.isNative=true
+Counter.Method.isStatic=true
+Counter.Method.isSynchronized=true
+Counter.Method.isNoInlining=true
+Counter.Method.isInstance=true
+Counter.Method.isFinal=true
+Counter.Method.isVirtual=true
+Counter.Method.isAbstract=true
+Counter.Method.isClassInitializer=true
+Counter.Method.isInstanceInitializer=true
+Counter.Method.isStrict=true
+Counter.Method.isRequireSecObject=true
+Counter.Method.isInitLocals=true
+Counter.Method.isOverridden=true
+[end]
+
+[begin]
+Counter.CALL.Mnemonic=CALL
+[end]
+[begin]
+Counter.I_HELPER_CALL=CALL
+Counter.I_HELPER_CALL.RuntimeInfo.Kind=InternalHelperAddress
+[end]
+[begin]
+Counter.HELPER_CALL=CALL
+Counter.HELPER_CALL.RuntimeInfo.Kind=HelperAddress
+Counter.HELPER_CALL.RuntimeInfo.HelperID=LdString
+[end]</pre>
+</section>
+<section name="Example of Profiler Output">
+<p>This is a fragment of a sample <code>stat</code> file that iprof produces.</p>
+<a name="ExampleOutput"></a>
+<pre>Method name Insts ByteCodeSize MaxBBExec HottestBBNum ExcHandlersNum Number of calls of a method BBExec CALL I_HELPER_CALL HELPER_CALL LDSTRING NEWOBJ_USINGVTABLE NEWVECTOR_USINGVTABLE NEWOBJ NEWVECTOR NEWMULTIARRAY OBJMONITORENTER ObjMonitorExit TYPEMONITORENTER TYPEMONITOREXIT THROW_KEEPSTACKTRACE THROW_SETSTACKTRACE THROW_LAZY NULLPTREXCEPTION ARRAYBOUNDSEXCEPTION ELEMTYPEEXCEPTION DIVIDEBYZEROEXCEPTION THROW_LINKINGEXCEPTION DIVI32 DIVU32 DIVI64 DIVU64 DIVSINGLE DIVDOUBLE REMI32 REMU32 REMI64 REMU64 REMSINGLE RemDouble MulI64 ShlI64 ShrI64 ShruI64 ConvStoI32 ConvStoI64 ConvDtoI32 ConvDtoI64 LdInterface Cast IsInstanceOf InitType IsValidElemType CharArrayCopy MANAGE_CALL MemOpnd Method
+java/lang/Thread.<clinit> 7 13 1 2 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 4 0
+java/lang/Object.<init> 6445 1 6445 2 0 6444 6445 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+java/lang/Thread.<init> 2440 257 24 0 0 24 284 280 0 79 26 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 50 0 0 129 800 48 </pre>
+</section>
</body></document>
Modified: harmony/standard/site/xdocs/subcomponents/drlvm/kernel_classes.html
URL: http://svn.apache.org/viewvc/harmony/standard/site/xdocs/subcomponents/drlvm/kernel_classes.html?view=diff&rev=515560&r1=515559&r2=515560
==============================================================================
--- harmony/standard/site/xdocs/subcomponents/drlvm/kernel_classes.html (original)
+++ harmony/standard/site/xdocs/subcomponents/drlvm/kernel_classes.html Wed Mar 7 05:29:12 2007
@@ -1,3 +1,19 @@
+<!--
+ 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.
+-->
<!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">
@@ -531,6 +547,7 @@
</p>
</body>
</html>
+