Path: blob/master/runtime/gc_stats/MarkJavaStats.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#if !defined(MARKJAVASTATS_HPP_)24#define MARKJAVASTATS_HPP_2526#include "j9port.h"27#include "modronopt.h"2829#include "Base.hpp"30#include "AtomicOperations.hpp"31#include "ReferenceStats.hpp"3233/**34* Storage for statistics relevant to the mark phase of a global collection.35* @ingroup GC_Stats36*/37class MM_MarkJavaStats : public MM_Base {38/* data members */39private:40protected:41public:42UDATA _unfinalizedCandidates; /**< unfinalized objects that are candidates to be finalized visited this cycle */43UDATA _unfinalizedEnqueued; /**< unfinalized objects that are enqueued during this cycle (MUST be less than or equal _unfinalizedCandidates) */4445UDATA _ownableSynchronizerCandidates; /**< number of ownable synchronizer objects visited this cycle */46UDATA _ownableSynchronizerCleared; /**< number of ownable synchronizer objects cleared this cycle */4748MM_ReferenceStats _weakReferenceStats; /**< Weak reference stats for the cycle */49MM_ReferenceStats _softReferenceStats; /**< Soft reference stats for the cycle */50MM_ReferenceStats _phantomReferenceStats; /**< Phantom reference stats for the cycle */5152UDATA _stringConstantsCleared; /**< The number of string constants that have been cleared during marking */53UDATA _stringConstantsCandidates; /**< The number of string constants that have been visited in string table during marking */5455UDATA _monitorReferenceCleared; /**< The number of monitor references that have been cleared during marking */56UDATA _monitorReferenceCandidates; /**< The number of monitor references that have been visited in monitor table during marking */5758#if defined(J9MODRON_TGC_PARALLEL_STATISTICS)59UDATA splitArraysProcessed; /**< The number of array chunks (not counting parts smaller than the split size) processed by this thread */60UDATA splitArraysAmount;61#endif /* J9MODRON_TGC_PARALLEL_STATISTICS */6263/* function members */64private:65protected:66public:67void clear();68void merge(MM_MarkJavaStats* statsToMerge);6970MM_MarkJavaStats() :71MM_Base()72, _unfinalizedCandidates(0)73, _unfinalizedEnqueued(0)74, _ownableSynchronizerCandidates(0)75, _ownableSynchronizerCleared(0)76, _weakReferenceStats()77, _softReferenceStats()78, _phantomReferenceStats()79, _stringConstantsCleared(0)80, _stringConstantsCandidates(0)81, _monitorReferenceCleared(0)82, _monitorReferenceCandidates(0)83{84clear();85}86};8788#endif /* MARKJAVASTATS_HPP_ */899091