Path: blob/master/runtime/gc_verbose_handler_standard_java/VerboseHandlerOutputStandardJava.hpp
5986 views
/*******************************************************************************1* Copyright (c) 1991, 2020 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* 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-exception20*******************************************************************************/2122#if !defined(VERBOSEHANDLEROUTPUTSTANDARDJAVA_HPP_)23#define VERBOSEHANDLEROUTPUTSTANDARDJAVA_HPP_2425#include "j9.h"26#include "j9cfg.h"2728#include "VerboseHandlerOutputStandard.hpp"2930class MM_VerboseHandlerOutputStandardJava : public MM_VerboseHandlerOutputStandard31{32private:33protected:34J9HookInterface** _mmHooks; /**< Pointers to the mm Hook interface */35J9HookInterface **_vmHooks; /**< Pointers to the vm Hook interface */36public:3738private:39/**40* Output unfinalized processing summary.41* @param env GC thread used for output.42* @param indent base level of indentation for the summary.43* @param unfinalizedCandidates number of unfinalized candidates encountered.44* @param unfinalizedCount number of candidates that transitioned from unfinalized.45*/46void outputUnfinalizedInfo(MM_EnvironmentBase *env, UDATA indent, UDATA unfinalizedCandidates, UDATA unfinalizedEnqueuedCount);4748/**49* Output ownable synchronizer processing summary.50* @param env GC thread used for output.51* @param indent base level of indentation for the summary.52* @param ownableSynchronizerCandidates number of ownable synchronizers encountered.53* @param ownableSynchronizerCleared number of ownable synchronizers cleared.54*/55void outputOwnableSynchronizerInfo(MM_EnvironmentBase *env, UDATA indent, UDATA ownableSynchronizerCandidates, UDATA ownableSynchronizerCleared);5657/**58* Output reference processing summary.59* @param env GC thread used for output.60* @param indent base level of indentation for the summary.61* @param referenceType character string representation of the reference type.62* @param referenceStats summary stats data of the processing.63* @param dynamicThreshold dynamic threshold value for reference64* @param maxThreshold maximum threshold value for reference. If it equal 0 thresholds should not be included to output line65*/66void outputReferenceInfo(MM_EnvironmentBase *env, UDATA indent, const char *referenceType, MM_ReferenceStats *referenceStats, UDATA dynamicThreshold, UDATA maxThreshold);6768protected:6970virtual bool initialize(MM_EnvironmentBase *env, MM_VerboseManager *manager);71virtual void tearDown(MM_EnvironmentBase *env);7273virtual void outputMemoryInfoInnerStanzaInternal(MM_EnvironmentBase *env, UDATA indent, MM_CollectionStatistics *stats);7475virtual bool getThreadName(char *buf, UDATA bufLen, OMR_VMThread *vmThread);76virtual void writeVmArgs(MM_EnvironmentBase* env, MM_VerboseBuffer* buffer);7778MM_VerboseHandlerOutputStandardJava(MM_GCExtensions *extensions) :79MM_VerboseHandlerOutputStandard(extensions)80, _mmHooks(NULL)81, _vmHooks(NULL)82{};8384public:85static MM_VerboseHandlerOutput *newInstance(MM_EnvironmentBase *env, MM_VerboseManager *manager);8687virtual void enableVerbose();88virtual void disableVerbose();8990/* Java-specific logic for selected GC events. */91virtual void handleMarkEndInternal(MM_EnvironmentBase* env, void *eventData);92#if defined(J9VM_GC_MODRON_SCAVENGER)93virtual void handleScavengeEndInternal(MM_EnvironmentBase* env, void *eventData);94#endif /*defined(J9VM_GC_MODRON_SCAVENGER) */95#if defined(OMR_GC_MODRON_CONCURRENT_MARK)96virtual const char* getConcurrentKickoffReason(void *eventData);97#if defined(J9VM_GC_DYNAMIC_CLASS_UNLOADING)98virtual void handleConcurrentHaltedInternal(MM_EnvironmentBase *env, void *eventData);99#endif /* defined(J9VM_GC_DYNAMIC_CLASS_UNLOADING) */100#endif /* defined(OMR_GC_MODRON_CONCURRENT_MARK) */101102#if defined(J9VM_GC_DYNAMIC_CLASS_UNLOADING)103/**104* Write verbose stanza for a compact end event.105* @param hook Hook interface used by the JVM.106* @param eventNum The hook event number.107* @param eventData hook specific event data.108*/109void handleClassUnloadEnd(J9HookInterface** hook, UDATA eventNum, void* eventData);110#endif /* defined(J9VM_GC_DYNAMIC_CLASS_UNLOADING) */111112/**113* @param hook Hook interface used by the JVM.114* @param eventNum The hook event number.115* @param eventData hook specific event data.116*/117void handleSlowExclusive(J9HookInterface **hook, UDATA eventNum, void *eventData);118};119120#endif /* VERBOSEHANDLEROUTPUTSTANDARDJAVA_HPP_ */121122123