The current fact is that C1 uses more stack space than the C2 compiler, taking method `java.lang.Object::<init>`as an example on the x86_64 platform , the stack size used is 48 bytes for C1 compiler, while only 16 bytes is used for C2 compiler.
========== C1-compiled nmethod =====
0x00007f93311cc747: push %rbp
0x00007f93311cc748: sub $0x30,%rsp // stack sizes is 48 bytes
========== C2-compiled nmethod =======
pushq rbp # Save rbp
subq rsp, #16 # Create frame //stack sizes is 16 bytes
Therefore, the stack space of C1 compiler has great optimization possibilities.
========== C1-compiled nmethod =====
0x00007f93311cc747: push %rbp
0x00007f93311cc748: sub $0x30,%rsp // stack sizes is 48 bytes
========== C2-compiled nmethod =======
pushq rbp # Save rbp
subq rsp, #16 # Create frame //stack sizes is 16 bytes
Therefore, the stack space of C1 compiler has great optimization possibilities.
- duplicates
-
JDK-8292647 javac/lambda/T8031967.java fails with StackOverflowError when use -XX:TieredStopAtLevel=3 on aarch64 and LoongArch
- Closed
- relates to
-
JDK-8323041 tools/javac/lambda/T8031967.java fails with StackOverflowError with C1 on aarch64
- Open
-
JDK-8303147 [s390x] fast & slow debug builds are broken
- Resolved