Integrated: 8314276: Improve PtrQueue API around size/capacity
Kim Barrett
kbarrett at openjdk.org
Thu Aug 17 05:11:57 UTC 2023
On Tue, 15 Aug 2023 15:04:11 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> These changes simplify some uses of PtrQueue &etc and eliminate questions
> about where buffer capacity information should be obtained from, and whether
> it is correct.
>
> This change
>
> (1) Adds capacity information directly to BufferNode. This is done without
> increasing the size of the header, by reducing the maximum buffer size and
> changing the index accordingly. The new maximums are still much larger than
> actually needed for current uses.
>
> (2) Removes PtrQueue::_capacity_in_bytes and obtain queue capacity from the
> associated buffer. The capacity accessor was renamed to current_capacity to
> make it clear that the result may vary, at least depending on whether the
> queue currently has a buffer or not.
>
> (3) Adds empty/size operations to PtrQueue/BufferNode.
>
> (4) Updates users to take advantage of the above changes.
>
> Each of those steps is a separate commit, in case that aids reviewing.
>
> Testing:
> mach5 tier1-5
This pull request has now been integrated.
Changeset: 2a1176b5
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/2a1176b544d030c09edaf95cb67f69b442aa465d
Stats: 168 lines in 13 files changed: 85 ins; 30 del; 53 mod
8314276: Improve PtrQueue API around size/capacity
Reviewed-by: iwalulya, tschatzl
-------------
PR: https://git.openjdk.org/jdk/pull/15291
More information about the hotspot-gc-dev
mailing list