RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v6]
Vladimir Ivanov
vlivanov at openjdk.org
Wed Jul 24 19:12:37 UTC 2024
On Wed, 24 Jul 2024 09:03:12 GMT, Andrew Haley <aph at openjdk.org> wrote:
>>> Also also, Klass::is_subtype_of() is used for C1 runtime.
>>
>> Can you elaborate, please? What I'm seeing in `Runtime1::generate_code_for()` for `slow_subtype_check` is a call into `MacroAssembler::check_klass_subtype_slow_path()`.
>
>> > Also also, Klass::is_subtype_of() is used for C1 runtime.
>>
>> Can you elaborate, please?
>
> Sorry, that was rather vague. In C1-compiled code, the Java method `Class::isInstance(Object)`calls `Klass::is_subtype_of()`.
>
> In general, I find it difficult to decide how much work, if any, should be done to improve C1 performance. Clearly, if C1 exists only to help with startup time in a tiered compilation system, the answer is "not much".
Thanks, now I see that `Class::isInstance(Object)` is backed by `Runtime1::is_instance_of()` which uses `oopDesc::is_a()` to do the job.
If it turns out to be performance critical, the intrinsic implementation should be rewritten to exercise existing subtype checking support in C1. As it is implemented now, it's already quite inefficient.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1690303731
More information about the core-libs-dev
mailing list