[jdk8u-dev] RFR: 6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp [v3]
Sun Jianye
jianyesun at openjdk.org
Wed Sep 27 10:03:24 UTC 2023
On Tue, 26 Sep 2023 00:07:11 GMT, Andrew John Hughes <andrew at openjdk.org> wrote:
>> Sun Jianye has updated the pull request incrementally with one additional commit since the last revision:
>>
>> delete the test
>
> hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp line 316:
>
>> 314: DirtyCardQueue& dcq = t->dirty_card_queue();
>> 315: if (dcq.size() != 0) {
>> 316: void **buf = dcq.get_buf();
>
> The 11u version changes this to `void** buf`. Was there a reason for the difference here?
I think the return type of get_buf which is defined for the first time is inappropriate, see [here](https://github.com/openjdk/jdk8u-dev/blob/f4260a4deed5210fc56f08774e8ca50cf6f7cc8e/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp#L74), first commited in [here](https://github.com/openjdk/jdk8u-dev/commit/18f3386a98e67f1c5b75c4cc47a0ebb898c59b9b).
The 11u version changes the buf allocation by `BufferNode::make_buffer_from_node`(see [here](https://github.com/openjdk/jdk11u/blob/master/src/hotspot/share/gc/g1/dirtyCardQueue.cpp#L178)), however the jdk8 does not do that.
I can modify it to `void** buf`, should i do that?
> hotspot/src/share/vm/gc_implementation/g1/ptrQueue.hpp line 79:
>
>> 77: // Initialize this queue to contain a null buffer, and be part of the
>> 78: // given PtrQueueSet.
>> 79: PtrQueue(PtrQueueSet* qset, bool permanent = false, bool active = false);
>
> An extra space has sneaked in here between `permanent` and the `=` sign.
Thanks, i will fix it.
-------------
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/374#discussion_r1338368602
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/374#discussion_r1338370305
More information about the jdk8u-dev
mailing list