--- old/src/share/vm/gc_interface/allocTracer.cpp 2019-02-15 19:02:32.247014440 +0300 +++ new/src/share/vm/gc_interface/allocTracer.cpp 2019-02-15 19:02:32.139018216 +0300 @@ -25,23 +25,28 @@ #include "precompiled.hpp" #include "gc_implementation/shared/gcId.hpp" #include "gc_interface/allocTracer.hpp" -#include "trace/tracing.hpp" +#include "jfr/jfrEvents.hpp" #include "runtime/handles.hpp" #include "utilities/globalDefinitions.hpp" +#if INCLUDE_JFR +#include "jfr/support/jfrAllocationTracer.hpp" +#endif -void AllocTracer::send_allocation_outside_tlab_event(KlassHandle klass, size_t alloc_size) { - EventAllocObjectOutsideTLAB event; +void AllocTracer::send_allocation_outside_tlab_event(KlassHandle klass, HeapWord* obj, size_t alloc_size, Thread* thread) { + JFR_ONLY(JfrAllocationTracer tracer(obj, alloc_size, thread);) + EventObjectAllocationOutsideTLAB event; if (event.should_commit()) { - event.set_class(klass()); + event.set_objectClass(klass()); event.set_allocationSize(alloc_size); event.commit(); } } -void AllocTracer::send_allocation_in_new_tlab_event(KlassHandle klass, size_t tlab_size, size_t alloc_size) { - EventAllocObjectInNewTLAB event; +void AllocTracer::send_allocation_in_new_tlab_event(KlassHandle klass, HeapWord* obj, size_t tlab_size, size_t alloc_size, Thread* thread) { + JFR_ONLY(JfrAllocationTracer tracer(obj, alloc_size, thread);) + EventObjectAllocationInNewTLAB event; if (event.should_commit()) { - event.set_class(klass()); + event.set_objectClass(klass()); event.set_allocationSize(alloc_size); event.set_tlabSize(tlab_size); event.commit();