Path: blob/master/runtime/gc_stats/ScavengerJavaStats.hpp
5985 views
1/*******************************************************************************2* Copyright (c) 1991, 2020 IBM Corp. and others3*4* This program and the accompanying materials are made available under5* the terms of the Eclipse Public License 2.0 which accompanies this6* distribution and is available at https://www.eclipse.org/legal/epl-2.0/7* or the Apache License, Version 2.0 which accompanies this distribution and8* is available at https://www.apache.org/licenses/LICENSE-2.0.9*10* This Source Code may also be made available under the following11* Secondary Licenses when the conditions for such availability set12* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU13* General Public License, version 2 with the GNU Classpath14* Exception [1] and GNU General Public License, version 2 with the15* OpenJDK Assembly Exception [2].16*17* [1] https://www.gnu.org/software/classpath/license.html18* [2] http://openjdk.java.net/legal/assembly-exception.html19*20* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception21*******************************************************************************/2223/**24* @file25* @ingroup GC_Stats26*/2728#if !defined(SCAVENGERSTATSJAVA_HPP_)29#define SCAVENGERSTATSJAVA_HPP_3031#include "j9.h"32#include "j9cfg.h"33#include "j9port.h"34#include "j9consts.h"35#include "modron.h"36#include "modronopt.h"3738#include "Base.hpp"39#include "ReferenceStats.hpp"4041/**42* Storage for statistics relevant to a scavenging (semi-space copying) collector.43* @ingroup GC_Stats44*/45class MM_ScavengerJavaStats46{47public:4849UDATA _unfinalizedCandidates; /**< unfinalized objects that are candidates to be finalized visited this cycle */50UDATA _unfinalizedEnqueued; /**< unfinalized objects that are enqueued during this cycle (MUST be less than or equal _unfinalizedCandidates) */5152UDATA _ownableSynchronizerCandidates; /**< number of ownable synchronizer objects visited this cycle */53UDATA _ownableSynchronizerTotalSurvived; /**< number of ownable synchronizer objects survived this cycle */54UDATA _ownableSynchronizerNurserySurvived; /**< number of ownable synchronizer objects survived this cycle in Nursery Space */5556MM_ReferenceStats _weakReferenceStats; /**< Weak reference stats for the cycle */57MM_ReferenceStats _softReferenceStats; /**< Soft reference stats for the cycle */58MM_ReferenceStats _phantomReferenceStats; /**< Phantom reference stats for the cycle */5960UDATA _monitorReferenceCleared; /**< The number of monitor references that have been cleared during scavenge */61UDATA _monitorReferenceCandidates; /**< The number of monitor references that have been visited in monitor table during scavenge */6263protected:6465private:6667public:6869void clear();70/* clear only OwnableSynchronizerObject related data */71void clearOwnableSynchronizerCounts();72/* merge only OwnableSynchronizerObject related data */73void mergeOwnableSynchronizerCounts(MM_ScavengerJavaStats *statsToMerge);7475MMINLINE void76updateOwnableSynchronizerNurseryCounts(UDATA survivedCount)77{78_ownableSynchronizerNurserySurvived += survivedCount;79}8081MM_ScavengerJavaStats();828384};8586#endif /* SCAVENGERSTATSJAVA_HPP_ */878889