RFR: 8319850: PrintInlining should print which methods are late inlines
Tobias Hartmann
thartmann at openjdk.org
Wed Nov 6 08:14:29 UTC 2024
On Tue, 5 Nov 2024 18:16:41 GMT, theoweidmannoracle <duke at openjdk.org> wrote:
>>> As already pointed out in the PR by @caojoshua, this does not matter for string/methodhandle/vector/boxing late inlines, as they are [only performed if ok_to_inline() returns true](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/doCall.cpp#L189). This is also the only call to ok_to_inline().
>>
>>> The only other location, where late inline call generators are created, are calls to CallGenerator::for_late_inline_virtual(), which creates a LateInlineVirtualCallGenerator.
>>
>> What about regular calls that fail to inline initially because the compiler ran out of inlining budget but are inlined later on?
>
> @rwestrel I think in case the inlining budget has been exceeded (i.e. try_to_inline and subsequently ok_to_inline fail), there's only two code locations where we would create a late inlining code generator: [here](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/doCall.cpp#L380) and [here](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/doCall.cpp#L292). Both are calls to CallGenerator::for_late_inline_virtual() that create a LateInlineVirtualCallGenerator, which only performs strength reduction AFAIK.
>
> There might be something I'm missing, though, since I've only been working on the C2 compiler for three days 🙂 So please feel free to point me other cases of late inlining and I will investigate.
> @theoweidmannoracle @caojoshua was not found in the census.
@caojoshua You might want to [associate your GitHub account and your OpenJDK username](https://wiki.openjdk.org/display/SKARA/Skara#Skara-AssociatingyourGitHubaccountandyourOpenJDKusername).
@theoweidmannoracle you can add Joshua via `/contributor add jcao`
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21899#issuecomment-2458958121
More information about the hotspot-compiler-dev
mailing list