< prev index next >
src/share/vm/gc/shared/allocTracer.cpp
Print this page
rev 8854 : 8065331: Add trace events for failed allocations
Reviewed-by:
@@ -22,10 +22,11 @@
*
*/
#include "precompiled.hpp"
#include "gc/shared/allocTracer.hpp"
+#include "gc/shared/gcId.hpp"
#include "runtime/handles.hpp"
#include "trace/tracing.hpp"
#include "utilities/globalDefinitions.hpp"
void AllocTracer::send_allocation_outside_tlab_event(KlassHandle klass, size_t alloc_size) {
@@ -44,5 +45,14 @@
event.set_allocationSize(alloc_size);
event.set_tlabSize(tlab_size);
event.commit();
}
}
+
+void AllocTracer::send_allocation_requiring_gc_event(size_t size, const GCId& gcId) {
+ EventAllocationRequiringGC event;
+ if (event.should_commit()) {
+ event.set_gcId(gcId.id());
+ event.set_size(size);
+ event.commit();
+ }
+}
< prev index next >