RFR: 8301136: Improve unlink() and unlink_all() of ResourceHashtableBase [v5]

Xin Liu xliu at openjdk.org
Mon Jan 30 21:57:56 UTC 2023


On Fri, 27 Jan 2023 23:16:52 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> 1. Apply the same idea of JDK-8300184 to unlink().
>> 2. Because ResourceHashtableBase doesn't support copy assignment, client of it has to purge all elements first when it needs to assign it. We would like provide a specialized version called 'unlink_all()'.  We don't need to update each node's _next in this case. We only nullify all buckets. 
>> 3. This patch also provides a specialized version of unlink_all() for destructor. We don't even update buckets. it's dead anyway.
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add lambda API unlink(Function f) per reviewers' request.

Performance-wise, I will evaluate hotspot and see if I can find support. thanks.

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

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


More information about the hotspot-dev mailing list