RFR: JDK-8241503: C2: Share MacroAssembler between mach nodes during code emission [v4]

Cesar Soares Lucas cslucas at openjdk.org
Tue Dec 5 16:57:59 UTC 2023


On Fri, 1 Dec 2023 03:07:33 GMT, Hao Sun <haosun at openjdk.org> wrote:

>> Cesar Soares Lucas has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits:
>> 
>>  - Fix merge
>>  - Catch up with master branch.
>>    
>>    Merge remote-tracking branch 'origin/master' into reuse-macroasm
>>  - Some inst_mark fixes; Catch up with master.
>>  - Catch up with changes on master
>>  - Reuse same C2_MacroAssembler object to emit instructions.
>
> src/hotspot/share/jvmci/jvmciCodeInstaller.cpp line 1246:
> 
>> 1244:     if (_next_call_type == INVOKESTATIC || _next_call_type == INVOKESPECIAL) {
>> 1245:       // Need a static call stub for transitions from compiled to interpreted.
>> 1246:       C2_MacroAssembler masm(&buffer);
> 
> Hi, I encountered one build failure: JDK build **without C2** fails on Linux/AArch64.
> 
> The configure I used
> 
> 
> --with-debug-level=release --with-jvm-features=-compiler2 --disable-precompiled-headers
> 
> 
> The error log
> 
> 
> === Output from failing command(s) repeated here ===
> * For target hotspot_variant-server_libjvm_gtest_objs_BUILD_GTEST_LIBJVM_link:
> /usr/bin/ld: /tmp/build-release/hotspot/variant-server/libjvm/objs/jvmciCodeInstaller.o: in function `C2_MacroAssembler::C2_MacroAssembler(CodeBuffer*)':
> make/hotspot/src/hotspot/share/opto/c2_MacroAssembler.hpp:38: undefined reference to `vtable for C2_MacroAssembler'
> /usr/bin/ld: make/hotspot/src/hotspot/share/opto/c2_MacroAssembler.hpp:38: undefined reference to `vtable for C2_MacroAssembler'
> collect2: error: ld returned 1 exit status
> * For target hotspot_variant-server_libjvm_objs_BUILD_LIBJVM_link:
> /usr/bin/ld: /tmp/build-release/hotspot/variant-server/libjvm/objs/jvmciCodeInstaller.o: in function `C2_MacroAssembler::C2_MacroAssembler(CodeBuffer*)':
> make/hotspot/src/hotspot/share/opto/c2_MacroAssembler.hpp:38: undefined reference to `vtable for C2_MacroAssembler'
> /usr/bin/ld: make/hotspot/src/hotspot/share/opto/c2_MacroAssembler.hpp:38: undefined reference to `vtable for C2_MacroAssembler'
> collect2: error: ld returned 1 exit status
> 
> * All command lines available in /tmp/build-release/make-support/failure-logs.
> === End of repeated output ===
> 
> 
> I suggest making the following change:
> 
> Suggestion:
> 
>       MacroAssembler masm(&buffer);

Thank you for catch @shqking !

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16484#discussion_r1415982687


More information about the shenandoah-dev mailing list