Skip to content

Commit e6b3bda

Browse files
committed
8326509: Clean up JNIEXPORT in Hotspot after JDK-8017234
Reviewed-by: djelinski, jwaters, dholmes
1 parent 1ab6bd4 commit e6b3bda

File tree

4 files changed

+3
-35
lines changed

4 files changed

+3
-35
lines changed

src/hotspot/cpu/aarch64/assembler_aarch64.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@
3131
#include "memory/resourceArea.hpp"
3232
#include "metaprogramming/primitiveConversions.hpp"
3333

34-
#if defined(TARGET_COMPILER_gcc)
35-
#undef JNIEXPORT
36-
#define JNIEXPORT
37-
#endif
38-
3934
#ifndef PRODUCT
4035
const uintptr_t Assembler::asm_bp = 0x0000ffffac221240;
4136
#endif
@@ -123,10 +118,6 @@ extern "C" {
123118
else
124119
Disassembler::decode((address)start, (address)start + len);
125120
}
126-
127-
JNIEXPORT void das1(uintptr_t insn) {
128-
das(insn, 1);
129-
}
130121
}
131122

132123
#define __ as->

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@
7070
#include "jfr/jfr.hpp"
7171
#endif
7272

73-
#if defined(TARGET_COMPILER_gcc)
74-
#undef JNIEXPORT
75-
#define JNIEXPORT
76-
#endif
77-
7873
JVMCIKlassHandle::JVMCIKlassHandle(Thread* thread, Klass* klass) {
7974
_thread = thread;
8075
_klass = klass;
@@ -187,7 +182,7 @@ Handle JavaArgumentUnboxer::next_arg(BasicType expectedType) {
187182
// Entry to native method implementation that transitions
188183
// current thread to '_thread_in_vm'.
189184
#define C2V_VMENTRY(result_type, name, signature) \
190-
JNIEXPORT result_type JNICALL c2v_ ## name signature { \
185+
result_type JNICALL c2v_ ## name signature { \
191186
JavaThread* thread = JavaThread::current_or_null(); \
192187
if (thread == nullptr) { \
193188
env->ThrowNew(JNIJVMCI::InternalError::clazz(), \
@@ -198,7 +193,7 @@ Handle JavaArgumentUnboxer::next_arg(BasicType expectedType) {
198193
JVMCITraceMark jtm("CompilerToVM::" #name);
199194

200195
#define C2V_VMENTRY_(result_type, name, signature, result) \
201-
JNIEXPORT result_type JNICALL c2v_ ## name signature { \
196+
result_type JNICALL c2v_ ## name signature { \
202197
JavaThread* thread = JavaThread::current_or_null(); \
203198
if (thread == nullptr) { \
204199
env->ThrowNew(JNIJVMCI::InternalError::clazz(), \
@@ -214,7 +209,7 @@ Handle JavaArgumentUnboxer::next_arg(BasicType expectedType) {
214209
// Entry to native method implementation that does not transition
215210
// current thread to '_thread_in_vm'.
216211
#define C2V_VMENTRY_PREFIX(result_type, name, signature) \
217-
JNIEXPORT result_type JNICALL c2v_ ## name signature { \
212+
result_type JNICALL c2v_ ## name signature { \
218213
JavaThread* thread = JavaThread::current_or_null();
219214

220215
#define C2V_END }

src/hotspot/share/jvmci/vmStructs_jvmci.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@
4747
#include "gc/g1/g1ThreadLocalData.hpp"
4848
#endif
4949

50-
#if defined(TARGET_COMPILER_gcc)
51-
#undef JNIEXPORT
52-
#define JNIEXPORT
53-
#endif
54-
5550
#define VM_STRUCTS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field) \
5651
static_field(CompilerToVM::Data, Klass_vtable_start_offset, int) \
5752
static_field(CompilerToVM::Data, Klass_vtable_length_offset, int) \
@@ -1028,14 +1023,6 @@ int JVMCIVMStructs::localHotSpotVMAddresses_count() {
10281023
return (sizeof(localHotSpotVMAddresses) / sizeof(VMAddressEntry)) - 1;
10291024
}
10301025

1031-
extern "C" {
1032-
JNIEXPORT VMStructEntry* jvmciHotSpotVMStructs = JVMCIVMStructs::localHotSpotVMStructs;
1033-
JNIEXPORT VMTypeEntry* jvmciHotSpotVMTypes = JVMCIVMStructs::localHotSpotVMTypes;
1034-
JNIEXPORT VMIntConstantEntry* jvmciHotSpotVMIntConstants = JVMCIVMStructs::localHotSpotVMIntConstants;
1035-
JNIEXPORT VMLongConstantEntry* jvmciHotSpotVMLongConstants = JVMCIVMStructs::localHotSpotVMLongConstants;
1036-
JNIEXPORT VMAddressEntry* jvmciHotSpotVMAddresses = JVMCIVMStructs::localHotSpotVMAddresses;
1037-
}
1038-
10391026
#ifdef ASSERT
10401027
// This is used both to check the types of referenced fields and
10411028
// to ensure that all of the field types are present.

src/hotspot/share/utilities/debug.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@
6767
#include <stdio.h>
6868
#include <stdarg.h>
6969

70-
#if defined(TARGET_COMPILER_gcc)
71-
#undef JNIEXPORT
72-
#define JNIEXPORT
73-
#endif
74-
7570
// Support for showing register content on asserts/guarantees.
7671
#ifdef CAN_SHOW_REGISTERS_ON_ASSERT
7772
static char g_dummy;

0 commit comments

Comments
 (0)