Hi JC, I found a .19 which I looked at:

src/hotspot/share/gc/shared/collectedHeap.inline.hpp 
CollectedHeap::allocate_memory

This is the only place I found which calls the
~JvmtiSampledObjectAllocEventCollector
It is not intuitive with creating a handle for the destructor, I suggest
something like collector.sample(THREAD, obj_h); instead.

open/src/hotspot/share/runtime/threadHeapSampler.hpp
Don't include inline.hpp in hpp.
This means you need to move the two methods using orderAccess to cpp
(or a inline.hpp).

As general note, not your doing, setting a pointer in a heap allocated object to a stack allocated object is a really bad pattern.
JvmtiThreadState -> collector

Thanks, Robbin

On 05/08/2018 03:10 AM, JC Beyler wrote:
Hi all,

With the awesome help of Serguei Spitsyn, we have moved forward on the
implementation for JEP-331 and have the following webrev for review:

Webrev: http://cr.openjdk.java.net/~jcbeyler/8171119/heap_event.18/
Bug: https://bugs.openjdk.java.net/browse/JDK-8171119

It is based on jdk/jdk so should patch well with a recent tip.

Could we please have some reviews for the webrev? It would be greatly
appreciated!

Thanks for all your help!
Jc

Reply via email to