sla@5237: /* rbackman@5334: * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. sla@5237: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. sla@5237: * sla@5237: * This code is free software; you can redistribute it and/or modify it sla@5237: * under the terms of the GNU General Public License version 2 only, as sla@5237: * published by the Free Software Foundation. sla@5237: * sla@5237: * This code is distributed in the hope that it will be useful, but WITHOUT sla@5237: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or sla@5237: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License sla@5237: * version 2 for more details (a copy is included in the LICENSE file that sla@5237: * accompanied this code). sla@5237: * sla@5237: * You should have received a copy of the GNU General Public License version sla@5237: * 2 along with this work; if not, write to the Free Software Foundation, sla@5237: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. sla@5237: * sla@5237: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA sla@5237: * or visit www.oracle.com if you need additional information or have any sla@5237: * questions. sla@5237: * sla@5237: */ sla@5237: sla@5237: #ifndef SHARE_VM_MEMORY_REFERENCEPROCESSORSTATS_HPP sla@5237: #define SHARE_VM_MEMORY_REFERENCEPROCESSORSTATS_HPP sla@5237: sla@5237: #include "utilities/globalDefinitions.hpp" sla@5237: sla@5237: class ReferenceProcessor; sla@5237: sla@5237: // ReferenceProcessorStats contains statistics about how many references that sla@5237: // have been traversed when processing references during garbage collection. sla@5237: class ReferenceProcessorStats { sla@5237: size_t _soft_count; sla@5237: size_t _weak_count; sla@5237: size_t _final_count; sla@5237: size_t _phantom_count; sla@5237: sla@5237: public: sla@5237: ReferenceProcessorStats() : sla@5237: _soft_count(0), sla@5237: _weak_count(0), sla@5237: _final_count(0), sla@5237: _phantom_count(0) {} sla@5237: sla@5237: ReferenceProcessorStats(size_t soft_count, sla@5237: size_t weak_count, sla@5237: size_t final_count, sla@5237: size_t phantom_count) : sla@5237: _soft_count(soft_count), sla@5237: _weak_count(weak_count), sla@5237: _final_count(final_count), sla@5237: _phantom_count(phantom_count) sla@5237: {} sla@5237: sla@5237: size_t soft_count() const { sla@5237: return _soft_count; sla@5237: } sla@5237: sla@5237: size_t weak_count() const { sla@5237: return _weak_count; sla@5237: } sla@5237: sla@5237: size_t final_count() const { sla@5237: return _final_count; sla@5237: } sla@5237: sla@5237: size_t phantom_count() const { sla@5237: return _phantom_count; sla@5237: } sla@5237: }; sla@5237: #endif