RFR: 8252103: Parallel heap inspection for ParallelScavengeHeap [v6]
Lin Zang
lzang at openjdk.java.net
Wed Oct 28 15:15:48 UTC 2020
On Wed, 28 Oct 2020 13:09:52 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
>> Lin Zang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix constant coding style and do code refine
>
> src/hotspot/share/gc/parallel/psOldGen.hpp line 170:
>
>> 168: uint iterable_blocks() {
>> 169: return (object_space()->used_in_bytes() + IterateBlockSize - 1) / IterateBlockSize;
>> 170: }
>
> This causes a build failure on windows:
> hotspot\share\gc/parallel/psOldGen.hpp(169): error C2220: the following warning is treated as an error
> hotspot\share\gc/parallel/psOldGen.hpp(169): warning C4267: 'return': conversion from 'size_t' to 'uint', possible loss of data
> I suggest either changing the return here to `int` and make an explicit cast or `size_t` and then add the cast when used in `claim_and_get_block()`
I made the cast in claim_and_get_block() because I think the itrable_blocks() is not possible to return negative values. and it used in claim_and_get_block() to be a signed int only for helping recoginize survior and eden spaces (the block_index).
BTW, I didn't rebase this patch to master for quite a while, I will try to rebase it.
Thanks!
-------------
PR: https://git.openjdk.java.net/jdk/pull/25
More information about the hotspot-gc-dev
mailing list