index

src/share/vm/gc_interface/allocTracer.cpp

Print this page
rev 8024 : imported patch event1
* * *
imported patch event2

*** 1,7 **** /* ! * Copyright (c) 2013, 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, 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.
*** 21,30 **** --- 21,31 ---- * questions. * */ #include "precompiled.hpp" + #include "gc_implementation/shared/gcId.hpp" #include "gc_interface/allocTracer.hpp" #include "trace/tracing.hpp" #include "runtime/handles.hpp" #include "utilities/globalDefinitions.hpp"
*** 44,48 **** --- 45,69 ---- 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, uint gc_attempt) { + EventAllocationRequiringGC event; + if (event.should_commit()) { + event.set_gcId(gcid.id()); + event.set_size(size); + event.set_gcAttempt(gc_attempt); + event.commit(); + } + } + + void AllocTracer::send_collect_for_allocation_event(size_t size, const GCId& gcid, uint gc_attempt) { + EventCollectForAllocation ev; + if (ev.should_commit()) { + ev.set_gcId(gcid.id()); + ev.set_size(size); + ev.set_gcAttempt(gc_attempt); + ev.commit(); + } + }
index