Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/compiler/control/rossa.h
6000 views
1
/*******************************************************************************
2
* Copyright (c) 2000, 2021 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
23
#ifndef __ROSSA_H
24
#define __ROSSA_H
25
26
typedef enum {
27
compilationOK = 0,
28
compilationFailure = 1, /* catch all error */
29
compilationRestrictionILNodes = 2, /* Unused */
30
compilationRestrictionRecDepth = 3, /* Unused */
31
compilationRestrictedMethod = 4, /* filters, JNI, abstract */
32
compilationExcessiveComplexity = 5,
33
compilationNotNeeded = 6,
34
compilationSuspended = 7,
35
compilationExcessiveSize = 8, /* full caches */
36
compilationInterrupted = 9, /* GC wants to unload classes */
37
compilationMetaDataFailure = 10, /* cannot create metadata */
38
compilationInProgress = 11, /* for async compilations */
39
compilationCHTableCommitFailure = 12,
40
compilationMaxCallerIndexExceeded = 13,
41
compilationKilledByClassReplacement = 14,
42
compilationHeapLimitExceeded = 15,
43
compilationNeededAtHigherLevel = 16, /*rtj */
44
compilationAotValidateFieldFailure = 17, /* aot failures */
45
compilationAotStaticFieldReloFailure = 18,
46
compilationAotClassReloFailure = 19,
47
compilationAotThunkReloFailure = 20,
48
compilationAotTrampolineReloFailure = 21,
49
compilationAotPicTrampolineReloFailure = 22,
50
compilationAotCacheFullReloFailure = 23, /* end of aot failures */
51
compilationAotUnknownReloTypeFailure = 24,
52
compilationCodeReservationFailure = 25,
53
compilationAotHasInvokehandle = 26,
54
compilationTrampolineFailure = 27,
55
compilationRecoverableTrampolineFailure = 28, /* we should retry these */
56
compilationILGenFailure = 29,
57
compilationIllegalCodeCacheSwitch = 30,
58
compilationNullSubstituteCodeCache = 31,
59
compilationCodeMemoryExhausted = 32,
60
compilationGCRPatchFailure = 33,
61
compilationAotValidateMethodExitFailure = 34,
62
compilationAotValidateMethodEnterFailure = 35,
63
compilationLambdaEnforceScorching = 37,
64
compilationInternalPointerExceedLimit = 38,
65
compilationAotRelocationInterrupted = 39,
66
compilationAotClassChainPersistenceFailure = 40,
67
compilationLowPhysicalMemory = 41,
68
compilationDataCacheError = 42,
69
compilationCodeCacheError = 43,
70
compilationRecoverableCodeCacheError = 44,
71
compilationAotHasInvokeVarHandle = 45,
72
compilationAotValidateStringCompressionFailure = 46,
73
compilationFSDHasInvokeHandle = 47,
74
compilationVirtualAddressExhaustion = 48,
75
compilationEnforceProfiling = 49,
76
compilationSymbolValidationManagerFailure = 50,
77
compilationAOTNoSupportForAOTFailure = 51,
78
compilationAOTValidateTMFailure = 52,
79
compilationILGenUnsupportedValueTypeOperationFailure = 53,
80
compilationAOTRelocationRecordGenerationFailure = 54,
81
compilationAotPatchedCPConstant = 55,
82
compilationAotHasInvokeSpecialInterface = 56,
83
compilationAotValidateExceptionHookFailure = 57,
84
compilationAotBlockFrequencyReloFailure = 58,
85
compilationAotRecompQueuedFlagReloFailure = 59,
86
compilationAOTValidateOSRFailure = 60,
87
#if defined(J9VM_OPT_JITSERVER)
88
compilationFirstJITServerFailure,
89
compilationStreamFailure = compilationFirstJITServerFailure, // 61
90
compilationStreamLostMessage = compilationFirstJITServerFailure + 1, // 62
91
compilationStreamMessageTypeMismatch = compilationFirstJITServerFailure + 2, // 63
92
compilationStreamVersionIncompatible = compilationFirstJITServerFailure + 3, // 64
93
compilationStreamInterrupted = compilationFirstJITServerFailure + 4, // 65
94
aotCacheDeserializationFailure = compilationFirstJITServerFailure + 5, // 66
95
#endif /* defined(J9VM_OPT_JITSERVER) */
96
/* please insert new codes before compilationMaxError which is used in jar2jxe to test the error codes range */
97
/* If new codes are added then add the corresponding names in compilationErrorNames table in rossa.cpp */
98
compilationMaxError /* must be the last one */
99
} TR_CompilationErrorCode;
100
101
#ifdef __cplusplus
102
extern "C" {
103
#endif
104
/* compilation error codes */
105
106
jint JNICALL JVM_OnUnload(JavaVM * jvm, void* reserved0);
107
IDATA j9jit_testarossa(struct J9JITConfig *jitConfig, J9VMThread * context, J9Method * method, void *oldStartPC);
108
IDATA j9jit_testarossa_err(struct J9JITConfig *jitConfig, J9VMThread * context, J9Method * method, void * oldStartPC, TR_CompilationErrorCode *compErrCode);
109
IDATA retranslateWithPreparation(struct J9JITConfig * jitConfig, J9VMThread * vmThread, J9Method * method, void * oldStartPC, UDATA reason);
110
IDATA retranslateWithPreparationForMethodRedefinition(struct J9JITConfig * jitConfig, J9VMThread * vmThread, J9Method * method, void * oldStartPC);
111
void* old_translateMethodHandle(J9VMThread *currentThread, j9object_t methodHandle);
112
void* translateMethodHandle(J9VMThread *currentThread, j9object_t methodHandle, j9object_t arg, U_32 flags);
113
void disableJit(J9JITConfig *jitConfig);
114
void enableJit(J9JITConfig *jitConfig);
115
116
jint onLoadInternal(J9JavaVM * javaVM, J9JITConfig *jitConfig, char *xjitCommandLine, char *xaotCommandLine, UDATA flagsParm, void *reserved0, I_32 xnojit);
117
int32_t aboutToBootstrap(J9JavaVM * javaVM, J9JITConfig * jitConfig);
118
void JitShutdown(J9JITConfig * jitConfig);
119
void freeJITConfig(J9JITConfig * jitConfig);
120
121
#ifdef __cplusplus
122
}
123
#endif
124
#endif
125
126
127
128
129