Java 8 TieredCompilation Blacklist?
Christian Thalinger
christian.thalinger at oracle.com
Wed Apr 15 19:47:54 UTC 2015
exclude is what you want:
$ java -XX:CompileCommand=help
The CompileCommand option enables the user of the JVM to control specific
behavior of the dynamic compilers. Many commands require a pattern that defines
the set of methods the command shall be applied to. The CompileCommand
option provides the following commands:
break,<pattern> - debug breakpoint in compiler and in generated code
print,<pattern> - print assembly
exclude,<pattern> - don't compile or inline
inline,<pattern> - always inline
dontinline,<pattern> - don't inline
compileonly,<pattern> - compile only
log,<pattern> - log compilation
option,<pattern>,<option type>,<option name>,<value>
- set value of custom option
option,<pattern>,<bool option name>
- shorthand for setting boolean flag
quiet - silence the compile command output
help - print this text
The preferred format for the method matching pattern is:
package/Class.method()
For backward compatibility this form is also allowed:
package.Class::method()
The signature can be separated by an optional whitespace or comma:
package/Class.method ()
The class and method identifier can be used together with leading or
trailing *'s for a small amount of wildcarding:
*ackage/Clas*.*etho*()
It is possible to use more than one CompileCommand on the command line:
-XX:CompileCommand=exclude,java/*.* -XX:CompileCommand=log,java*.*
The CompileCommands can be loaded from a file with the flag
-XX:CompileCommandFile=<file> or be added to the file '.hotspot_compiler'
Use the same format in the file as the argument to the CompileCommand flag.
Add one command on each line.
exclude java/*.*
option java/*.* ReplayInline
The following commands have conflicting behavior: 'exclude', 'inline', 'dontinline',
and 'compileonly'. There is no priority of commands. Applying (a subset of) these
commands to the same method results in undefined behavior.
> On Apr 14, 2015, at 3:00 AM, Wolfgang Pedot <wolfgang.pedot at finkzeit.at> wrote:
>
> Hello,
>
> I have recently migrated a big-ish application from 7u40 to 8u40 and I noticed a quite substantial increase in CPU utilisation.
> After doing some research I figured out that the cause of that is TieredCompilation which is now on by default, I have deactivated that feature and now CPU utilisation is back to normal.
> I tested TieredCompilation before on 7u<something> and also had an increase in CPU up to the point where the application actually slowed down so I ended that test.
> A part of the application uses BIRT and that tends to generate a lot of short-lived classes to optimize Javascript-code, my guess is that the tiered compiler compiles those classes in an attempt to optimize them and
> depending on the usage of the system that increases CPU without really accelerating anything (according to statistics). I have found "CompileOnly" which seems to be something to be used for test and development, is there something like a Blacklist I can use to tell the compiler NOT to compile classes in a specific package?
>
> The system had been running for ~13h on 8u40 and used 1.5h of CPU-time for compilation, the previous version running on 7u40 had been up for ~62.5days and only used 36min for compilation. I did notice the much quicker warmup in the response-times after the switch to 8u40 but I dont want the system to spend so much time compiling stuff that does not really improve performance.
>
> any help would be appreciated
>
> Wolfgang
>
More information about the hotspot-compiler-dev
mailing list