24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "gc/shared/allocTracer.hpp" |
26 #include "gc/shared/allocTracer.hpp" |
27 #include "runtime/handles.hpp" |
27 #include "runtime/handles.hpp" |
28 #include "trace/tracing.hpp" |
28 #include "trace/tracing.hpp" |
|
29 #include "trace/traceMacros.hpp" |
29 #include "utilities/globalDefinitions.hpp" |
30 #include "utilities/globalDefinitions.hpp" |
30 |
31 |
31 void AllocTracer::send_allocation_outside_tlab_event(Klass* klass, size_t alloc_size) { |
32 void AllocTracer::send_allocation_outside_tlab(Klass* klass, HeapWord* obj, size_t alloc_size, Thread* thread) { |
|
33 TRACE_ALLOCATION(obj, alloc_size, thread); |
32 EventObjectAllocationOutsideTLAB event; |
34 EventObjectAllocationOutsideTLAB event; |
33 if (event.should_commit()) { |
35 if (event.should_commit()) { |
34 event.set_objectClass(klass); |
36 event.set_objectClass(klass); |
35 event.set_allocationSize(alloc_size); |
37 event.set_allocationSize(alloc_size); |
36 event.commit(); |
38 event.commit(); |
37 } |
39 } |
38 } |
40 } |
39 |
41 |
40 void AllocTracer::send_allocation_in_new_tlab_event(Klass* klass, size_t tlab_size, size_t alloc_size) { |
42 void AllocTracer::send_allocation_in_new_tlab(Klass* klass, HeapWord* obj, size_t tlab_size, size_t alloc_size, Thread* thread) { |
|
43 TRACE_ALLOCATION(obj, tlab_size, thread); |
41 EventObjectAllocationInNewTLAB event; |
44 EventObjectAllocationInNewTLAB event; |
42 if (event.should_commit()) { |
45 if (event.should_commit()) { |
43 event.set_objectClass(klass); |
46 event.set_objectClass(klass); |
44 event.set_allocationSize(alloc_size); |
47 event.set_allocationSize(alloc_size); |
45 event.set_tlabSize(tlab_size); |
48 event.set_tlabSize(tlab_size); |