Index: xdocs/code_scan_tools.xml =================================================================== --- xdocs/code_scan_tools.xml (revision 518091) +++ xdocs/code_scan_tools.xml (working copy) @@ -1,13 +1,12 @@ + + Apache Harmony Code Scanning Tools + Harmony Documentation Team + - - Apache Harmony Code Scanning Tools - Harmony Documentation Team - + +
- -
+

+ The Apache Harmony project is dedicated to producing a codebase that + has clear IP pedigree and protects the IP rights of others. As part + of this effort, we are developing and using tools that help us examine + code in a more effient way. Below are some tools that we either have + created, or are listing to provide awareness. The Apache Harmony project + or the ASF does not endorse or promote any of these tools, projects + or commercial organizations, and does not make any claims as to + suitability, accuracy or dependability. +

+ +

+ Keyword scanning is a simple technique to find "the code you never + knew you had." By searching for a set of well chosen keywords (like + "copyright", "license" etc), you can discover code that may not + be redistributable (you have the license to use by not re-distribute + or re-license), or that you didn't want to contribute. +

+

+ The Apache Harmony Keyword Scanner is a new contribution that can be found + here: +

+

+ + http://svn.apache.org/viewcvs.cgi/harmony/standard/tools/keywordscan/ + +

+

+ We welcome any feedback and further contributions to this or other code-provenance + utilities and tools. +

-

-The Apache Harmony project is dedicated to producing a codebase that -has clear IP pedigree and protects the IP rights of others. As part -of this effort, we are developing and using tools that help us examine -code in a more effient way. Below are some tools that we either have -created, or are listing to provide awareness. The Apache Harmony project -or the ASF does not endorse or promote any of these tools, projects -or commercial organizations, and does not make any claims as to -suitability, accuracy or dependability. -

- + -

-Keyword scanning is a simple technique to find "the code you never -knew you had." By searching for a set of well chosen keywords (like -"copyright", "license" etc), you can discover code that may not -be redistributable (you have the license to use by not re-distribute -or re-license), or that you didn't want to contribute. -

- -

-The Apache Harmony Keyword Scanner is a new contribution that can be found -here : -

- -

- -http://svn.apache.org/viewcvs.cgi/harmony/standard/tools/keywordscan/ - -

- -

-We welcome any feedback and further contributions to this or other code-provenance -utilities and tools. -

- - -
- -
- +
+
Index: xdocs/contribution_policy.xml =================================================================== --- xdocs/contribution_policy.xml (revision 518091) +++ xdocs/contribution_policy.xml (working copy) @@ -1,13 +1,12 @@ - + @@ -30,25 +29,22 @@

Besides our own DRLVM virtual machine, there are also other virtual - machines that work with the Apache Harmony classlibrary : + machines that work with the Apache Harmony class library:

- - -

@@ -72,4 +68,4 @@ - + Index: xdocs/roadmap.xml =================================================================== --- xdocs/roadmap.xml (revision 518091) +++ xdocs/roadmap.xml (working copy) @@ -1,12 +1,11 @@ @@ -23,9 +22,7 @@ Debugging VM and JIT Harmony Documentation Team - - Index: xdocs/subcomponents/drlvm/emguide.xml =================================================================== --- xdocs/subcomponents/drlvm/emguide.xml (revision 518091) +++ xdocs/subcomponents/drlvm/emguide.xml (working copy) @@ -38,33 +38,27 @@ Execution Manager (EM) is a component in DRLVM that controls profile collection and recompilation processes.
-For detailed information on EM, see the - - Execution Manager Component Description - . +For detailed information on EM, see the Execution Manager Component Description.

The set of JIT compilers and profile collectors used at run time and their - relations is stored in the EM configuration file. +relations is stored in the EM configuration file. During the VM initialization phase, EM uses hard-coded configuration or reads -it from the config file, if specified. -
-You can use the following command-line option to make EM read its -configuration from the file:
--Xem:<path to configuration file> -
-or
--Dem.properties=<configuration.file.path> -

+it from the config file, if specified.

+

You can use the following command-line option to make EM read its configuration from the file:

+
-Xem:<path to configuration file>
+or +
-Dem.properties=<configuration.file.path>
+

-The following is a line-by-line description of the default EM configuration. -These configuration settings can be used as a prototype to create +The following is a line-by-line description of the default EM configuration. +These configuration settings can be used as a prototype to create new custom EM configuration files. The default configuration is:

-

+
 chains=chain1,chain2
 
 chain1.jits=JET_CLINIT
@@ -84,79 +78,68 @@
 JET_DPGO_PROFILE. mode=SYNC
 JET_DPGO_PROFILE.entryThreshold=10000
 JET_DPGO_PROFILE.backedgeThreshold=100000
-

-

A line-by-line description of the settings follows.

+
+

A line-by-line description of the settings follows.

 chains=chain1,chain2
 

-Every EM configuration file must define the chains property +Every EM configuration file must define the chains property to indicate sequences of JIT compilers to be used to compile and/or recompile - a method. In this example, two recompilation chains are set for the system: -chain1 and chain2. EM analyzes chains until it has -chosen the chain for the method. + a method. In this example, two recompilation chains are set for the system: +chain1 and chain2. EM analyzes chains until it has +chosen the chain for the method.

 chain1.jits=JET_CLINIT
 chain2.jits=JET_DPGO,OPT
 

-In this case, chain1 has one JIT compiler +In this case, chain1 has one JIT compiler JET_CLINIT, and chain2 has two compilers: JET_DPGO and OPT. -Using these JIT names, EM reads JIT-specific configuration -and passes the names to JIT instances during initialization. -A compiler instance can use its name to distinguish between -its own properties and those of other JITs.
-

-

-Note: Jitrino, the current default DRLVM JIT compiler, -selects Jitrino.JET (fast, non-optimizing compiler) if the name -starts with the JET prefix. Otherwise, the JIT -instance is treated as Jitrino.OPT. -

+Using these JIT names, EM reads JIT-specific configuration +and passes the names to JIT instances during initialization. +A compiler instance can use its name to distinguish between +its own properties and those of other JITs.

+

Note

+

Jitrino, the current default DRLVM JIT compiler, + selects Jitrino.JET (fast, non-optimizing compiler) if the name + starts with the JET prefix. Otherwise, the JIT + instance is treated as Jitrino.OPT.

 chain1.filter=+::<clinit> 
 chain1.filter=-
 

Method filters are used to select methods that will be compiled - by the first JIT in a chain. +by the first JIT in a chain. In this example, the first line configures chain1 -to accept all <clinits> methods -and the second line - to refuse to compile all other methods.
-The order of filters for every chain is significant. Chain - filters can be considered as if-else clauses:
+to accept all <clinits> methods +and the second line - to refuse to compile all other methods

+

The order of filters for every chain is significant. Chain +filters can be considered as if-else clauses:
If a filter matches a method, EM stops examining other filters - and analyzes the first sign in the filter:
+and analyzes the first sign in the filter:

    -
  • For a +, EM requests the first JIT in the -chain to compile the method.
  • -
  • For a -, EM tries the next chain in the list.
  • +
  • For a +, EM requests the first JIT in the +chain to compile the method.
  • +
  • For a -, EM tries the next chain in the list.
-If no filter has matched the compilation request, EM considers -that the method is accepted to be compiled by the chain. -
-Here is a format of all currently supported method filters. -


+

+If no filter has matched the compilation request, EM considers +that the method is accepted to be compiled by the chain. +Here is a format of all currently supported method filters. +

- - - + + + - + - @@ -195,116 +178,104 @@
-Filter Type - -Filter Format - -Filter Examples -Filter TypeFilter FormatFilter Examples
Name filter -Name filter - <class-name>::<method_name><signature> @@ -175,9 +158,9 @@ NUMB or NUM1B..NUM2B -'+10B..100B' accepts all methods of bytecode size in range of +'+10B..100B' accepts all methods of bytecode size in range of [10..100].
-'-20B' rejects all methods of bytecode size equal to 20. +'-20B' rejects all methods of bytecode size equal to 20.
-
-

-Note: The sequential method number could be changed from run -to run in multithreaded environments. -

-

+
+

Note

+

The sequential method number could be changed from run +to run in multithreaded environments.

+
 JET_CLINIT.file=<path to dll>
 JET_DPGO.file=<path to dll>
 OPT.file=<path to dll>
-

+

For every JIT, the configuration file must define the location of the library - file location. -Multiple JIT compilers can be associated with the same library. -For example, all paths can point to the same jit.dll file. -

-

+file location. Multiple JIT compilers can be associated with the same library.
+For example, all paths can point to the same jit.dll file.

+
 JET_DPGO.genProfile=JET_DPGO_PROFILE
 JET_DPGO_PROFILE.profilerType=ENTRY_BACKEDGE_PROFILER
 OPT.useProfile=JET_DPGO_PROFILE
-

+

-These settings define profile collection and recompilation event -configuration for two JIT compilers: JET_DPGO +These settings define profile collection and recompilation event +configuration for two JIT compilers: JET_DPGO and OPT. -The first line configures JET_DPGO to generate a -profile JET_DPGO_PROFILE, -with the type of associated profile collector specified in the -second line. ENTRY_BACKEDGE_PROFILER -is the built-in DRL EM profile collector type. -In the third line, the OPT compiler is configured +The first line configures JET_DPGO to generate a +profile JET_DPGO_PROFILE, +with the type of associated profile collector specified in the +second line. ENTRY_BACKEDGE_PROFILER +is the built-in DRL EM profile collector type. +In the third line, the OPT compiler is configured to use the new profile. -After reading these configuration settings, the execution -manager does the following:
+After reading these configuration settings, the execution +manager does the following:

    -
  1. Instantiates the profile collector of the type -ENTRY_BACKEDGE_PROFILER.
  2. -
  3. Checks whether the JET_DPGO JIT can generate +
  4. Instantiates the profile collector of the type +ENTRY_BACKEDGE_PROFILER.
  5. +
  6. Checks whether the JET_DPGO JIT can generate method profiles of this type; if so, requests the JIT to enable - profile generation.
  7. -
  8. Checks whether the OPT JIT can use method -profiles of this type.
  9. -
  10. Registers the profile collector as active.
  11. + profile generation. +
  12. Checks whether the OPT JIT can use method +profiles of this type.
  13. +
  14. Registers the profile collector as active.
-

-

+
 JET_DPGO_PROFILE. mode=SYNC
 JET_DPGO_PROFILE.entryThreshold=10000
-JET_DPGO_PROFILE.backedgeThreshold=100000 
-

+JET_DPGO_PROFILE.backedgeThreshold=100000 +

-The last 4 lines contain the configuration of the JET_DPGO_PROFILE - profiler. These properties are specific for every profile collector type. -The first option runs entry-backedge profile mode in the SYNC mode: counters -check is done during the code execution. Use ASYNC to run counters -checking in a separate thread. The last 2 options set the profile readiness -threshold. Once the profile is ready, EM dispatches the method for +The last four lines contain the configuration of the JET_DPGO_PROFILE +profiler. These properties are specific for every profile collector type. +The first option runs entry-backedge profile mode in the SYNC mode: counters +check is done during the code execution. Use ASYNC to run counters +checking in a separate thread. The last 2 options set the profile readiness +threshold. Once the profile is ready, EM dispatches the method for recompilation with the next JIT in the current chain.

-Use the following command-line options to trace EM events: -
--verbose:em dumps all EM events.
--verbose:em.JIT_NAME dumps only JIT named -"JIT_NAME" related events.
--verbose:em.profiler.PROFILER_NAME dumps only profiler - "PROFILER_NAME" related events.
+Use the following command-line options to trace EM events:

+
    +
  • -verbose:em dumps all EM events.
  • +
  • -verbose:em.JIT_NAME dumps only JIT named "JIT_NAME" related events.
  • +
  • -verbose:em.profiler.PROFILER_NAME dumps only profiler "PROFILER_NAME" +related events.
  • +
+

+Example

-

- Example -

-

+

For the default EM configuration file, -
--verbose:em.OPT -
dumps all methods names that are compiled with -Jitrino.OPT. According to the configuration details, these methods -are hot methods. -

-

Alternatively, you can get almost the same information by using -the following: -
--verbose:em.profiler.JET_DPGO_PROFILE -
additionally dumps information about hot method profiles. -

+-verbose:em.OPTdumps all methods names that are compiled with +Jitrino.OPT. According to the configuration details, these methods +are hot methods.
+Alternatively, you can get almost the same information by using +the following: +-verbose:em.profiler.JET_DPGO_PROFILE additionally dumps +information about hot method profiles.

-

Examples of output:

-
- -C:\tools\decapo>c:\tools\harmony0706\bin\java.exe -verbose:em.OPT -jar dacapo-beta051009.jar xalan
-EM: recompile start:[OPT n=1] java/io/ByteArrayOutputStream::write(I)V
-EM: recompile done:[OPT n=1] java/io/ByteArrayOutputStream::write(I)V
-EM: recompile start:[OPT n=2] java/lang/String::hashCode()I
-EM: recompile done:[OPT n=2] java/lang/String::hashCode()I
-...
-C:\tools\decapo>c:\tools\harmony0706\bin\java.exe -verbose:em.profiler.JET_DPGO_PROFILE -jar dacapo-beta051009.jar xalan
-EM: entry-backedge profiler intialized: JET_DPGO_PROFILE entry threshold:10000 backedge threshold:100000 mode:SYNC
-EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/io/ByteArrayOutputStream::write(I)V
-EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:59575] java/lang/String::hashCode()I
-EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/lang/String::length()I
-EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/lang/String::charAt(I)C
-EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/charset/Charset::isLetter(C)Z
-EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/charset/Charset::isDigit(C)Z
-EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/Buffer::remaining()I
-EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/util/HashMap::getModuloHash(Ljava/lang/Object;)I
-...
-
-
+

Examples of output:

+
+C:\tools\decapo>c:\tools\harmony0706\bin\java.exe  -verbose:em.OPT -jar dacapo-beta051009.jar xalan
+EM: recompile start:[OPT n=1] java/io/ByteArrayOutputStream::write(I)V
+EM: recompile done:[OPT n=1] java/io/ByteArrayOutputStream::write(I)V
+EM: recompile start:[OPT n=2] java/lang/String::hashCode()I
+EM: recompile done:[OPT n=2] java/lang/String::hashCode()I
+...
+C:\tools\decapo>c:\tools\harmony0706\bin\java.exe  -verbose:em.profiler.JET_DPGO_PROFILE -jar dacapo-beta051009.jar xalan
+EM: entry-backedge profiler intialized: JET_DPGO_PROFILE entry threshold:10000 backedge threshold:100000 mode:SYNC
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/io/ByteArrayOutputStream::write(I)V
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:59575] java/lang/String::hashCode()I
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/lang/String::length()I
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/lang/String::charAt(I)C
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/charset/Charset::isLetter(C)Z
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/charset/Charset::isDigit(C)Z
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/nio/Buffer::remaining()I
+EM: profiler[JET_DPGO_PROFILE] profile is ready [e:10000 b:0] java/util/HashMap::getModuloHash(Ljava/lang/Object;)I
+...  
+

@@ -317,34 +288,34 @@ prefix in the name is a Jitrino.JET instance.
Another difference in these configurations are options passed to the JIT compiler.

-

These configurations have only one JIT and no profile collection or recompilation.

+

These configurations have only one JIT and no profile collection or recompilation.

-Xem:jet - the baseline compiler mode configuration

-

+
 chains=chain1
 chain1.jits=JET
 JET.file=<path to dll>
-

+

-Xem:opt - the client-static mode configuration

-

+
 chains=chain1
 chain1.jits=CS_OPT
 OPT.file=<path to dll>
-

+

-Xem:server_static - the server-static mode configuration

-

+
 chains=chain1
 chain1.jits=SS_OPT
 OPT.file=<path to dll>
-

-
-

These configurations use recompilation and collect profiles.

+
+

These configurations use recompilation and collect profiles.

+

-Xem:client - the default configuration, or client dynamic

-

+
 chains=chain1,chain2
 chain1.jits=JET_CLINIT
 chain2.jits=JET_DPGO,CD_OPT
@@ -369,11 +340,11 @@
 EB_PROF.mode=SYNC
 EB_PROF.entryThreshold=10000
 EB_PROF.backedgeThreshold=100000
-

+

-Xem:server - the server mode configuration, or server dynamic

-

+
 chains=chain1,chain2
 chain1.jits=JET_CLINIT
 chain2.jits=SD1_OPT,SD2_OPT
@@ -394,7 +365,7 @@
 
 SD1_OPT.genProfile=EDGE_PROF
 SD2_OPT.useProfile=EDGE_PROF
-

+

Note

To run VM in the intereter mode, use the -Xint Index: xdocs/subcomponents/drlvm/encoder_library.xml =================================================================== --- xdocs/subcomponents/drlvm/encoder_library.xml (revision 518091) +++ xdocs/subcomponents/drlvm/encoder_library.xml (working copy) @@ -30,7 +30,7 @@

  1. - Revision Ristory + Revision History
  2. About this Document
  3. @@ -66,26 +66,26 @@ - - - +
    Version
    + + - + - - + + - - + + - + - - -
    VersionVersion InformationVersion InformationDate
    Date
    Initial version
    Initial version - Alexander Astapchuk, Svetlana - Konovalova: document created. - + Alexander Astapchuk, Svetlana + Konovalova: document created. + January 30, 2007
    + January 30, 2007 + +
    @@ -331,8 +331,7 @@ - 6.1 Usage Model - +

    6.1 Usage Model

    The base encoding interface EncoderBase::encode() is a common generic @@ -385,7 +384,7 @@ vm/vmcore/include/jvmti_dasm.h.

    - 6.2 Under the Hood +

    6.2 Under the Hood

    The engine gets its input as an operation and a set of @@ -453,7 +452,6 @@ ... } -

    The static data that is a set of bytes is copied into the output buffer with no analysis.