On Wed, 24 Jul 2024 19:09:06 GMT, Vladimir Ivanov <vliva...@openjdk.org> wrote:
>>> > 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. I did write an intrinsic for that, but it made this patch even larger. I have a small patch for C1, for some other time. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1691491950