Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/include/ute.h
5986 views
1
/*******************************************************************************
2
* Copyright (c) 1991, 2017 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 _IBM_UTE_H
23
#define _IBM_UTE_H
24
25
/* @ddr_namespace: default */
26
27
#include <limits.h>
28
29
#include "jni.h"
30
#include "j9.h"
31
#include "ute_module.h"
32
#include "ute_core.h"
33
#include "j9trace.h"
34
35
#ifdef __cplusplus
36
extern "C" {
37
#endif
38
39
#define J9_RAS_IS_METHOD_TRACED(flags) (( flags & (J9_RAS_METHOD_TRACING|J9_RAS_METHOD_TRIGGERING) ))
40
#define UTSINTERFACEFROMVM(vm) ((J9UtServerInterface *)((UtInterface *)((RasGlobalStorage *)vm->j9rasGlobalStorage)->utIntf)->server)
41
42
#define UTSI_TRACEMETHODENTER_FROMVM(vm, thr, method, receiverAddress, methodType) \
43
do { \
44
RasGlobalStorage *tempRasGbl; \
45
tempRasGbl = (RasGlobalStorage *)vm->j9rasGlobalStorage; \
46
if (tempRasGbl != NULL) { \
47
((J9UtServerInterface *)((UtInterface *)tempRasGbl->utIntf)->server)->TraceMethodEnter(thr, method, receiverAddress, methodType); \
48
} \
49
} while(0)
50
#define UTSI_TRACEMETHODEXIT_FROMVM(vm, thr, method, exceptionPtr, returnValuePtr, methodType) \
51
do { \
52
RasGlobalStorage *tempRasGbl; \
53
tempRasGbl = (RasGlobalStorage *)vm->j9rasGlobalStorage; \
54
if (tempRasGbl != NULL) { \
55
((J9UtServerInterface *)((UtInterface *)tempRasGbl->utIntf)->server)->TraceMethodExit(thr, method, exceptionPtr, returnValuePtr, methodType); \
56
} \
57
} while(0)
58
59
/*
60
* =============================================================================
61
* The server interface for calls into UT
62
* =============================================================================
63
*/
64
typedef struct J9UtServerInterface {
65
/* OMR layer API */
66
UtServerInterface omrf;
67
68
/* Java layer API */
69
void (*TraceMethodEnter)(J9VMThread* thr, J9Method* method, void *receiverAddress, UDATA methodType);
70
void (*TraceMethodExit)(J9VMThread* thr, J9Method* method, void* exceptionPtr, void *returnValuePtr, UDATA methodType);
71
void (*StartupComplete)(J9VMThread* thr);
72
} J9UtServerInterface;
73
74
#ifdef __cplusplus
75
}
76
#endif
77
#endif /* !_IBM_UTE_H */
78
79