RFR: 8255737: Zero: DO_UPDATE_INSTRUCTION_COUNT should only update when relevant VM flags are set [v2]
Aleksey Shipilev
shade at openjdk.java.net
Tue Nov 3 12:20:18 UTC 2020
On Tue, 3 Nov 2020 11:19:16 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Rewrite the block to hide flags under major check
>> - Merge branch 'master' into JDK-8255737-zero-do-update-flags
>> - 8255737: Zero: DO_UPDATE_INSTRUCTION_COUNT should only update when relevant VM flags are set
>
> src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp line 138:
>
>> 136: #define DO_UPDATE_INSTRUCTION_COUNT(opcode) \
>> 137: { \
>> 138: if (CountBytecodes || TraceBytecodes || StopInterpreterAt) BytecodeCounter::_counter_value++; \
>
> Elsewhere we do `[...] || StopInterpreterAt > 0` which is clearer as it's a flag expecting an int value. Perhaps you could use that instead of the implicit boolean conversion?
>
> Yes, this doesn't seem consistent throughout the code, but while at it...
Right on. I went on fixing the uses of `StopInterpreterAt` in this macro. I thought we can just check it against `_counter_value` without implicitly checking for `0` in the line below. But then Zero fastdebug build times exploded on me! So I thought to rewrite the block to hide most of the branches under the big one. See the update. This also clusters the uses of `BytecodeCounter::_counter_value`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/997
More information about the hotspot-runtime-dev
mailing list