Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/jcl/common/jclglob.h
6000 views
1
/*******************************************************************************
2
* Copyright (c) 1998, 2020 IBM Corp. and others
3
*
4
* This program and the accompanying materials are made available under
5
* the terms of the Eclipse Public License 2.0 which accompanies this
6
* 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 and
8
* is available at https://www.apache.org/licenses/LICENSE-2.0.
9
*
10
* This Source Code may also be made available under the following
11
* Secondary Licenses when the conditions for such availability set
12
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
* General Public License, version 2 with the GNU Classpath
14
* Exception [1] and GNU General Public License, version 2 with the
15
* OpenJDK Assembly Exception [2].
16
*
17
* [1] https://www.gnu.org/software/classpath/license.html
18
* [2] http://openjdk.java.net/legal/assembly-exception.html
19
*
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-exception
21
*******************************************************************************/
22
#ifndef jclglob_h
23
#define jclglob_h
24
25
#include "jcl.h"
26
#include "j9vmls.h"
27
28
#include "jcltrace.h"
29
30
#ifdef __cplusplus
31
extern "C" {
32
#endif
33
34
extern void *JCL_ID_CACHE;
35
36
typedef struct JniIDCache {
37
38
jfieldID FID_java_lang_ClassLoader_vmRef;
39
40
jmethodID MID_com_ibm_lang_management_GarbageCollectorMXBeanImpl_getName;
41
42
jmethodID MID_java_lang_reflect_Parameter_init;
43
44
jclass CLS_java_lang_String;
45
jclass CLS_java_lang_reflect_Parameter;
46
47
#ifdef J9VM_OPT_SHARED_CLASSES
48
jclass CLS_com_ibm_oti_shared_SharedClassCacheInfo;
49
jmethodID MID_com_ibm_oti_shared_SharedClassCacheInfo_init;
50
jclass CLS_java_util_ArrayList;
51
jmethodID MID_java_util_ArrayList_add;
52
#endif
53
54
traceDotCGlobalMemory traceGlobals;
55
56
jclass CLS_openj9_management_internal_ThreadInfoBase;
57
jclass CLS_openj9_management_internal_MonitorInfoBase;
58
jclass CLS_openj9_management_internal_LockInfoBase;
59
jmethodID MID_openj9_management_internal_ThreadInfoBase_init_nolocks;
60
jmethodID MID_openj9_management_internal_ThreadInfoBase_init;
61
jmethodID MID_openj9_management_internal_MonitorInfoBase_init;
62
jmethodID MID_openj9_management_internal_LockInfoBase_init;
63
jclass CLS_java_lang_StackTraceElement;
64
jmethodID MID_java_lang_StackTraceElement_isNativeMethod;
65
66
jmethodID MID_java_lang_ClassLoader_findLoadedClass;
67
68
jclass CLS_sun_reflect_ConstantPool;
69
jfieldID FID_sun_reflect_ConstantPool_constantPoolOop;
70
71
jmethodID MID_java_lang_Class_getName;
72
73
jclass CLS_com_ibm_lang_management_ProcessorUsage;
74
jmethodID MID_com_ibm_lang_management_ProcessorUsage_init;
75
jmethodID MID_com_ibm_lang_management_ProcessorUsage_updateValues;
76
77
jclass CLS_com_ibm_lang_management_MemoryUsage;
78
jmethodID MID_com_ibm_lang_management_MemoryUsage_updateValues;
79
80
jclass CLS_java_com_ibm_virtualization_management_GuestOSProcessorUsage;
81
jmethodID MID_java_com_ibm_virtualization_management_GuestOSProcessorUsage_updateValues;
82
jclass CLS_java_com_ibm_virtualization_management_GuestOSMemoryUsage;
83
jmethodID MID_java_com_ibm_virtualization_management_GuestOSMemoryUsage_updateValues;
84
jmethodID MID_com_ibm_jvm_Stats_setFields;
85
86
jclass CLS_java_lang_AnonymousClassLoader;
87
jmethodID MID_java_lang_AnonymousClassLoader_init;
88
89
jclass CLS_java_security_AccessController;
90
jmethodID MID_java_security_AccessController_checkPermission;
91
92
jclass CLS_java_com_ibm_lang_management_JvmCpuMonitorInfo;
93
jmethodID MID_java_com_ibm_lang_management_JvmCpuMonitorInfo_updateValues;
94
95
jclass CLS_java_net_URL;
96
jmethodID MID_java_net_URL_getPath;
97
jmethodID MID_java_net_URL_getProtocol;
98
99
jmethodID MID_com_ibm_lang_management_internal_ExtendedGarbageCollectorMXBeanImpl_buildGcInfo;
100
101
jmethodID MID_java_lang_StackWalker_walkWrapperImpl;
102
103
} JniIDCache;
104
105
106
#define JCL_CACHE_GET(env,x) \
107
(((JniIDCache*) J9VMLS_GET((env), JCL_ID_CACHE))->x)
108
109
#define JCL_CACHE_SET(env,x,v) \
110
(((JniIDCache*) J9VMLS_GET((env), JCL_ID_CACHE))->x = (v))
111
112
#define jclmem_allocate_memory(env, byteAmount) \
113
j9mem_allocate_memory(byteAmount, J9MEM_CATEGORY_VM_JCL)
114
115
#define jclmem_free_memory(env, buf) \
116
j9mem_free_memory(buf)
117
118
#ifdef __cplusplus
119
}
120
#endif
121
122
#endif /* jclglob_h */
123
124
125