From e6b3bda2c30ea7932a8a20027e1ef2e805610f14 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Wed, 28 Feb 2024 10:31:18 +0000 Subject: [PATCH] 8326509: Clean up JNIEXPORT in Hotspot after JDK-8017234 Reviewed-by: djelinski, jwaters, dholmes --- src/hotspot/cpu/aarch64/assembler_aarch64.cpp | 9 --------- src/hotspot/share/jvmci/jvmciCompilerToVM.cpp | 11 +++-------- src/hotspot/share/jvmci/vmStructs_jvmci.cpp | 13 ------------- src/hotspot/share/utilities/debug.cpp | 5 ----- 4 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp index 69b791a089c..76f88764416 100644 --- a/src/hotspot/cpu/aarch64/assembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/assembler_aarch64.cpp @@ -31,11 +31,6 @@ #include "memory/resourceArea.hpp" #include "metaprogramming/primitiveConversions.hpp" -#if defined(TARGET_COMPILER_gcc) -#undef JNIEXPORT -#define JNIEXPORT -#endif - #ifndef PRODUCT const uintptr_t Assembler::asm_bp = 0x0000ffffac221240; #endif @@ -123,10 +118,6 @@ extern "C" { else Disassembler::decode((address)start, (address)start + len); } - - JNIEXPORT void das1(uintptr_t insn) { - das(insn, 1); - } } #define __ as-> diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp index 898ab9425e9..23e726fb180 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp @@ -70,11 +70,6 @@ #include "jfr/jfr.hpp" #endif -#if defined(TARGET_COMPILER_gcc) -#undef JNIEXPORT -#define JNIEXPORT -#endif - JVMCIKlassHandle::JVMCIKlassHandle(Thread* thread, Klass* klass) { _thread = thread; _klass = klass; @@ -187,7 +182,7 @@ Handle JavaArgumentUnboxer::next_arg(BasicType expectedType) { // Entry to native method implementation that transitions // current thread to '_thread_in_vm'. #define C2V_VMENTRY(result_type, name, signature) \ - JNIEXPORT result_type JNICALL c2v_ ## name signature { \ + result_type JNICALL c2v_ ## name signature { \ JavaThread* thread = JavaThread::current_or_null(); \ if (thread == nullptr) { \ env->ThrowNew(JNIJVMCI::InternalError::clazz(), \ @@ -198,7 +193,7 @@ Handle JavaArgumentUnboxer::next_arg(BasicType expectedType) { JVMCITraceMark jtm("CompilerToVM::" #name); #define C2V_VMENTRY_(result_type, name, signature, result) \ - JNIEXPORT result_type JNICALL c2v_ ## name signature { \ + result_type JNICALL c2v_ ## name signature { \ JavaThread* thread = JavaThread::current_or_null(); \ if (thread == nullptr) { \ env->ThrowNew(JNIJVMCI::InternalError::clazz(), \ @@ -214,7 +209,7 @@ Handle JavaArgumentUnboxer::next_arg(BasicType expectedType) { // Entry to native method implementation that does not transition // current thread to '_thread_in_vm'. #define C2V_VMENTRY_PREFIX(result_type, name, signature) \ - JNIEXPORT result_type JNICALL c2v_ ## name signature { \ + result_type JNICALL c2v_ ## name signature { \ JavaThread* thread = JavaThread::current_or_null(); #define C2V_END } diff --git a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp index e6e0133ab5e..242933c18af 100644 --- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp +++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp @@ -47,11 +47,6 @@ #include "gc/g1/g1ThreadLocalData.hpp" #endif -#if defined(TARGET_COMPILER_gcc) -#undef JNIEXPORT -#define JNIEXPORT -#endif - #define VM_STRUCTS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field) \ static_field(CompilerToVM::Data, Klass_vtable_start_offset, int) \ static_field(CompilerToVM::Data, Klass_vtable_length_offset, int) \ @@ -1028,14 +1023,6 @@ int JVMCIVMStructs::localHotSpotVMAddresses_count() { return (sizeof(localHotSpotVMAddresses) / sizeof(VMAddressEntry)) - 1; } -extern "C" { -JNIEXPORT VMStructEntry* jvmciHotSpotVMStructs = JVMCIVMStructs::localHotSpotVMStructs; -JNIEXPORT VMTypeEntry* jvmciHotSpotVMTypes = JVMCIVMStructs::localHotSpotVMTypes; -JNIEXPORT VMIntConstantEntry* jvmciHotSpotVMIntConstants = JVMCIVMStructs::localHotSpotVMIntConstants; -JNIEXPORT VMLongConstantEntry* jvmciHotSpotVMLongConstants = JVMCIVMStructs::localHotSpotVMLongConstants; -JNIEXPORT VMAddressEntry* jvmciHotSpotVMAddresses = JVMCIVMStructs::localHotSpotVMAddresses; -} - #ifdef ASSERT // This is used both to check the types of referenced fields and // to ensure that all of the field types are present. diff --git a/src/hotspot/share/utilities/debug.cpp b/src/hotspot/share/utilities/debug.cpp index b2f16c0defa..9a15a5bdba6 100644 --- a/src/hotspot/share/utilities/debug.cpp +++ b/src/hotspot/share/utilities/debug.cpp @@ -67,11 +67,6 @@ #include #include -#if defined(TARGET_COMPILER_gcc) -#undef JNIEXPORT -#define JNIEXPORT -#endif - // Support for showing register content on asserts/guarantees. #ifdef CAN_SHOW_REGISTERS_ON_ASSERT static char g_dummy;