RFR: 8292059: Do not inline InstanceKlass::allocate_instance()

Coleen Phillimore coleenp at openjdk.org
Wed Mar 1 12:42:10 UTC 2023


On Tue, 28 Feb 2023 11:11:54 GMT, Afshin Zafari <duke at openjdk.org> wrote:

> The inline and not-inline versions of the method is stress tested to compare the performance difference. The statistics are drawn in the following charts. The vertical axis is in milliseconds.
> 
> ![chart (2)](https://user-images.githubusercontent.com/4697012/221848555-2884313e-9d26-41c9-a265-3f1ce295b17b.png)
> 
> ![chart (3)](https://user-images.githubusercontent.com/4697012/221863810-94118677-b4af-468f-90c6-5ea365ae3588.png)

I don't know about these numbers but if this is not a neutral change for performance based on looking at the code and callers, I don't know what is.

src/hotspot/share/oops/instanceKlass.inline.hpp line 188:

> 186: }
> 187: 
> 188: inline instanceOop InstanceKlass::allocate_instance(oop java_class, TRAPS) {

In moving this, can you eliminate any #includes at the top?  And migrate them to .cpp files that might need them.

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

PR: https://git.openjdk.org/jdk/pull/12782


More information about the hotspot-dev mailing list