Path: blob/master/test/hotspot/jtreg/vmTestbase/nsk/share/aod/aod.h
41161 views
/*1* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/22#ifndef NSK_SHARE_AOD_H23#define NSK_SHARE_AOD_H2425#include <jni.h>26#include <jni_tools.h>27#include <nsk_tools.h>2829extern "C" {3031/*32* This function can be used to inform AOD framework that some non-critical for test logic33* error happened inside shared function (e.g. JVMTI Deallocate failed).34*35* If this function was called status of all finishing AOD agents is changed to failed.36*/3738void nsk_aod_internal_error();3940/*41* Work with agent options42*/4344#define NSK_AOD_MAX_OPTIONS 104546#define NSK_AOD_AGENT_NAME_OPTION "-agentName"47#define NSK_AOD_VERBOSE_OPTION "-verbose"4849typedef struct {50char* names[NSK_AOD_MAX_OPTIONS];51char* values[NSK_AOD_MAX_OPTIONS];52int size;53} Options;5455Options* nsk_aod_createOptions(char* optionsString);5657const char* nsk_aod_getOptionValue(Options* options, const char* option);5859int nsk_aod_optionSpecified(Options* options, const char* option);6061/*62* Agent synchronization with target application63*/6465// this function is used to notify target application that native agent has been loaded66int nsk_aod_agentLoaded(JNIEnv* jni, const char* agentName);6768// this function is used to notify target application that native agent has been finished execution69int nsk_aod_agentFinished(JNIEnv* jni, const char* agentName, int success);707172// JNI env creation7374JNIEnv* nsk_aod_createJNIEnv(JavaVM* vm);7576}7778#endif /* END OF NSK_SHARE_AOD_H */798081