RFR: 8331341: secondary_super_cache does not scale well: C1 and interpreter [v6]

Andrew Haley aph at openjdk.org
Wed Jul 24 16:17:34 UTC 2024


On Wed, 24 Jul 2024 15:51:26 GMT, Andrew Haley <aph at openjdk.org> wrote:

>>> What happens when users include `klass.hpp`, but not `klass.inline.hpp`? How does it affect generated code?
>>> 
>>> I suspect that `Klass::search_secondary_supers()` won't be inlinined in such case.
>> 
>> That is true. I can't tell from this exchange whether you think it should. The same "wont be inlined" fact is also true of everything else in `klass.inline.hpp`.
>
>> I suspect that Klass::search_secondary_supers() won't be inlinined in such case.
> 
> That's true, but it's true of every other function in that file. Is it not deliberate?

FYI, somewhat related: AArch64 GCC inlines `lookup_secondary_supers_table()` 237 times (it's only a few instructions.)
x86-64 GCC, because it doesn't use a popcount intrinsic, decides that `lookup_secondary_supers_table()` is too big to be worth inlining in all but 3 cases. So the right thing happens, I think: where we can profit from fast lookups without bloating the runtime, we do.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1690096760


More information about the core-libs-dev mailing list