RFR: 8342577: Clean up JVMTI breakpoint support

Alex Menkov amenkov at openjdk.org
Tue Oct 29 19:36:07 UTC 2024


On Tue, 29 Oct 2024 04:31:28 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> The fix cleans up code to support list of JVMTI breakpoints.
>> - classes required to supports cache of byte code pointers (GrowableElement, GrowableCache, JvmtiBreakpointCache) are dropped;
>> - class JvmtiCurrentBreakpoints (JvmtiBreakpoints factory) is left as is, dropped unused code;
>> - fixed race in JvmtiCurrentBreakpoints::get_jvmti_breakpoints() (fix for JDK-8210637);
>> - JvmtiBreakpoint:JvmtiBreakpoint() + JvmtiBreakpoint::copy(JvmtiBreakpoint& bp) are replaced with copy ctor;
>> - JvmtiBreakpoints::clearall_in_class_at_safepoint() is simplified to do a single pass;
>> 
>> Testing: tier1..tier6
>
> src/hotspot/share/prims/jvmtiImpl.cpp line 208:
> 
>> 206: 
>> 207: JvmtiBreakpoints::JvmtiBreakpoints()
>> 208:     : _elements(5, mtServiceability) {
> 
> Do we have tests that create more than 5 breakpoints? I just want to make sure the array growing code is exercised. You could stress it by testing with the initial size set to 1.

This is the same we had before (in `GrowableCache::initialize`, old line 142):
`_elements       = new (mtServiceability) GrowableArray<GrowableElement*>(5, mtServiceability);`
I set the initial size to 1,  JDI tests (some of them have more than 1 breakpoint) passed

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21675#discussion_r1821413575


More information about the serviceability-dev mailing list