Path: blob/master/runtime/gc_verbose_java/VerboseManagerJava.hpp
5990 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(VERBOSEMANAGERJAVA_HPP_)24#define VERBOSEMANAGERJAVA_HPP_2526#include "j9.h"27#include "j9cfg.h"28#include "mmhook.h"2930#include "VerboseManager.hpp"31#include "VerboseWriter.hpp"3233class MM_EnvironmentBase;34class MM_VerboseHandlerOutput;35class MM_VerboseWriterChain;3637/**38* @ingroup GC_verbose_engine39*/40class MM_VerboseManagerJava : public MM_VerboseManager41{42/*43* Data members44*/45private:46/* Pointers to the Hook interface */47J9HookInterface** _mmHooks;4849protected:5051public:5253/*54* Function members55*/56private:5758protected:5960virtual MM_VerboseWriter *createWriter(MM_EnvironmentBase *env, WriterType type, char *filename, UDATA fileCount, UDATA iterations);6162/**63* Create the output handler specific to the kind of collector currently running.64* @param env[in] The main GC thread65* @return An instance of a sub-class of the MM_VerboseHandlerOutput abstract class which can handle output of verbose data for the collector currently running66*/67virtual MM_VerboseHandlerOutput *createVerboseHandlerOutputObject(MM_EnvironmentBase *env);6869public:7071static MM_VerboseManager *newInstance(MM_EnvironmentBase *env, OMR_VM* vm);7273virtual bool initialize(MM_EnvironmentBase *env);7475J9HookInterface** getHookInterface(){ return _mmHooks; }7677virtual void handleFileOpenError(MM_EnvironmentBase *env, char *fileName);7879MM_VerboseManagerJava(OMR_VM *omrVM)80: MM_VerboseManager(omrVM)81, _mmHooks(NULL)82{83}84};8586#endif /* VERBOSEMANAGERJAVA_HPP_ */878889