4359N/A/*
4359N/A * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
4359N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4359N/A *
4359N/A * This code is free software; you can redistribute it and/or modify it
4359N/A * under the terms of the GNU General Public License version 2 only, as
4359N/A * published by the Free Software Foundation.
4359N/A *
4359N/A * This code is distributed in the hope that it will be useful, but WITHOUT
4359N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4359N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4359N/A * version 2 for more details (a copy is included in the LICENSE file that
4359N/A * accompanied this code).
4359N/A *
4359N/A * You should have received a copy of the GNU General Public License version
4359N/A * 2 along with this work; if not, write to the Free Software Foundation,
4359N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4359N/A *
4359N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4359N/A * or visit www.oracle.com if you need additional information or have any
4359N/A * questions.
4359N/A *
4359N/A */
4359N/A
4359N/A#include "precompiled.hpp"
4359N/A#include "gc_interface/allocTracer.hpp"
4359N/A#include "trace/tracing.hpp"
4359N/A#include "runtime/handles.hpp"
4359N/A#include "utilities/globalDefinitions.hpp"
4359N/A
4359N/Avoid AllocTracer::send_allocation_outside_tlab_event(KlassHandle klass, size_t alloc_size) {
4359N/A EventAllocObjectOutsideTLAB event;
4359N/A if (event.should_commit()) {
4359N/A event.set_class(klass());
4359N/A event.set_allocationSize(alloc_size);
4359N/A event.commit();
4359N/A }
4359N/A}
4359N/A
4359N/Avoid AllocTracer::send_allocation_in_new_tlab_event(KlassHandle klass, size_t tlab_size, size_t alloc_size) {
4359N/A EventAllocObjectInNewTLAB event;
4359N/A if (event.should_commit()) {
4359N/A event.set_class(klass());
4359N/A event.set_allocationSize(alloc_size);
4359N/A event.set_tlabSize(tlab_size);
4359N/A event.commit();
4359N/A }
4359N/A}