On Mon, 22 Jul 2024 14:56:31 GMT, Andrew Haley <a...@openjdk.org> wrote:
>> src/hotspot/share/oops/klass.inline.hpp line 117: >> >>> 115: } >>> 116: >>> 117: inline bool Klass::search_secondary_supers(Klass *k) const { >> >> I see you moved `Klass::search_secondary_supers` in `klass.inline.hpp`, but >> I'm not sure how it interacts with `Klass::is_subtype_of` (the sole caller) >> being declared in `klass.hpp`. >> >> Will the inlining still happen if `Klass::is_subtype_of()` callers include >> `klass.hpp`? > > Presumably this question applies to every function in `klass.inline.hpp`? > Practically everything does `#include "oops/klass.inline.hpp"`. It's inlined > in about 120 files, as far as I can see everywhere such queries are made. My confusion arises from the following: * `Klass::is_subtype_of()` is declared in `klass.hpp` * `Klass::is_subtype_of()` calls `Klass::search_secondary_supers()` * `Klass::search_secondary_supers()` is declared in `klass.inline.hpp` * `klass.inline.hpp` includes `klass.hpp` 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1688559463