RFR: 8297168: Provide a bulk OopHandle release mechanism with the ServiceThread [v2]
Robbin Ehn
rehn at openjdk.org
Mon Nov 21 09:45:22 UTC 2022
On Mon, 21 Nov 2022 09:08:09 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> src/hotspot/share/runtime/serviceThread.cpp line 71:
>>
>>> 69: OopHandleList(OopHandleList* next) : _next(next), _index(0) {}
>>> 70: void add(OopHandle h) {
>>> 71: assert(_index < _count, "too many additions");
>>
>> I think this should be a guarantee.
>
> Why? This is internally used code and any usage bugs should be exposed by testing. There is very little that can go wrong here.
First to signal to a reader that the VM is utterly broken if this happens.
Secondly when running test we also run on release, having the guarantee makes triage this failure to same as the assert much faster.
Keep assert if you want.
-------------
PR: https://git.openjdk.org/jdk/pull/11254
More information about the hotspot-runtime-dev
mailing list