< prev index next >
src/share/vm/gc_interface/allocTracer.cpp
Print this page
rev 8910 : full patch for jfr
*** 1,7 ****
/*
! * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 27,49 ****
#include "gc_interface/allocTracer.hpp"
#include "trace/tracing.hpp"
#include "runtime/handles.hpp"
#include "utilities/globalDefinitions.hpp"
! void AllocTracer::send_allocation_outside_tlab_event(KlassHandle klass, size_t alloc_size) {
! EventAllocObjectOutsideTLAB event;
if (event.should_commit()) {
! event.set_class(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;
if (event.should_commit()) {
! event.set_class(klass());
event.set_allocationSize(alloc_size);
event.set_tlabSize(tlab_size);
event.commit();
}
}
--- 27,51 ----
#include "gc_interface/allocTracer.hpp"
#include "trace/tracing.hpp"
#include "runtime/handles.hpp"
#include "utilities/globalDefinitions.hpp"
! void AllocTracer::send_allocation_outside_tlab_event(KlassHandle klass, HeapWord* obj, size_t alloc_size, Thread* thread) {
! TRACE_ALLOCATION(obj, alloc_size, thread);
! EventObjectAllocationOutsideTLAB event;
if (event.should_commit()) {
! event.set_objectClass(klass());
event.set_allocationSize(alloc_size);
event.commit();
}
}
! void AllocTracer::send_allocation_in_new_tlab_event(KlassHandle klass, HeapWord* obj, size_t tlab_size, size_t alloc_size, Thread* thread) {
! TRACE_ALLOCATION(obj, alloc_size, thread);
! EventObjectAllocationInNewTLAB event;
if (event.should_commit()) {
! event.set_objectClass(klass());
event.set_allocationSize(alloc_size);
event.set_tlabSize(tlab_size);
event.commit();
}
}
< prev index next >