RFR: 8314329: AgeTable: add is_clear() & allocation spec, and relax assert to allow use of 0-index slot [v2]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Fri Jan 19 23:32:42 UTC 2024
On Fri, 19 Jan 2024 21:29:43 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> It's not obvious to me that `bool clear = _global_age_table[i]->is_clear();` is for assert-only. Looking at `ShenandoahAgeCensus::is_clear_global`, the whole methods looks like it's real/product logic.
>>
>>> I expect that this will be used only for assertions, whenever it is, hence non-product.
>>
>> Then, can its definition be guarded like following? My concern is that this API returns different value depending on whether it is a product build.
>>
>>
>> #ifdef ASSERT // or ifndef product
>> bool is_clear();
>> #endif
>>
>>
>> (Or, leaving it as an ordinary API seems OK as well, IMO.)
>
> Fair point. I'll fix this.
Made it #ifndef PRODUCT.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17470#discussion_r1459993014
More information about the hotspot-gc-dev
mailing list