Apache Harmony is retired at the Apache Software Foundation since Nov 16, 2011.

The information on these pages may be out of date, or may refer to resources that have moved or have been made read-only.
For more information please refer to the Apache Attic

Harmony JRE Command-Line Options

Command-Line options can be either standard or non-standard. While the first set is valid for any JVM the second set of options are specific for a particular VM. This document provides information on command-line options supported by the DRL virtual machine (DRLVM), including component-specific options and properties that can be used during code development and issue evaluation.

Standard JRE Options

To get the list of standard JRE options, run DRLVM with the -help option:

java -help

Non-standard JRE Options

Harmony non-standard options can be divided into the following groups:

Component-specific Options and Properties

(since revision r549299, (Jun 21 2007))

VM Core (vm/vmcore)

Options Comments
-XX:vm.assert_dialog=<true|false> Prevents assertion failures from popping up a dialog box. Default is false.
-XX:vm.crash_handler=<true|false> Invokes the gdb debugger on crashes (POSIX only). Default is false.
-XX:vm.finalize=<true|false> Disables finalization subsystem, that is, prevents starting finalization threads and ignores finalization requests from the GC. Default is true.
-XX:vm.jvmti_compiled_method_load_inlined=<true|false> Reports inlined methods with JVMTI_EVENT_COMPILED_METHOD_LOAD; relevant for the optimizing JIT compiler. Default is false.
-XX:vm_bootclasspath_appendclasspath=<true|false> Appends classpath to the bootclasspath. Default is false.
-XX:vm.dlls=<list> A PATH_SEPARATOR-delimited list of modular dynamic libraries (GC/etc.) to load at startup
-XX:thread.soft_unreservation=<true|false> "soft" unreservation allows transferring lock thread locality from one thread to another. This can give performance benefits on applications with many uncontended and mainly thread-local locks. Be aware that it can introduce performance penalties on applications that have many uncontended, but not thread-local locks. Default is false.
-XX:vm.sort_fields=<true|false> Enables sorting class fields in size-decreasing order to ensure proper alignment. Default is false.
-XX:vm.compact_fields=<true|false> Enables compacting class fields in order to fill the gaps induced by field alignment. Default is false.

Execution Manager (vm/em)

Options Comments
-Xverbose:em Prints method compilation events to stdout to detect the method that failed to compile (not an EM option, but very informative for EM behavior);
Available in the debug build only
-Xem:<config> Specifies the Execution Manager configuration file to use; choose one of the predefined files (client, server, server_aggressive, opt, jet)
or specify your own
-Xem:client Sets the optimization sequence for client applications;
The default EM configuration
-Xem:server Sets the optimization sequence for server applications: the server mode execution analogous to java -server in HotSpot)
-Xem:server_aggressive Sets the optimization sequence for server applications to perform at high speed
-Xem:jet Configures VM to use only the fast-compiling non-optimizing JIT Jitrino.JET
-Xem:opt Configures VM to use only the aggressively optimizing JIT compiler Jitrino.OPT
-XX:em.dll=<dll> Use to specify DRLVM-execution manager (EM) dll to load at startup.
-XX:em.jitPath=<path> Use to override the default path for all JIT dlls in EM.conf with path.
-XX:em.JIT_NAME.jitPath=<path> Use to override the default path for JIT_NAME JIT dll in EM.conf with path.
-XX:em.properties=<path> Sets up a path to em configuration file to use.

JIT Compiler (vm/jitrino)

Options Comments
-XX:jit.arg.log=<log_type> Enables compilation logging for the Jitrino.OPT JIT compiler;
<log_type> is a comma-separated list of the logging types to enable (see below the examples)
-XX:jit.arg.log=rt Turns ON all run-time logging
-XX:jit.arg.log=ct,dbg Turns ON compile-time logging and debug information
-XX:jit.arg.log=ct,irdump,dotdump,info Turns ON full compile-time logging for Jitrino;
WARNING: takes much disk space
-XX:jit.p.filter=.main -XX:jit.p.arg.log=ct,irdump,dotdump Turns ON compile-time logging for methods with names starting with main
-XX:jit.p.filter=java/lang/Math. -XX:jit.p.arg.log=ct,irdump,dotdump Turns ON logging for all methods of a single class
-XX:jit.arg.codegen.iprof=on Enables internal profiler dumps iprof.stat in Jitrino.OPT;
Requires iprof.cfg

GCv5 (vm/gc_gen)

Options Comments
-XX:gc.prefetch=<true|false> Enables prefetching a platform-specific distance ahead when allocating in the TLAB (Thread local allocation buffer). Default is false
-XX:gc.prefetch_distance=N Sets number of bytes prefetched in advance. Default is 1KB
-XX:gc.zeroing_size=N Sets number of bytes cleared ahead when allocating a new block for a thread or no space remains in previous cleared area to hold a newly allocated object. Default is 2KB
-XX:gc.minor_algorithm=STRING Sets GC minor collection algorithm. The following algos are available: MINOR_NONGEN_FORWARD_POOL, MINOR_GEN_FORWARD_POOL, MINOR_NONGEN_SEMISPACE_POOL, MINOR_GEN_SEMISPACE_POOL.
-XX:gc.tospace_size=N Sets to-space size for semi-space collection algo to hold objects survived in NOS after a collection. Default is 1/8 of NOS size
-XX:gc.nos_size=N Specifies a fixed size for NOS (nursery object space or young generation)
-XX:gc.num_collectors=N Specifies the number of collectors used for collections for parallel collection. Default value is usually equals to number of cores available to java process
-XX:gc.use_large_page=<true|false> for Windows or
<hugetlbfs mount point> for Linux
Turns ON/OFF large page support of the platform. Default is false
-XX:gc.verify=<true|false> Turns ON/OFF GC verifier for GC debugging, type to see available options. Default is false
-XX:gc.force_major_collect=<true|false> Forces every collection to be full heap collection (i.e., no minor collections). Default is false
-XX:gc.ignore_finref=<true|false> Turns ON/OFF processing of finalizer and weak references. Default is false
-XX:-gc.heap_iteration Disables JVMTI functionality of heap iteration

GCv41 (vm/gc_cc)

Options Comments
-verbose:gc Enables init messages from GC and information about GC pauses
-XX:-gc.adaptive Disables adaptive selection between GC algorithms: copying and sliding compaction
-XX:gc.type=N Specifies the number of the GC algorithm to use (use together with -Dgc.adaptive=0);
Available algorithms: 1.copying + fallback to sliding compaction; 2.full collection using sliding compaction; 3.sliding compaction
-XX:+gc.heap_iteration Enables heap iteration support needed for using the JVMTI function IterateOverHeap
-XX:+gc.ignore_finalizers Ignores finalizable objects, that is, stops tracking reachability of finalizable object,
does not revive them or pass revived objects to VM for finalization
-XX:+gc.lp On Windows, enables (+) or disables (-) using large pages for more effective TLB utilization;
Use -verbose:gc.lp for more diagnostics
-XX:gc.lp=/mnt/huge On Linux, enables (1) or disables (0) using large pages for more effective TLB utilization; huge pages are allocated with the mmap method.
Specify the mount point where hugetlbfs is mounted. Use -verbose:gc.lp for more diagnostics
-XX:+gc.remember_root_set Enables a root-set caching mode;
By default, the copying collector starts evacuating objects as soon as it starts receiving roots during root set enumeration. This option disables immediate evacuation and ensures no objects are moved until the root-set enumeration is complete

Back to top