nashorn/docs/DEVELOPER_README
author sebastian
Wed, 25 Nov 2015 16:33:28 +0100
changeset 34305 e399e6b44631
parent 29834 f678f348c947
child 33686 1391474a6405
permissions -rw-r--r--
8136978: Much nearly duplicated code for vmError support Summary: moved all non os specific code in vmError_[os].cpp to vmError_posix.cpp, moved os specific code to os_[os].cpp and refactored all other references accordingly Reviewed-by: stuefe, coleenp, dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     1
This document describes system properties that are used for internal
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     2
debugging and instrumentation purposes, along with the system loggers,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     3
which are used for the same thing.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     4
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     5
This document is intended as a developer resource, and it is not
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     6
needed as Nashorn documentation for normal usage. Flags and system
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     7
properties described herein are subject to change without notice.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     8
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
     9
=====================================
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    10
1. System properties used internally
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    11
=====================================
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    12
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    13
This documentation of the system property flags assume that the
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    14
default value of the flag is false, unless otherwise specified.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    15
16533
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    16
SYSTEM PROPERTY: -Dnashorn.args=<string>
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    17
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    18
This property takes as its value a space separated list of Nashorn
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
    19
command line options that should be passed to Nashorn. This might be
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
    20
useful in environments where it is hard to tell how a nashorn.jar is
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
    21
launched.
16533
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    22
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    23
Example:
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    24
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    25
> java -Dnashorn.args="--lazy-complation --log=compiler" large-java-app-with-nashorn.jar 
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    26
> ant -Dnashorn.args="--log=codegen" antjob
6ae708677f92 8010706: -Dnashorn.args system property to create command lines to wrapped nashorn.jar:s
lagergren
parents: 16259
diff changeset
    27
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    28
SYSTEM PROPERTY: -Dnashorn.args.prepend=<string>
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    29
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    30
This property behaves like nashorn.args, but adds the given arguments
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    31
before the existing ones instead of after them. Later arguments will
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    32
overwrite earlier ones, so this is useful for setting default arguments
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    33
that can be overwritten.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    34
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    35
16152
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    36
SYSTEM PROPERTY: -Dnashorn.unstable.relink.threshold=x
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    37
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    38
This property controls how many call site misses are allowed before a 
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    39
callsite is relinked with "apply" semantics to never change again. 
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    40
In the case of megamorphic callsites, this is necessary, or the 
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    41
program would spend all its time swapping out callsite targets. Dynalink 
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    42
has a default value (currently 8 relinks) for this property if it 
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    43
is not explicitly set.
ea430b83d74d 8005789: Forgot to document -Dnashorn.unstable.relink.threshold
lagergren
parents: 16147
diff changeset
    44
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    45
16227
1bafb74d17b2 8007956: Wrong or obsolete system properties in docs/DEVELOPER_README
hannesw
parents: 16201
diff changeset
    46
SYSTEM PROPERTY: -Dnashorn.compiler.splitter.threshold=x
16168
f0c208287983 8005976: Break out AccessSpecializer into one pass before CodeGenerator instead of iterative applications from CodeGenerator
lagergren
parents: 16152
diff changeset
    47
f0c208287983 8005976: Break out AccessSpecializer into one pass before CodeGenerator instead of iterative applications from CodeGenerator
lagergren
parents: 16152
diff changeset
    48
This will change the node weight that requires a subgraph of the IR to
f0c208287983 8005976: Break out AccessSpecializer into one pass before CodeGenerator instead of iterative applications from CodeGenerator
lagergren
parents: 16152
diff changeset
    49
be split into several classes in order not to run out of bytecode space.
f0c208287983 8005976: Break out AccessSpecializer into one pass before CodeGenerator instead of iterative applications from CodeGenerator
lagergren
parents: 16152
diff changeset
    50
The default value is 0x8000 (32768).
f0c208287983 8005976: Break out AccessSpecializer into one pass before CodeGenerator instead of iterative applications from CodeGenerator
lagergren
parents: 16152
diff changeset
    51
f0c208287983 8005976: Break out AccessSpecializer into one pass before CodeGenerator instead of iterative applications from CodeGenerator
lagergren
parents: 16152
diff changeset
    52
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    53
SYSTEM PROPERTY: -Dnashorn.serialize.compression=<x>
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
    54
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    55
This property sets the compression level used when deflating serialized
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    56
AST structures of anonymous split functions. Valid values range from 0 to 9,
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    57
the default value is 4. Higher values will reduce memory size of serialized
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    58
AST but increase CPU usage required for compression.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    59
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    60
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    61
SYSTEM PROPERTY: -Dnashorn.codegen.debug.trace=<x>
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    62
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    63
See the description of the codegen logger below.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    64
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    65
29834
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    66
SYSTEM PROPERTY: -Dnashorn.fields.objects, -Dnashorn.fields.dual
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    67
29834
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    68
When the nashorn.fields.objects property is true, Nashorn will always
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    69
use object fields for AccessorProperties, requiring boxing for all
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    70
primitive property values. When nashorn.fields.dual is set, Nashorn
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    71
will always use dual long/object fields, which allows primitives to be
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    72
stored without boxing. When neither system property is set, Nashorn
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    73
chooses a setting depending on the optimistic types setting (dual
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    74
fields when optimistic types are enabled, object-only fields otherwise).
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    75
29834
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    76
With dual fields, Nashorn uses long fields to store primitive values.
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    77
Ints are represented as the 32 low bits of the long fields. Doubles
f678f348c947 8067215: Disable dual fields when not using optimistic types
hannesw
parents: 27210
diff changeset
    78
are represented as the doubleToLongBits of their value. This way a
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    79
single field can be used for all primitive types. Packing and
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    80
unpacking doubles to their bit representation is intrinsified by
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
    81
the JVM and extremely fast.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    82
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    83
In the future, this might complement or be replaced by experimental
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    84
feature sun.misc.TaggedArray, which has been discussed on the mlvm
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    85
mailing list. TaggedArrays are basically a way to share data space
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    86
between primitives and references, and have the GC understand this.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    87
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    88
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
    89
SYSTEM PROPERTY: -Dnashorn.compiler.symbol.trace=[<x>[,*]], 
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
    90
  -Dnashorn.compiler.symbol.stacktrace=[<x>[,*]]
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    91
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    92
When this property is set, creation and manipulation of any symbol
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    93
named "x" will show information about when the compiler changes its
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    94
type assumption, bytecode local variable slot assignment and other
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    95
data. This is useful if, for example, a symbol shows up as an Object,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    96
when you believe it should be a primitive. Usually there is an
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
    97
explanation for this, for example that it exists in the global scope
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
    98
and type analysis has to be more conservative. 
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
    99
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   100
Several symbols names to watch can be specified by comma separation.
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   101
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   102
If no variable name is specified (and no equals sign), all symbols
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   103
will be watched
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   104
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   105
By using "stacktrace" instead of or together with "trace", stack
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   106
traces will be displayed upon symbol changes according to the same
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   107
semantics.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   108
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   109
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   110
SYSTEM PROPERTY: -Dnashorn.lexer.xmlliterals
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   111
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   112
If this property it set, it means that the Lexer should attempt to
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   113
parse XML literals, which would otherwise generate syntax
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   114
errors. Warning: there are currently no unit tests for this
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   115
functionality.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   116
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   117
XML literals, when this is enabled, end up as standard LiteralNodes in
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   118
the IR.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   119
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   120
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   121
SYSTEM_PROPERTY: -Dnashorn.debug
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   122
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   123
If this property is set to true, Nashorn runs in Debug mode. Debug
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   124
mode is slightly slower, as for example statistics counters are enabled
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   125
during the run. Debug mode makes available a NativeDebug instance
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   126
called "Debug" in the global space that can be used to print property
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   127
maps and layout for script objects, as well as a "dumpCounters" method
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   128
that will print the current values of the previously mentioned stats
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   129
counters.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   130
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   131
These functions currently exists for Debug:
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   132
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   133
"map" - print(Debug.map(x)) will dump the PropertyMap for object x to
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   134
stdout (currently there also exist functions called "embedX", where X
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   135
is a value from 0 to 3, that will dump the contents of the embed pool
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   136
for the first spill properties in any script object and "spill", that
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   137
will dump the contents of the growing spill pool of spill properties
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   138
in any script object. This is of course subject to change without
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   139
notice, should we change the script object layout.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   140
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   141
"methodHandle" - this method returns the method handle that is used
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   142
for invoking a particular script function.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   143
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   144
"identical" - this method compares two script objects for reference
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   145
equality. It is a == Java comparison
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   146
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   147
"equals" - Returns true if two objects are either referentially
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   148
identical or equal as defined by java.lang.Object.equals.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   149
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   150
"dumpCounters" - will dump the debug counters' current values to
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   151
stdout.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   152
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   153
Currently we count number of ScriptObjects in the system, number of
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   154
Scope objects in the system, number of ScriptObject listeners added,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   155
removed and dead (without references).
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   156
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   157
We also count number of ScriptFunctions, ScriptFunction invocations
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   158
and ScriptFunction allocations.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   159
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   160
Furthermore we count PropertyMap statistics: how many property maps
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   161
exist, how many times were property maps cloned, how many times did
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   162
the property map history cache hit, prevent new allocations, how many
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   163
prototype invalidations were done, how many time the property map
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   164
proto cache hit.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   165
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   166
Finally we count callsite misses on a per callsite bases, which occur
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   167
when a callsite has to be relinked, due to a previous assumption of
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   168
object layout being invalidated.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   169
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   170
"getContext" - return the current Nashorn context.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   171
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   172
"equalWithoutType" - Returns true if if the two objects are both
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   173
property maps, and they have identical properties in the same order,
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   174
but allows the properties to differ in their types.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   175
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   176
"diffPropertyMaps" Returns a diagnostic string representing the difference
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   177
of two property maps.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   178
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   179
"getClass" - Returns the Java class of an object, or undefined if null.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   180
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   181
"toJavaString" - Returns the Java toString representation of an object.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   182
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   183
"toIdentString" - Returns a string representation of an object consisting
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   184
of its java class name and hash code.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   185
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   186
"getListenerCount" - Return the number of property listeners for a
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   187
script object.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   188
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   189
"getEventQueueCapacity" - Get the capacity of the event queue.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   190
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   191
"setEventQueueCapacity" - Set the event queue capacity.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   192
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   193
"addRuntimeEvent" - Add a runtime event to the runtime event queue.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   194
The queue has a fixed size (see -Dnashorn.runtime.event.queue.size)
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   195
and the oldest entry will be thrown out of the queue is about to overflow.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   196
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   197
"expandEventQueueCapacity" - Expands the event queue capacity,
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   198
or truncates if capacity is lower than current capacity. Then only
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   199
the newest entries are kept.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   200
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   201
"clearRuntimeEvents" - Clear the runtime event queue.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   202
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   203
"removeRuntimeEvent" - Remove a specific runtime event from the event queue.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   204
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   205
"getRuntimeEvents" - Return all runtime events in the queue as an array.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   206
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   207
"getLastRuntimeEvent" - Return the last runtime event in the queue.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   208
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   209
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   210
SYSTEM PROPERTY: -Dnashorn.methodhandles.debug.stacktrace
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   211
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   212
This enhances methodhandles logging (see below) to also dump the
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   213
stack trace for every instrumented method handle operation.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   214
Warning: This is enormously verbose, but provides a pretty
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   215
decent "grep:able" picture of where the calls are coming from.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   216
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   217
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   218
SYSTEM PROPERTY: -Dnashorn.cce
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   219
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   220
Setting this system property causes the Nashorn linker to rely on
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   221
ClassCastExceptions for triggering a callsite relink. If not set, the linker
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   222
will add an explicit instanceof guard.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   223
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   224
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   225
SYSTEM PROPERTY: -Dnashorn.spill.threshold=<x>
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   226
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   227
This property sets the number of fields in an object from which to use
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   228
generic array based spill storage instead of Java fields. The default value
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   229
is 256.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   230
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   231
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   232
SYSTEM PROPERTY: -Dnashorn.tcs.miss.samplePercent=<x>
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   233
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   234
When running with the trace callsite option (-tcs), Nashorn will count
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   235
and instrument any callsite misses that require relinking. As the
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   236
number of relinks is large and usually produces a lot of output, this
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   237
system property can be used to constrain the percentage of misses that
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   238
should be logged. Typically this is set to 1 or 5 (percent). 1% is the
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   239
default value.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   240
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   241
SYSTEM PROPERTY: -Dnashorn.persistent.code.cache
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   242
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   243
This property can be used to set the directory where Nashorn stores
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   244
serialized script classes generated with the -pcc/--persistent-code-cache
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   245
option. The default directory name is "nashorn_code_cache".
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   246
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   247
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   248
SYSTEM PROPERTY: -Dnashorn.typeInfo.maxFiles
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   249
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   250
Maximum number of files to store in the type info cache. The type info cache
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   251
is used to cache type data of JavaScript functions when running with
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   252
optimistic types (-ot/--optimistic-types). There is one file per JavaScript
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   253
function in the cache.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   254
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   255
The default value is 0 which means the feature is disabled. Setting this
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   256
to something like 20000 is probably good enough for most applications and
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   257
will usually cap the cache directory to about 80MB presuming a 4kB
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   258
filesystem allocation unit. Set this to "unlimited" to run without limit.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   259
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   260
If the value is not 0 or "unlimited", Nashorn will spawn a cleanup thread
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   261
that makes sure the number of files in the cache does not exceed the given
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   262
value by deleting the least recently modified files.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   263
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   264
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   265
SYSTEM PROPERTY: -Dnashorn.typeInfo.cacheDir
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   266
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   267
This property can be used to set the directory where Nashorn stores the
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   268
type info cache when -Dnashorn.typeInfo.maxFiles is set to a nonzero
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   269
value. The default location is platform specific. On Windows, it is
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   270
"${java.io.tmpdir}\com.oracle.java.NashornTypeInfo". On Linux and
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   271
Solaris it is "~/.cache/com.oracle.java.NashornTypeInfo". On Mac OS X,
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   272
it is "~/Library/Caches/com.oracle.java.NashornTypeInfo".
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   273
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   274
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   275
SYSTEM PROPERTY: -Dnashorn.typeInfo.cleanupDelaySeconds=<value>
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   276
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   277
This sets the delay between cleanups of the typeInfo cache, in seconds.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   278
The default delay is 20 seconds.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   279
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   280
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   281
SYSTEM PROPERTY: -Dnashorn.profilefile=<filename>
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   282
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   283
When running with the profile callsite options (-pcs), Nashorn will
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   284
dump profiling data for all callsites to stderr as a shutdown hook. To
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   285
instead redirect this to a file, specify the path to the file using
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   286
this system property.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   287
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   288
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   289
SYSTEM_PROPERTY: -Dnashorn.regexp.impl=[jdk|joni]
16259
bb504280c322 8006028: Integrate Joni regexp engine with Nashorn
hannesw
parents: 16227
diff changeset
   290
bb504280c322 8006028: Integrate Joni regexp engine with Nashorn
hannesw
parents: 16227
diff changeset
   291
This property defines the regular expression engine to be used by
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   292
Nashorn. Set this flag to "jdk" to get an implementation based on the
16259
bb504280c322 8006028: Integrate Joni regexp engine with Nashorn
hannesw
parents: 16227
diff changeset
   293
JDK's java.util.regex package. Set this property to "joni" to install
bb504280c322 8006028: Integrate Joni regexp engine with Nashorn
hannesw
parents: 16227
diff changeset
   294
an implementation based on Joni, the regular expression engine used by
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   295
the JRuby project. The default value for this flag is "joni"
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   296
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   297
SYSTEM PROPERTY: -Dnashorn.runtime.event.queue.size=<value>
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   298
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   299
Nashorn provides a fixed sized runtime event queue for debugging purposes.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   300
See -Dnashorn.debug for methods to access the event queue.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   301
The default value is 1024.
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   302
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   303
===============
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   304
2. The loggers.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   305
===============
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   306
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   307
It is very simple to create your own logger. Use the DebugLogger class
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   308
and give the subsystem name as a constructor argument.
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   309
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   310
The Nashorn loggers can be used to print per-module or per-subsystem
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   311
debug information with different levels of verbosity. The loggers for
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   312
a given subsystem are available are enabled by using
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   313
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   314
--log=<systemname>[:<level>]
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   315
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   316
on the command line.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   317
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   318
Here <systemname> identifies the name of the subsystem to be logged
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   319
and the optional colon and level argument is a standard
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   320
java.util.logging.Level name (severe, warning, info, config, fine,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   321
finer, finest). If the level is left out for a particular subsystem,
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   322
it defaults to "info". Any log message logged as the level or a level
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   323
that is more important will be output to stderr by the logger.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   324
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   325
Several loggers can be enabled by a single command line option, by
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   326
putting a comma after each subsystem/level tuple (or each subsystem if
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   327
level is unspecified). The --log option can also be given multiple
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   328
times on the same command line, with the same effect.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   329
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   330
For example: --log=codegen,fields:finest is equivalent to
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   331
--log=codegen:info --log=fields:finest
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   332
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   333
The following is an incomplete list of subsystems that currently
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   334
support logging. Look for classes implementing
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   335
jdk.nashorn.internal.runtime.logging.Loggable for more loggers.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   336
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   337
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   338
* compiler
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   339
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   340
The compiler is in charge of turning source code and function nodes
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   341
into byte code, and installs the classes into a class loader
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   342
controlled from the Context. Log messages are, for example, about
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   343
things like new compile units being allocated. The compiler has global
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   344
settings that all the tiers of codegen (e.g. Lower and CodeGenerator)
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   345
use.s
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   346
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   347
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   348
* recompile
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   349
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   350
This logger shows information about recompilation of scripts and
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   351
functions at runtime. Recompilation may happen because a function
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   352
was called with different parameter types, or because an optimistic
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   353
assumption failed while executing a function with -ot/--optimistic-types.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   354
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   355
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   356
* codegen
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   357
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   358
The code generator is the emitter stage of the code pipeline, and
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   359
turns the lowest tier of a FunctionNode into bytecode. Codegen logging
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   360
shows byte codes as they are being emitted, line number information
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   361
and jumps. It also shows the contents of the bytecode stack prior to
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   362
each instruction being emitted. This is a good debugging aid. For
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   363
example:
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   364
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   365
[codegen] #41                       line:2 (f)_afc824e 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   366
[codegen] #42                           load symbol x slot=2 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   367
[codegen] #43  {1:O}                    load int 0 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   368
[codegen] #44  {2:I O}                  dynamic_runtime_call GT:ZOI_I args=2 returnType=boolean 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   369
[codegen] #45                              signature (Ljava/lang/Object;I)Z 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   370
[codegen] #46  {1:Z}                    ifeq  ternary_false_5402fe28 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   371
[codegen] #47                           load symbol x slot=2 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   372
[codegen] #48  {1:O}                    goto ternary_exit_107c1f2f 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   373
[codegen] #49                       ternary_false_5402fe28 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   374
[codegen] #50                           load symbol x slot=2 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   375
[codegen] #51  {1:O}                    convert object -> double 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   376
[codegen] #52  {1:D}                    neg 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   377
[codegen] #53  {1:D}                    convert double -> object 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   378
[codegen] #54  {1:O}                ternary_exit_107c1f2f 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   379
[codegen] #55  {1:O}                    return object 
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   380
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   381
shows a ternary node being generated for the sequence "return x > 0 ?
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   382
x : -x"
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   383
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   384
The first number on the log line is a unique monotonically increasing
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   385
emission id per bytecode. There is no guarantee this is the same id
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   386
between runs.  depending on non deterministic code
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   387
execution/compilation, but for small applications it usually is. If
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   388
the system variable -Dnashorn.codegen.debug.trace=<x> is set, where x
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   389
is a bytecode emission id, a stack trace will be shown as the
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   390
particular bytecode is about to be emitted. This can be a quick way to
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   391
determine where it comes from without attaching the debugger. "Who
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   392
generated that neg?"
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   393
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   394
The --log=codegen option is equivalent to setting the system variable
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   395
"nashorn.codegen.debug" to true.
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   396
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   397
* fold
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   398
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   399
Shows constant folding taking place before lowering
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   400
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   401
* lower
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   402
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   403
This is the first lowering pass.
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   404
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   405
Lower is a code generation pass that turns high level IR nodes into
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   406
lower level one, for example substituting comparisons to RuntimeNodes
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   407
and inlining finally blocks.
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   408
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   409
Lower is also responsible for determining control flow information
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   410
like end points.
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   411
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   412
* symbols
16201
889ddb179cdf 8007062: Split Lower up into Lower/Attr/FinalizeTypes. Integrate AccessSpecalizer into FinalizeTypes.
lagergren
parents: 16168
diff changeset
   413
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   414
The symbols logger tracks the assignment os symbols to identifiers.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   415
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   416
* scopedepths
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   417
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   418
This logs the calculation of scope depths for non-local symbols.
16147
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   419
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   420
* fields
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   421
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   422
The --log=fields option (at info level) is equivalent to setting the
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   423
system variable "nashorn.fields.debug" to true. At the info level it
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   424
will only show info about type assumptions that were invalidated. If
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   425
the level is set to finest, it will also trace every AccessorProperty
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   426
getter and setter in the program, show arguments, return values
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   427
etc. It will also show the internal representation of respective field
e63b63819133 8005403: Open-source Nashorn
jlaskey
parents:
diff changeset
   428
(Object in the normal case, unless running with the dual field
16168
f0c208287983 8005976: Break out AccessSpecializer into one pass before CodeGenerator instead of iterative applications from CodeGenerator
lagergren
parents: 16152
diff changeset
   429
representation)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   430
24766
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   431
* time
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   432
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   433
This enables timers for various phases of script compilation. The timers
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   434
will be dumped when the Nashorn process exits. We see a percentage value
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   435
of how much time was spent not executing bytecode (i.e. compilation and
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   436
internal tasks) at the end of the report. 
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   437
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   438
A finer level than "info" will show individual compilation timings as they
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   439
happen.
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   440
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   441
Here is an example:
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   442
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   443
[time] Accumulated complation phase Timings:
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   444
[time] 
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   445
[time] 'JavaScript Parsing'              1076 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   446
[time] 'Constant Folding'                 159 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   447
[time] 'Control Flow Lowering'            303 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   448
[time] 'Program Point Calculation'        282 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   449
[time] 'Builtin Replacement'               71 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   450
[time] 'Code Splitting'                   670 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   451
[time] 'Symbol Assignment'                474 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   452
[time] 'Scope Depth Computation'          249 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   453
[time] 'Optimistic Type Assignment'       186 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   454
[time] 'Local Variable Type Calculation'  526 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   455
[time] 'Bytecode Generation'             5177 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   456
[time] 'Class Installation'              1854 ms
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   457
[time] 
7b54e2362c6c 8043632: Parallelize class installation and various script fixes.
lagergren
parents: 19632
diff changeset
   458
[time] Total runtime: 11994 ms (Non-runtime: 11027 ms [91%])
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   459
27210
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   460
* methodhandles
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   461
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   462
If this logger is enabled, each MethodHandle related call that uses
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   463
the java.lang.invoke package gets its MethodHandle intercepted and an
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   464
instrumentation printout of arguments and return value appended to
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   465
it. This shows exactly which method handles are executed and from
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   466
where. (Also MethodTypes and SwitchPoints).
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   467
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   468
* classcache
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   469
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   470
This logger shows information about reusing code classes using the
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   471
in-memory class cache. Nashorn will try to avoid compilation of
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   472
scripts by using existing classes. This can significantly improve
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   473
performance when repeatedly evaluating the same script.
a04ede4787ba 8059813: Type Info Cache flag must must be documented
hannesw
parents: 24767
diff changeset
   474
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   475
=======================
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   476
3. Undocumented options
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   477
=======================
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   478
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   479
Here follows a short description of undocumented options for Nashorn.
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   480
To see a list of all undocumented options, use the (undocumented) flag
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   481
"-xhelp".
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   482
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   483
i.e. jjs -xhelp or java -jar nashorn.jar -xhelp
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   484
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   485
Undocumented options are not guaranteed to work, run correctly or be
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   486
bug free. They are experimental and for internal or debugging use.
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   487
They are also subject to change without notice.
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   488
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   489
In practice, though, all options below not explicitly documented as
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   490
EXPERIMENTAL can be relied upon, for example --dump-on-error is useful
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   491
for any JavaScript/Nashorn developer, but there is no guarantee.
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   492
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   493
A short summary follows:
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   494
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   495
	-D (-Dname=value. Set a system property. This option can be repeated.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   496
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   497
	-ccs, --class-cache-size (Size of the Class cache size per global scope.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   498
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   499
	-cp, -classpath (-cp path. Specify where to find user class files.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   500
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   501
	-co, --compile-only (Compile without running.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   502
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   503
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   504
	-d, --dump-debug-dir (specify a destination directory to dump class files.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   505
		param: <path>   
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   506
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   507
	--debug-lines (Generate line number table in .class files.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   508
		param: [true|false]   default: true
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   509
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   510
	--debug-locals (Generate local variable table in .class files.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   511
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   512
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   513
	-doe, -dump-on-error (Dump a stack trace on errors.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   514
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   515
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   516
	--early-lvalue-error (invalid lvalue expressions should be reported as early errors.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   517
		param: [true|false]   default: true
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   518
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   519
	--empty-statements (Preserve empty statements in AST.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   520
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   521
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   522
	-fv, -fullversion (Print full version info of Nashorn.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   523
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   524
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   525
	--function-statement-error (Report an error when function declaration is used as a statement.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   526
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   527
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   528
	--function-statement-warning (Warn when function declaration is used as a statement.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   529
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   530
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   531
	-fx (Launch script as an fx application.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   532
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   533
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   534
	--global-per-engine (Use single Global instance per script engine instance.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   535
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   536
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   537
	-h, -help (Print help for command line flags.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   538
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   539
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   540
	--loader-per-compile (Create a new class loader per compile.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   541
		param: [true|false]   default: true
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   542
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   543
	-l, --locale (Set Locale for script execution.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   544
		param: <locale>   default: en-US
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   545
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   546
	--log (Enable logging of a given level for a given number of sub systems. 
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   547
	      [for example: --log=fields:finest,codegen:info].)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   548
		param: <module:level>,*   
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   549
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   550
	-nj, --no-java (Disable Java support.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   551
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   552
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   553
	-nse, --no-syntax-extensions (Disallow non-standard syntax extensions.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   554
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   555
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   556
	-nta, --no-typed-arrays (Disable typed arrays support.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   557
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   558
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   559
	--parse-only (Parse without compiling.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   560
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   561
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   562
	--print-ast (Print abstract syntax tree.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   563
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   564
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   565
	-pc, --print-code (Print generated bytecode. If a directory is specified, nothing will 
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   566
	                  be dumped to stderr. Also, in that case, .dot files will be generated 
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   567
	                  for all functions or for the function with the specified name only.)
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   568
		param: [dir:<output-dir>,function:<name>]   
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   569
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   570
	--print-lower-ast (Print lowered abstract syntax tree.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   571
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   572
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   573
	-plp, --print-lower-parse (Print the parse tree after lowering.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   574
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   575
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   576
	--print-mem-usage (Print memory usage of IR after each compile stage.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   577
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   578
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   579
	--print-no-newline (Print function will not print new line char.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   580
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   581
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   582
	-pp, --print-parse (Print the parse tree.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   583
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   584
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   585
	--print-symbols (Print the symbol table.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   586
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   587
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   588
	-pcs, --profile-callsites (Dump callsite profile data.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   589
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   590
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   591
	-scripting (Enable scripting features.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   592
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   593
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   594
	--stderr (Redirect stderr to a filename or to another tty, e.g. stdout.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   595
		param: <output console>   
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   596
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   597
	--stdout (Redirect stdout to a filename or to another tty, e.g. stderr.)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   598
		param: <output console>   
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   599
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   600
	-strict (Run scripts in strict mode.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   601
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   602
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   603
	-t, -timezone (Set timezone for script execution.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   604
		param: <timezone>   default: Europe/Stockholm
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   605
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   606
	-tcs, --trace-callsites (Enable callsite trace mode. Options are: miss [trace callsite misses] 
24767
0b8af588070b 8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)
lagergren
parents: 24766
diff changeset
   607
	                         enterexit [trace callsite enter/exit], objects [print object properties].)
19632
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   608
		param: [=[option,]*]   
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   609
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   610
	--verify-code (Verify byte code before running.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   611
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   612
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   613
	-v, -version (Print version info of Nashorn.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   614
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   615
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   616
	-xhelp (Print extended help for command line flags.)
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   617
		param: [true|false]   default: false
c9d704ad422e 8023454: Updated DEVELOPER_README and command line flags, ensuring that undocumented flags that aren't guaranteed to work (disabled by default) and that are work in progress show up with an EXPERIMENTAL tag.
lagergren
parents: 16533
diff changeset
   618