Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  HotSpot Options  (Read 11181 times)
0 Members and 1 Guest are viewing this topic.
Offline Wiki Duke

?





« Posted 2014-02-10 10:47:15 »

Note: you are watching revision 4 of this wiki entry. ( view plain diff )

-Xms
Sets the inital heap space.
EXAMPLE: -Xms2g

-Xmx
Sets the max heap space.

-XX Options



To check all options supported by your VM:
java -server -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal


http://jvm-options.tech.xebia.fr/#
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

Behavior Options


IgnoreUnrecognizedVMOptions (Boolean: false)
Ignore unrecognized VM options.

EagerInitialization (Boolean: false)
Eagerly initialize classes when possible.

GenerateRangeChecks (Boolean: true)
Generate range checks for array accesses

ForceTimeHighResolution (Boolean: false)
WIN32.

OnError (Comma seperated string list: empty)
Run user-defined commands on fatal error; see VMError.cpp for examples

OnOutOfMemoryError (Comma seperated string list: empty)
Run user-defined commands on first java.lang.OutOfMemoryError.
Example: -XX:OnOutOfMemoryError ="sh ~/somescript.sh"

UseCompressedStrings (Boolean: false)
Use byte arrays for strings which are ASCII.

Memory Options


InitialHeapSize (Integer: 0)
Initial heap size (in bytes); zero means OldSize + NewSize

MaxHeapSize (Integer: 96M)
Maximum heap size (in bytes).  -Xmx maps to this.

InitialRAMFraction (Integer: 64)
Fraction (1/n) of real memory used for initial heap size

MaxDirectMemorySize (Integer: -1)
Maximum total size of NIO direct-buffer allocations.

MaxHeapFreeRatio (Integer: 70)
Max percentage of heap free after GC to avoid shrinking.

InitialCodeCacheSize (Integer: platform specific)
Initial code cache size (in bytes)

ReservedCodeCacheSize

UseCodeCacheFlushing

Runtime Compiler Options


AggressiveOpts (Boolean: false)
Turn on optimizations that are expected to be default in upcomming version.

CompileThreshold (Integer: platform specific)
Number of interpreted method invocations before (re)compiling.  Lowering this number gives the compiler less time to gather accurate statistics which could result in slower code and will cause the compiler to run more often which increases CPU burden within a given time window.

DontCompileHugeMethods (Boolean: LOOKUP)
Don't compile methods larger HugeMethodLimit if true.

HugeMethodLimit (Integer: 8000)
Don't compile methods larger than the value if DontCompileHugeMethods is true.

MinInliningThreshold (Integer: 250)
Minimum invocation count a method needs to have to be inlined.

MaxInlineLevel (Integer: 9)
Maximum number of nested calls that are inlined.

MaxRecursiveInlineLevel (Integer: 1)
Maximum number of nested recursive calls that are inlined.

MaxTrivialSize (Integer: 6)
Maximum bytecode size of a trivial method to be inlined

MaxInlineSize (Integer: 35)
Maximum bytecode size of a method to be inlined.

FreqInlineSize (Integer : platform specific)
maximum bytecode size of a frequent method to be inlined

InlineFrequencyRatio (Integer: 20)
Ratio of call site execution to caller method invocation.

InlineSmallCode (Integer: )
Only inline already compiled methods if their code size is less than this.

DelayCompilationDuringStartup (Boolean: true)
Delay invoking the compiler until the main class is loaded.

DesiredMethodLimit (Integer: 8000)
Desired maximum method size (in bytecodes) after inlining.

InlineAccessors (Boolean: true)
Inline accessor methods (get/set)

PerBytecodeRecompilationCutoff (Integer: 200)
Per-BCI limit on repeated recompilation (-1=>'Inf')

PerMethodRecompilationCutoff (Integer: 400)
After recompiling N times, stay in the interpreter (-1=>'Inf').

Garbage Collector Options (General)


InitialSurvivorRatio (Integer: Cool
Initial ratio of eden/survivor space size

InitialTenuringThreshold (Integer: 7)
nitial value for tenuring threshold

DisableExplicitGC (Boolean: false)
Choose if calling
System.gc()
does a full GC.

Debugging aides


LogCompilation (Boolean: false)
Log compilation activity in detail to hotspot.log or LogFile

PrintAssembly (Boolean: false)
Print native assembly code after compiles. Requires external library.
https://wikis.oracle.com/display/HotSpotInternals/PrintAssembly

PrintAssemblyOptions (String: empty)
Options string for PrintAssembly

PrintCompilation (Boolean: false)

PrintInlining (Boolean: false)
Prints inlining optimizations

PrintIntrinsics (Boolean: false)
prints attempted and successful inlining of intrinsics
This wiki entry has had 7 revisions with contributions from 4 members. (more info)
Offline Roquen
« Reply #1 - Posted 2014-02-26 11:29:43 »

Tossed together a small set of options for feedback on organization (like grouping together inline related for instance).  Pretty useless ATM as more detailed descriptions and interactions ideally should be noted.  I can't see any reason to have an exhaustive list here and if GC tuning is desired, it should probably be broken out into different pages.
Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (33 views)
2014-07-18 08:55:21

Zero Volt (29 views)
2014-07-18 01:47:54

danieldean (24 views)
2014-07-18 01:41:23

MustardPeter (26 views)
2014-07-17 01:30:00

Cero (41 views)
2014-07-16 02:42:17

Riven (43 views)
2014-07-14 20:02:53

OpenGLShaders (31 views)
2014-07-14 18:23:47

Riven (30 views)
2014-07-14 13:51:35

quew8 (29 views)
2014-07-13 15:57:52

SHC (64 views)
2014-07-12 19:50:04
HotSpot Options
by dleskov
2014-07-08 05:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 02:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 02:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 13:13:37

HotSpot Options
by Roquen
2014-05-15 11:59:54

HotSpot Options
by Roquen
2014-05-06 17:03:10

Escape Analysis
by Roquen
2014-04-30 00:16:43

Experimental Toys
by Roquen
2014-04-28 15:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!