4362N/A/*
4362N/A * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
4362N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4362N/A *
4362N/A * This code is free software; you can redistribute it and/or modify it
4362N/A * under the terms of the GNU General Public License version 2 only, as
4362N/A * published by the Free Software Foundation.
4362N/A *
4362N/A * This code is distributed in the hope that it will be useful, but WITHOUT
4362N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4362N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4362N/A * version 2 for more details (a copy is included in the LICENSE file that
4362N/A * accompanied this code).
4362N/A *
4362N/A * You should have received a copy of the GNU General Public License version
4362N/A * 2 along with this work; if not, write to the Free Software Foundation,
4362N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4362N/A *
4362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4362N/A * or visit www.oracle.com if you need additional information or have any
4362N/A * questions.
4362N/A *
4362N/A */
4362N/A
4362N/A#ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_EVACUATIONINFO_HPP
4362N/A#define SHARE_VM_GC_IMPLEMENTATION_SHARED_EVACUATIONINFO_HPP
4362N/A
4362N/A#include "memory/allocation.hpp"
4362N/A
4362N/Aclass EvacuationInfo : public StackObj {
4362N/A uint _collectionset_regions;
4362N/A uint _allocation_regions;
4362N/A size_t _collectionset_used_before;
4362N/A size_t _collectionset_used_after;
4362N/A size_t _alloc_regions_used_before;
4362N/A size_t _bytes_copied;
4362N/A uint _regions_freed;
4362N/A
4362N/Apublic:
4362N/A EvacuationInfo() : _collectionset_regions(0), _allocation_regions(0), _collectionset_used_before(0),
4362N/A _collectionset_used_after(0), _alloc_regions_used_before(0),
4362N/A _bytes_copied(0), _regions_freed(0) { }
4362N/A
4362N/A void set_collectionset_regions(uint collectionset_regions) {
4362N/A _collectionset_regions = collectionset_regions;
4362N/A }
4362N/A
4362N/A void set_allocation_regions(uint allocation_regions) {
4362N/A _allocation_regions = allocation_regions;
4362N/A }
4362N/A
4362N/A void set_collectionset_used_before(size_t used) {
4362N/A _collectionset_used_before = used;
4362N/A }
4362N/A
4362N/A void increment_collectionset_used_after(size_t used) {
4362N/A _collectionset_used_after += used;
4362N/A }
4362N/A
4362N/A void set_alloc_regions_used_before(size_t used) {
4362N/A _alloc_regions_used_before = used;
4362N/A }
4362N/A
4362N/A void set_bytes_copied(size_t copied) {
4362N/A _bytes_copied = copied;
4362N/A }
4362N/A
4362N/A void set_regions_freed(uint freed) {
4362N/A _regions_freed += freed;
4362N/A }
4362N/A
4362N/A uint collectionset_regions() { return _collectionset_regions; }
4362N/A uint allocation_regions() { return _allocation_regions; }
4362N/A size_t collectionset_used_before() { return _collectionset_used_before; }
4362N/A size_t collectionset_used_after() { return _collectionset_used_after; }
4362N/A size_t alloc_regions_used_before() { return _alloc_regions_used_before; }
4362N/A size_t bytes_copied() { return _bytes_copied; }
4362N/A uint regions_freed() { return _regions_freed; }
4362N/A};
4362N/A
4362N/A#endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_EVACUATIONINFO_HPP