RFR: 8347396: Efficient TypeFunc creations [v3]

Harshit470250 duke at openjdk.org
Thu Dec 4 06:17:59 UTC 2025


On Wed, 3 Dec 2025 08:37:02 GMT, Harshit470250 <duke at openjdk.org> wrote:

>> This PR do similar changes done by [JDK-8330851](https://bugs.openjdk.org/browse/JDK-8330851) on the GC TypeFunc creation as suggested by [JDK-8347396](https://bugs.openjdk.org/browse/JDK-8347396). As discussed in [https://github.com/openjdk/jdk/pull/21782#discussion_r1906535686,](https://github.com/openjdk/jdk/pull/21782#discussion_r1906535686) I have put guard on the shenandoah gc specific part of the code.
>
> Harshit470250 has updated the pull request incrementally with five additional commits since the last revision:
> 
>  - add guard to the include
>  - add load_reference_barrier_Type
>  - add clone_barrier_Type
>  - add write_barrier_pre_Type
>  - revert shenandoah changes

After moving make_clone_type_Type() into barrierSetC2.cpp when I try to include the barrierSetC2.cpp file into runtime.cpp or type.cpp it causes redefinition of many functions.
I get these errors


duplicate symbol 'BarrierSetC2::load_at_resolved(C2Access&, Type const*) const' in:
    /Users/harshitdhiman/jdk/build/macosx-aarch64-server-fastdebug/hotspot/variant-server/libjvm/objs/barrierSetC2.o
    /Users/harshitdhiman/jdk/build/macosx-aarch64-server-fastdebug/hotspot/variant-server/libjvm/objs/runtime.o
duplicate symbol 'BarrierStubC2::entry()' in:
    /Users/harshitdhiman/jdk/build/macosx-aarch64-server-fastdebug/hotspot/variant-server/libjvm/objs/barrierSetC2.o
    /Users/harshitdhiman/jdk/build/macosx-aarch64-server-fastdebug/hotspot/variant-server/libjvm/objs/runtime.o



Can you suggest a way to solve this?

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

PR Comment: https://git.openjdk.org/jdk/pull/27279#issuecomment-3610474295


More information about the shenandoah-dev mailing list