Created
September 20, 2024 12:30
-
-
Save rkennke/8a57610d74fcde07a9390f268ec35738 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
| class TestC2Lilliput { | |
| private static Object[] foo; | |
| public static void main(String[] args) throws Exception { | |
| int idx = Integer.parseInt(args[0]); | |
| foo = new Object[100]; | |
| foo[idx] = new Object(); | |
| Class cls = test(idx); | |
| System.out.println(cls); | |
| } | |
| static Class test(int idx) { | |
| return foo[idx].getClass(); | |
| } | |
| } | |
| java -Xcomp -XX:CompileOnly=TestC2Lilliput::test -XX:-TieredCompilation -XX:+PrintAssembly -Xmx20g -XX:HeapBaseMinAddress=100G -Xlog:gc+heap+coops=Debug -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders TestC2Lilliput |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment