RFR: 8296170: Refactor stack-locking path in C2_MacroAssembler::fast_unlock() [v2]

Roman Kennke rkennke at openjdk.org
Fri Nov 11 14:56:09 UTC 2022


On Fri, 11 Nov 2022 09:50:51 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Roman Kennke 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 two additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'upstream/master' into JDK-8296170
>>  - 8296170: Refactor stack-locking path in C2_MacroAssembler::fast_unlock()
>
> src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 928:
> 
>> 926:   }
>> 927: 
>> 928:   // TODO: Comment still valid?
> 
> We have the same comment here:
> https://github.com/openjdk/jdk/blob/12e76cbc725ff87577e2ef23267590eae37a82d1/src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp#L707
> 
> And it seems to be there from the beginning:
> https://hg.openjdk.java.net/jdk/jdk/annotate/74aaad871363/hotspot/src/cpu/x86/vm/x86_32.ad#l3441
> 
> I think instead of adding a `TODO`, we should either completely remove the comments or file a follow-up enhancement to investigate.

I decided to remove the TODO. If we were to optimize this, then there are probably lower-hanging fruits like looking at the subsequent branch after the DONE_LABEL where we jump around the counting code.

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

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


More information about the hotspot-compiler-dev mailing list