Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/gc_verbose_java/VerboseManagerJava.hpp
5990 views
1
2
/*******************************************************************************
3
* Copyright (c) 1991, 2020 IBM Corp. and others
4
*
5
* This program and the accompanying materials are made available under
6
* the terms of the Eclipse Public License 2.0 which accompanies this
7
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
8
* or the Apache License, Version 2.0 which accompanies this distribution and
9
* is available at https://www.apache.org/licenses/LICENSE-2.0.
10
*
11
* This Source Code may also be made available under the following
12
* Secondary Licenses when the conditions for such availability set
13
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
14
* General Public License, version 2 with the GNU Classpath
15
* Exception [1] and GNU General Public License, version 2 with the
16
* OpenJDK Assembly Exception [2].
17
*
18
* [1] https://www.gnu.org/software/classpath/license.html
19
* [2] http://openjdk.java.net/legal/assembly-exception.html
20
*
21
* 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-exception
22
*******************************************************************************/
23
24
#if !defined(VERBOSEMANAGERJAVA_HPP_)
25
#define VERBOSEMANAGERJAVA_HPP_
26
27
#include "j9.h"
28
#include "j9cfg.h"
29
#include "mmhook.h"
30
31
#include "VerboseManager.hpp"
32
#include "VerboseWriter.hpp"
33
34
class MM_EnvironmentBase;
35
class MM_VerboseHandlerOutput;
36
class MM_VerboseWriterChain;
37
38
/**
39
* @ingroup GC_verbose_engine
40
*/
41
class MM_VerboseManagerJava : public MM_VerboseManager
42
{
43
/*
44
* Data members
45
*/
46
private:
47
/* Pointers to the Hook interface */
48
J9HookInterface** _mmHooks;
49
50
protected:
51
52
public:
53
54
/*
55
* Function members
56
*/
57
private:
58
59
protected:
60
61
virtual MM_VerboseWriter *createWriter(MM_EnvironmentBase *env, WriterType type, char *filename, UDATA fileCount, UDATA iterations);
62
63
/**
64
* Create the output handler specific to the kind of collector currently running.
65
* @param env[in] The main GC thread
66
* @return An instance of a sub-class of the MM_VerboseHandlerOutput abstract class which can handle output of verbose data for the collector currently running
67
*/
68
virtual MM_VerboseHandlerOutput *createVerboseHandlerOutputObject(MM_EnvironmentBase *env);
69
70
public:
71
72
static MM_VerboseManager *newInstance(MM_EnvironmentBase *env, OMR_VM* vm);
73
74
virtual bool initialize(MM_EnvironmentBase *env);
75
76
J9HookInterface** getHookInterface(){ return _mmHooks; }
77
78
virtual void handleFileOpenError(MM_EnvironmentBase *env, char *fileName);
79
80
MM_VerboseManagerJava(OMR_VM *omrVM)
81
: MM_VerboseManager(omrVM)
82
, _mmHooks(NULL)
83
{
84
}
85
};
86
87
#endif /* VERBOSEMANAGERJAVA_HPP_ */
88
89