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

Tobias Hartmann thartmann at openjdk.org
Thu Jan 12 06:19:16 UTC 2023


On Thu, 12 Jan 2023 02:52:17 GMT, Sergey Kuksenko <skuksenko at openjdk.org> wrote:

> 8300002: Performance regression caused by non-inlined hot methods due to post call noop instructions

Please add a summary to the PR description.

If you update the last usage in `ciMethod::has_compiled_code()`, it looks like `ciMethod::instructions_size` is not needed anymore and can be removed. Instead, you could just  change its semantic to exclude nops (please also update the method's comments).

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

> 252:     }
> 253:     void register_nop() {
> 254:         _assm->count_post_call_nop(_assm->pc() - _nop_start);

Suggestion:

      _assm->count_post_call_nop(_assm->pc() - _nop_start);

src/hotspot/share/asm/codeBuffer.hpp line 211:

> 209: 
> 210:   void count_post_call_nop(int size) {
> 211:       _post_call_nop_size += size;

Suggestion:

    _post_call_nop_size += size;

src/hotspot/share/ci/ciMethod.cpp line 1146:

> 1144:                        _inline_instructions_size = 0;
> 1145:                      }
> 1146:                      );

Indentation looks weird. I see that you copied it from `ciMethod::instructions_size`, that one should be fixed as well.

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

Changes requested by thartmann (Reviewer).

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


More information about the hotspot-dev mailing list