RFR: 8302167: Avoid allocating register in fast_lock()
Roman Kennke
rkennke at openjdk.org
Thu Feb 9 19:06:28 UTC 2023
In x86's C2MacroAssembler::fast_lock(), we are never really using the cx1Reg register, except in the DiagnoseSyncOnValueBasedClasses path, where we can just as well use the scrReg register.
What's worse, in x86_32.ad, we don't allocate the cx1 register and pass noreg, so the DiagnoseSyncOnValueBasedClasses would be broken on x86_32.
We can simply avoid allocating that extra register (which may help performance under register pressure), and use scr in DiagnoseSyncOnValueBasedClasses.
Testing:
- [ ] tier1
- [ ] tier2
-------------
Commit messages:
- 8302167: Avoid allocating register in fast_lock()
Changes: https://git.openjdk.org/jdk/pull/12499/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12499&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8302167
Stats: 5 lines in 2 files changed: 1 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/12499.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12499/head:pull/12499
PR: https://git.openjdk.org/jdk/pull/12499
More information about the hotspot-compiler-dev
mailing list