8350903: Remove explicit libjvm.so dependency for libVThreadEventTest

Reviewed-by: dholmes, alanb
This commit is contained in:
Jiangli Zhou 2025-03-03 17:36:31 +00:00
parent 7c187b5d81
commit bb70896e35
2 changed files with 1 additions and 10 deletions

View File

@ -882,7 +882,6 @@ ifeq ($(call isTargetOs, windows), true)
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libMonitorWithDeadObjectTest.c libTestPsig.c exeGetCreatedJavaVMs.c libTestUnloadedClass.cpp
BUILD_HOTSPOT_JTREG_LIBRARIES_JDK_LIBS_libnativeStack := java.base:libjvm
BUILD_HOTSPOT_JTREG_LIBRARIES_JDK_LIBS_libVThreadEventTest := java.base:libjvm
else
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbootclssearch_agent += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsystemclssearch_agent += -lpthread
@ -1522,7 +1521,6 @@ else
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMonitorWithDeadObjectTest += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libTestUnloadedClass += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_JDK_LIBS_libVThreadEventTest := java.base:libjvm
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeGetCreatedJavaVMs := -lpthread
BUILD_HOTSPOT_JTREG_EXECUTABLES_JDK_LIBS_exeGetCreatedJavaVMs := java.base:libjvm

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -127,7 +127,6 @@ Agent_OnAttach(JavaVM *vm, char *options, void *reserved) {
jvmtiCapabilities caps;
jvmtiError err;
JNIEnv *env;
jsize nVMs;
jint res;
jclass clazz;
jmethodID mid;
@ -166,12 +165,6 @@ Agent_OnAttach(JavaVM *vm, char *options, void *reserved) {
// call VThreadEventTest.agentStarted to notify test that agent has started
res = JNI_GetCreatedJavaVMs(&vm, 1, &nVMs);
if (res != JNI_OK) {
LOG("JNI_GetCreatedJavaVMs failed: %d\n", res);
return JNI_ERR;
}
res = vm->GetEnv((void **) &env, JNI_VERSION_21);
if (res != JNI_OK) {
LOG("GetEnv failed: %d\n", res);