Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/share/aod/aod.h
41161 views
1
/*
2
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*/
23
#ifndef NSK_SHARE_AOD_H
24
#define NSK_SHARE_AOD_H
25
26
#include <jni.h>
27
#include <jni_tools.h>
28
#include <nsk_tools.h>
29
30
extern "C" {
31
32
/*
33
* This function can be used to inform AOD framework that some non-critical for test logic
34
* error happened inside shared function (e.g. JVMTI Deallocate failed).
35
*
36
* If this function was called status of all finishing AOD agents is changed to failed.
37
*/
38
39
void nsk_aod_internal_error();
40
41
/*
42
* Work with agent options
43
*/
44
45
#define NSK_AOD_MAX_OPTIONS 10
46
47
#define NSK_AOD_AGENT_NAME_OPTION "-agentName"
48
#define NSK_AOD_VERBOSE_OPTION "-verbose"
49
50
typedef struct {
51
char* names[NSK_AOD_MAX_OPTIONS];
52
char* values[NSK_AOD_MAX_OPTIONS];
53
int size;
54
} Options;
55
56
Options* nsk_aod_createOptions(char* optionsString);
57
58
const char* nsk_aod_getOptionValue(Options* options, const char* option);
59
60
int nsk_aod_optionSpecified(Options* options, const char* option);
61
62
/*
63
* Agent synchronization with target application
64
*/
65
66
// this function is used to notify target application that native agent has been loaded
67
int nsk_aod_agentLoaded(JNIEnv* jni, const char* agentName);
68
69
// this function is used to notify target application that native agent has been finished execution
70
int nsk_aod_agentFinished(JNIEnv* jni, const char* agentName, int success);
71
72
73
// JNI env creation
74
75
JNIEnv* nsk_aod_createJNIEnv(JavaVM* vm);
76
77
}
78
79
#endif /* END OF NSK_SHARE_AOD_H */
80
81