Skip to content

Commit 9ad4d3d

Browse files
author
Sandhya Viswanathan
committed
8276025: Hotspot's libsvml.so may conflict with user dependency
Reviewed-by: kvn, erikj, psandoz, ihse
1 parent e21b5c7 commit 9ad4d3d

File tree

78 files changed

+17882
-17882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+17882
-17882
lines changed

make/modules/jdk.incubator.vector/Lib.gmk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ include LibCommon.gmk
2828
################################################################################
2929

3030
ifeq ($(call isTargetOs, linux windows)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2), true+true+true)
31-
$(eval $(call SetupJdkLibrary, BUILD_LIBSVML, \
32-
NAME := svml, \
31+
$(eval $(call SetupJdkLibrary, BUILD_LIBJSVML, \
32+
NAME := jsvml, \
3333
CFLAGS := $(CFLAGS_JDKLIB), \
3434
LDFLAGS := $(LDFLAGS_JDKLIB) \
3535
$(call SET_SHARED_LIBRARY_ORIGIN), \
3636
LDFLAGS_windows := -defaultlib:msvcrt, \
3737
))
3838

39-
TARGETS += $(BUILD_LIBSVML)
39+
TARGETS += $(BUILD_LIBJSVML)
4040
endif
4141

4242
################################################################################

src/hotspot/cpu/x86/stubGenerator_x86_64.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7833,15 +7833,15 @@ address generate_avx_ghash_processBlocks() {
78337833
}
78347834

78357835
// Get svml stub routine addresses
7836-
void *libsvml = NULL;
7836+
void *libjsvml = NULL;
78377837
char ebuf[1024];
78387838
char dll_name[JVM_MAXPATHLEN];
7839-
if (os::dll_locate_lib(dll_name, sizeof(dll_name), Arguments::get_dll_dir(), "svml")) {
7840-
libsvml = os::dll_load(dll_name, ebuf, sizeof ebuf);
7839+
if (os::dll_locate_lib(dll_name, sizeof(dll_name), Arguments::get_dll_dir(), "jsvml")) {
7840+
libjsvml = os::dll_load(dll_name, ebuf, sizeof ebuf);
78417841
}
7842-
if (libsvml != NULL) {
7842+
if (libjsvml != NULL) {
78437843
// SVML method naming convention
7844-
// All the methods are named as __svml_op<T><N>_ha_<VV>
7844+
// All the methods are named as __jsvml_op<T><N>_ha_<VV>
78457845
// Where:
78467846
// ha stands for high accuracy
78477847
// <T> is optional to indicate float/double
@@ -7852,22 +7852,22 @@ address generate_avx_ghash_processBlocks() {
78527852
// e.g. 128 bit float vector has 4 float elements
78537853
// <VV> indicates the avx/sse level:
78547854
// z0 is AVX512, l9 is AVX2, e9 is AVX1 and ex is for SSE2
7855-
// e.g. __svml_expf16_ha_z0 is the method for computing 16 element vector float exp using AVX 512 insns
7856-
// __svml_exp8_ha_z0 is the method for computing 8 element vector double exp using AVX 512 insns
7855+
// e.g. __jsvml_expf16_ha_z0 is the method for computing 16 element vector float exp using AVX 512 insns
7856+
// __jsvml_exp8_ha_z0 is the method for computing 8 element vector double exp using AVX 512 insns
78577857

7858-
log_info(library)("Loaded library %s, handle " INTPTR_FORMAT, JNI_LIB_PREFIX "svml" JNI_LIB_SUFFIX, p2i(libsvml));
7858+
log_info(library)("Loaded library %s, handle " INTPTR_FORMAT, JNI_LIB_PREFIX "jsvml" JNI_LIB_SUFFIX, p2i(libjsvml));
78597859
if (UseAVX > 2) {
78607860
for (int op = 0; op < VectorSupport::NUM_SVML_OP; op++) {
78617861
int vop = VectorSupport::VECTOR_OP_SVML_START + op;
78627862
if ((!VM_Version::supports_avx512dq()) &&
78637863
(vop == VectorSupport::VECTOR_OP_LOG || vop == VectorSupport::VECTOR_OP_LOG10 || vop == VectorSupport::VECTOR_OP_POW)) {
78647864
continue;
78657865
}
7866-
snprintf(ebuf, sizeof(ebuf), "__svml_%sf16_ha_z0", VectorSupport::svmlname[op]);
7867-
StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_512][op] = (address)os::dll_lookup(libsvml, ebuf);
7866+
snprintf(ebuf, sizeof(ebuf), "__jsvml_%sf16_ha_z0", VectorSupport::svmlname[op]);
7867+
StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_512][op] = (address)os::dll_lookup(libjsvml, ebuf);
78687868

7869-
snprintf(ebuf, sizeof(ebuf), "__svml_%s8_ha_z0", VectorSupport::svmlname[op]);
7870-
StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_512][op] = (address)os::dll_lookup(libsvml, ebuf);
7869+
snprintf(ebuf, sizeof(ebuf), "__jsvml_%s8_ha_z0", VectorSupport::svmlname[op]);
7870+
StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_512][op] = (address)os::dll_lookup(libjsvml, ebuf);
78717871
}
78727872
}
78737873
const char* avx_sse_str = (UseAVX >= 2) ? "l9" : ((UseAVX == 1) ? "e9" : "ex");
@@ -7876,23 +7876,23 @@ address generate_avx_ghash_processBlocks() {
78767876
if (vop == VectorSupport::VECTOR_OP_POW) {
78777877
continue;
78787878
}
7879-
snprintf(ebuf, sizeof(ebuf), "__svml_%sf4_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7880-
StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_64][op] = (address)os::dll_lookup(libsvml, ebuf);
7879+
snprintf(ebuf, sizeof(ebuf), "__jsvml_%sf4_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7880+
StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_64][op] = (address)os::dll_lookup(libjsvml, ebuf);
78817881

7882-
snprintf(ebuf, sizeof(ebuf), "__svml_%sf4_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7883-
StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_128][op] = (address)os::dll_lookup(libsvml, ebuf);
7882+
snprintf(ebuf, sizeof(ebuf), "__jsvml_%sf4_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7883+
StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_128][op] = (address)os::dll_lookup(libjsvml, ebuf);
78847884

7885-
snprintf(ebuf, sizeof(ebuf), "__svml_%sf8_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7886-
StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_256][op] = (address)os::dll_lookup(libsvml, ebuf);
7885+
snprintf(ebuf, sizeof(ebuf), "__jsvml_%sf8_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7886+
StubRoutines::_vector_f_math[VectorSupport::VEC_SIZE_256][op] = (address)os::dll_lookup(libjsvml, ebuf);
78877887

7888-
snprintf(ebuf, sizeof(ebuf), "__svml_%s1_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7889-
StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_64][op] = (address)os::dll_lookup(libsvml, ebuf);
7888+
snprintf(ebuf, sizeof(ebuf), "__jsvml_%s1_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7889+
StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_64][op] = (address)os::dll_lookup(libjsvml, ebuf);
78907890

7891-
snprintf(ebuf, sizeof(ebuf), "__svml_%s2_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7892-
StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_128][op] = (address)os::dll_lookup(libsvml, ebuf);
7891+
snprintf(ebuf, sizeof(ebuf), "__jsvml_%s2_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7892+
StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_128][op] = (address)os::dll_lookup(libjsvml, ebuf);
78937893

7894-
snprintf(ebuf, sizeof(ebuf), "__svml_%s4_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7895-
StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_256][op] = (address)os::dll_lookup(libsvml, ebuf);
7894+
snprintf(ebuf, sizeof(ebuf), "__jsvml_%s4_ha_%s", VectorSupport::svmlname[op], avx_sse_str);
7895+
StubRoutines::_vector_d_math[VectorSupport::VEC_SIZE_256][op] = (address)os::dll_lookup(libjsvml, ebuf);
78967896
}
78977897
}
78987898
#endif // COMPILER2

0 commit comments

Comments
 (0)