[7u] Any options in the hotspot compiler to force recompilation?

Keith Chapman keithgchapman at gmail.com
Wed Nov 11 15:08:49 UTC 2015


Hi,

I'm working on a project that uses  openjdk-7u40 where I want to run
everything compiled and calling into compiled methods directly. I attemt
this by running the program with -XX:-UseInterpreter (I've also tried
-Xcomp -Xbatch). Assume I have the following code

public static void main(String[] args) {
    A();
}

public static void A() {
    B();
}

public static void B() {

}

As A gets compiled before B in the above case, the compiled code of A does
not have a direct call to the compiled code of B. It goes through a stub.
If I modify the main method slightly as follows,

public static void main(String[] args) {
    B();
    A();
}

then A directly calls the compiled version of the method of B (As B gets
compiled before A). Are there any options in the compiler that I could turn
on so that it always jumps into the compiled code rather than the stub?
Some option to force recompilation may be?

Thanks,
keith.


More information about the hotspot-dev mailing list