Low-Overhead Heap Profiling

Bernd Eckenfels ecki at zusammenkunft.net
Wed Jun 24 23:48:38 UTC 2015


Am Wed, 24 Jun 2015 16:26:35 -0700
schrieb Jeremy Manson <jeremymanson at google.com>:
> > As for the other concern: my concern about *just* having the
> > callback mechanism is that there is quite a lot you can't do from
> > user code during an allocation, because of lack of access to JNI.
> >
> >
> > Maybe I missed something. Are the callbacks in Java? I.e., do you
> > call them using JNI from the slow path you call directly from the
> > allocation code?
> >
> > (For context: this referred to the hypothetical feature where we can
> provide a callback that invokes some code from allocation.)

What about a hypothetical queueing feature, so you can process the
events asynchronously (perhaps with some backpressure control). This
would work well for statistics processing.

(Your other use case, the throwing of OOM would not work, I guess)

But its an elegant solution to provide a code environment generic enoug
for all kinds of instrumentation and independent of the "allocation
recursion".

Greetings
Bernd


More information about the hotspot-gc-dev mailing list