RFR: 8337987: Relocate jfr and throw_exception stubs from StubGenerator to SharedRuntime [v5]
Andrew Dinn
adinn at openjdk.org
Wed Aug 14 13:39:23 UTC 2024
On Wed, 14 Aug 2024 13:25:39 GMT, Yudi Zheng <yzheng at openjdk.org> wrote:
>> Hi @mur47x111. Thanks for looking at this PR.
>>
>> I deleted the static field declaration from `vmStructs_jvmci.cpp` because I found no other mention of `throw_delayed_StackOverflowError_entry` under `src/hotspot/share/jvmci`. So, I assumed it was not being used by any JVMCI clients.
>>
>> I am happy to push a patch with your proposed changes. However, I just wanted to check whether you are sure you want to use the name `SharedRuntime_throw_delayed_StackOverflowError_blob` in the new declarations of the `CompilerToVM` field.
>>
>> I am asking because I when I moved the exception stubs from `StubGenerator` to `SharedRuntime` I also made a change in the way the stubs are named, stored and accessed.
>>
>> The original field `StubGenerator::SharedRuntime_throw_delayed_StackOverflowError_entry` stored the entry point for the throw routine and was of type `address`. The getter method that returns the entry address simply returns the field value.
>>
>> The relocated field `SharedRuntime::_throw_delayed_StackOverflowError_blob` stores a pointer to a `RuntimeBlob`, the one that contains the throw routine. That is why the field name ends with `_blob` not `_entry`. The entry address is not stored directly in class `SharedRuntime`. In the new code the getter method computes the address by calling the blob's `entry_point()` method.
>>
>> So, your patch is seems to be mixing up things by using the name `SharedRuntime_throw_delayed_StackOverflowError_blob` for the `CompilerToVM` field but declaring it with type `address`. Would it make more sense to use the name `SharedRuntime_throw_delayed_StackOverflowError_entry` for this field?
>
> Right, `SharedRuntime_throw_delayed_StackOverflowError_entry` is better. Thanks for the explanation!
Ok, I pushed a version of your patch modified to use that name.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20566#discussion_r1716943650
More information about the hotspot-runtime-dev
mailing list