RFR: 8300002: Performance regression caused by non-inlined hot methods due to post call noop instructions [v3]

Vladimir Kozlov kvn at openjdk.org
Mon Jan 16 02:46:33 UTC 2023


On Mon, 16 Jan 2023 01:36:32 GMT, Sergey Kuksenko <skuksenko at openjdk.org> wrote:

>> Post call nop instructions increase the size of methods, which leads to different inline decisions and performance regression.
>> Restore inline behavior by excluding post call nop instructions sizes from inline heuristics.
>
> Sergey Kuksenko has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - whitespace clenup
>  - renaming; generalize; make methods independent on post call noops naming

src/hotspot/cpu/ppc/macroAssembler_ppc.cpp line 1188:

> 1186:     return;
> 1187:   }
> 1188:   PostCallNopCounter nopCounter(this);

Did you forgot to change it to `InlineSkippedInstructionsCounter`?

src/hotspot/share/asm/assembler.hpp line 248:

> 246:   class InlineSkippedInstructionsCounter: public StackObj {
> 247:    private:
> 248:     AbstractAssembler* _assm;

May be you should record `_assm->_code_section` instead and directly call `_code_section->register_skipped(_start)` instead of adding `AbstractAssembler:: register_skipped(size)`. With `CodeSection` code:

   register_skipped(address start) {
      _skipped_instructions_size += (_end - start);
   }

src/hotspot/share/asm/codeBuffer.cpp line 600:

> 598: 
> 599: int CodeBuffer::total_skipped_instructions_size() const {
> 600:   int total_nop_size = 0;

`total_nop_size` --> `total_skipped_size`

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

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


More information about the hotspot-dev mailing list