RFR: 8264149 BreakpointInfo::set allocates metaspace object in VM thread [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Tue Mar 30 22:49:15 UTC 2021
On Tue, 30 Mar 2021 04:01:43 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> I think that would be better. I am unclear on what happened in this case before; did we also miss out on allocating the Counters?
Before this change, it was very unlikely that allocating metaspace counters in a breakpoint safepoint ran out of memory, so never threw the exception. Or else they did and returned NULL and all of the code around their allocation has handling for a null return. We're working on enforcing what should be a rule that only JavaThreads can throw exceptions and this was an exception to that. :)
> Re: expand_and_allocate()
I didn't want to expose internal metaspace functions or more handling for this special case, and that would prevent the nice sharing of most of the Metaspace::allocate code. It's allowed for method counters to return NULL here. If it's not long term, we should move the breakpoint counters to Method (but it would increase Method by a pointer size, which isn't good).
I will rename the functions as requested. Have a nice vacation and thank you for your comments.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3207
More information about the hotspot-dev
mailing list