Created
January 29, 2021 20:46
-
-
Save navyxliu/26d46b26fd58086014dbf0576154d23d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//java -XX:+PrintCompilation -XX:CompileOnly=OSR::main -XX:CompileCommand=quiet -XX:-TieredCompilation OSR | |
import java.io.FileWriter; // Import the FileWriter class | |
import java.io.IOException; // Import the IOException class to handle errors | |
class OSR { | |
public static void main(String[] args) throws IOException { | |
FileWriter writer = new FileWriter("/dev/null"); | |
for (int i=0; i<3_000_000; ++i) { | |
writer.write("."); | |
} | |
writer.close(); | |
} | |
} |
here is c2-only case. only OSR compilation happens.
java -XX:+PrintCompilation -XX:CompileOnly=OSR::main -XX:CompileCommand=quiet -XX:-TieredCompilation OSR
105 1 % OSR::main @ 12 (35 bytes)
6142 1 % OSR::main @ 12 (35 bytes) made not entrant
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
java -XX:+PrintCompilation -XX:CompileOnly=OSR::main -XX:CompileCommand=quiet OSR
325 1 % 3 OSR::main @ 12 (35 bytes)
330 2 3 OSR::main (35 bytes)
521 3 % 4 OSR::main @ 12 (35 bytes)
536 1 % 3 OSR::main @ 12 (35 bytes) made not entrant
6113 3 % 4 OSR::main @ 12 (35 bytes) made not entrant