JDK-8266637 : CHT: Add insert_and_get method
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-05-06
  • Updated: 2021-05-24
  • Resolved: 2021-05-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b23Fixed
Related Reports
Relates :  
Description
With upcoming G1 remembered set changes (JDK-8017163) which extensively use the CHT it would be advantageous to have a combined insert_and_get() method to decrease the amount of global synchronization needed as after inserting a node the code always works with it.

I.e. instead of

bool found = cht.insert(...)
[do something if found]
cht.get(..., found);
return found.value();

it would be nice to avoid the second global synchronization by

bool found = cht.insert_and_get(..., found, ..);
[do something if found]
return found.value();

Comments
Changeset: 2313a218 Author: Ivan Walulya <iwalulya@openjdk.org> Date: 2021-05-17 09:41:45 +0000 URL: https://git.openjdk.java.net/jdk/commit/2313a2187a949dd0c101b8f8fb5ffc31089d6817
17-05-2021