Skip to content

Commit

Permalink
8326509: Clean up JNIEXPORT in Hotspot after JDK-8017234
Browse files Browse the repository at this point in the history
Reviewed-by: djelinski, jwaters, dholmes
  • Loading branch information
magicus committed Feb 28, 2024
1 parent 1ab6bd4 commit e6b3bda
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 35 deletions.
9 changes: 0 additions & 9 deletions src/hotspot/cpu/aarch64/assembler_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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->
Expand Down
11 changes: 3 additions & 8 deletions src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(), \
Expand All @@ -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(), \
Expand All @@ -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 }
Expand Down
13 changes: 0 additions & 13 deletions src/hotspot/share/jvmci/vmStructs_jvmci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 0 additions & 5 deletions src/hotspot/share/utilities/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@
#include <stdio.h>
#include <stdarg.h>

#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;
Expand Down

1 comment on commit e6b3bda

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.