RFR: 8330851: C2: More efficient TypeFunc creation

Amit Kumar amitkumar at openjdk.org
Sat Nov 16 05:02:53 UTC 2024


On Sat, 16 Nov 2024 01:45:45 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Lazy computation of TypeFunc.
>> 
>> Testing: Tier1 on Fastdebug & Release VMs (`s390x architecture`)
>
> src/hotspot/share/opto/type.cpp line 716:
> 
>> 714: 
>> 715:   LockNode::lock_type_init();
>> 716:   OptoRuntime::new_instance_Type_init();
> 
> I suggest to move the initialization code into `OptoRuntime`. As a benefit, you'll be able to directly access fields from there, so some trivial `init` methods won't be needed anymore.

"first" call is made from here because of shared space. Otherwise the object-allocation will deleted and VM will crash. That's what I observed. And again that was the reason why the initialization call is made from `Type::Initialize_shared`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21782#discussion_r1844909261


More information about the hotspot-compiler-dev mailing list