Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge jdk-22+19 into rivos/main #140

Merged
merged 44 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c6c69b5
8314654: Metaspace: move locking out of MetaspaceArena
tstuefe Oct 5, 2023
3630af2
8316594: C2 SuperWord: wrong result with hand unrolled loops
eme64 Oct 5, 2023
1ed9c76
8309204: Obsolete DoReserveCopyInSuperWord
eme64 Oct 5, 2023
a250ae4
8317039: Enable specifying the JDK used to run jtreg
Oct 5, 2023
42be238
8316523: Relativize esp in interpreter frames (PowerPC only)
Oct 5, 2023
4c5b66d
8317522: Test logic for BODY_CF in AbstractThrowingSubscribers.java i…
dfuch Oct 5, 2023
a8eacb3
8317240: Promptly free OopMapEntry after fail to insert the entry to …
zhengyu123 Oct 5, 2023
a1c9587
8313348: Fix typo in JFormattedTextField: 'it self'
aivanov-jdk Oct 5, 2023
8a30c2a
8317443: StackOverflowError on calling ListFormat::getInstance() for …
naotoj Oct 5, 2023
991ce84
4964430: (spec) missing IllegalStateException exception requirement f…
blperez01 Oct 6, 2023
f0d66d1
8317502: Add asserts to check for non-null in ciInstance::java_lang_C…
Oct 6, 2023
7162624
8269393: store/load order not preserved when handling memory pool due…
Oct 6, 2023
ec9ba5d
8317660: [BACKOUT] 8269393: store/load order not preserved when handl…
TobiHartmann Oct 6, 2023
691db5d
8317592: Serial: Remove Space::toContiguousSpace
albertnetymk Oct 6, 2023
b3cc0c8
8317318: Serial: Change GenCollectedHeap to SerialHeap in whitebox
albertnetymk Oct 6, 2023
a64794b
8317560: Change to Xcode 14.3.1 for building on macOS at Oracle
vidmik Oct 6, 2023
b62e774
8317515: Unify the code of the parse*() families of methods in j.l.In…
rgiulietti Oct 6, 2023
6c6beba
8317128: java/nio/file/Files/CopyAndMove.java failed with AccessDenie…
Oct 6, 2023
a4e9168
8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long,…
vamsi-parasa Oct 6, 2023
dc4bc4f
8306819: Consider disabling the compiler's default active annotation …
jddarcy Oct 6, 2023
460ebcd
8314978: Multiple server call from connection failing with expect100 …
Oct 8, 2023
bcc986b
8317601: Windows build on WSL broken after JDK-8317340
Oct 9, 2023
0cf1a55
8317440: Lock rank checking fails when code root set is modified with…
Oct 9, 2023
6ddbfaa
8317136: [AIX] Problem List runtime/jni/terminatedThread/TestTerminat…
varada1110 Oct 9, 2023
a57ae7e
8317594: G1: Refactor find_empty_from_idx_reverse
albertnetymk Oct 9, 2023
7ff1938
8310727: C2: *_of() methods in PhaseIterGVN should use uint for the n…
dlunde Oct 9, 2023
a07a4a3
8317422: [JVMCI] concurrency issue in MethodData creation
Oct 9, 2023
1f06325
8317471: ListFormat::parseObject() spec can be improved on parsePosit…
naotoj Oct 9, 2023
508fa71
8317736: Stream::handleReset locks twice
dfuch Oct 9, 2023
3ff5a78
8317693: Unused parameter to Tokens.Token.comment method
jonathan-gibbons Oct 9, 2023
f61499c
8316608: Enable parallelism in vmTestbase/gc/vector tests
roy-soumadipta Oct 9, 2023
5e8d893
8317631: Refactor ChoiceFormat tests to use JUnit
Oct 9, 2023
8e0686b
8317633: Modernize text.testlib.HexDumpReader
Oct 9, 2023
5b311f2
8316446: 4 sun/management/jdp tests ignore VM flags
lmesnik Oct 9, 2023
053f456
8316447: 8 sun/management/jmxremote tests ignore VM flags
lmesnik Oct 9, 2023
d313915
8316233: VirtualThreadStart events should not be thread-filtered
Oct 10, 2023
e882718
8314199: Initial size PBEKeyFactory#validTypes is not up-to-date
driverkt Oct 10, 2023
ad6dce3
8317705: ProblemList sun/tools/jstat/jstatLineCountsX.sh on linux-ppc…
RealCLanger Oct 10, 2023
ef41aa0
8317711: Exclude gtest/GTestWrapper.java on AIX
RealCLanger Oct 10, 2023
fcff222
8317706: Exclude java/awt/Graphics2D/DrawString/RotTransText.java on …
RealCLanger Oct 10, 2023
ad7a8e8
8315505: CompileTask timestamp printed can overflow
tstuefe Oct 10, 2023
c2abf12
8261894: Remove support for UseSHM
tstuefe Oct 10, 2023
fb4098f
8317730: Change byte_size to return size_t
albertnetymk Oct 10, 2023
7a52d43
Merge remote-tracking branch 'origin/rivos/main' into rivos/merge-jdk…
luhenry Oct 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h2 id="operating-system-requirements">Operating System
</tr>
<tr class="even">
<td>macOS</td>
<td>Mac OS X 10.13 (High Sierra)</td>
<td>macOS 13 (Ventura)</td>
</tr>
<tr class="odd">
<td>Windows</td>
Expand Down Expand Up @@ -464,9 +464,8 @@ <h3 id="macos">macOS</h3>
a continuously updated machine running macOS. See the section on <a
href="#apple-xcode">Apple Xcode</a> on some strategies to deal with
this.</p>
<p>It is recommended that you use at least Mac OS X 10.13 (High Sierra).
At the time of writing, the JDK has been successfully compiled on macOS
10.12 (Sierra).</p>
<p>It is recommended that you use at least macOS 13 (Ventura) and Xcode
14, but earlier versions may also work.</p>
<p>The standard macOS environment contains the basic tooling needed to
build, but for external libraries a package manager is recommended. The
JDK uses <a href="https://brew.sh/">homebrew</a> in the examples, but
Expand Down Expand Up @@ -545,7 +544,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler
</tr>
<tr class="even">
<td>macOS</td>
<td>Apple Xcode 10.1 (using clang 10.0.0)</td>
<td>Apple Xcode 14.3.1 (using clang 14.0.3)</td>
</tr>
<tr class="odd">
<td>Windows</td>
Expand Down
8 changes: 4 additions & 4 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ time of writing.
| Operating system | Vendor/version used |
| ----------------- | ---------------------------------- |
| Linux | Oracle Enterprise Linux 6.4 / 7.6 |
| macOS | Mac OS X 10.13 (High Sierra) |
| macOS | macOS 13 (Ventura) |
| Windows | Windows Server 2012 R2 |

The double version numbers for Linux are due to the hybrid model
Expand Down Expand Up @@ -270,8 +270,8 @@ difficult for a project such as the JDK to keep pace with a continuously updated
machine running macOS. See the section on [Apple Xcode](#apple-xcode) on some
strategies to deal with this.

It is recommended that you use at least Mac OS X 10.13 (High Sierra). At the time
of writing, the JDK has been successfully compiled on macOS 10.12 (Sierra).
It is recommended that you use at least macOS 13 (Ventura) and Xcode
14, but earlier versions may also work.

The standard macOS environment contains the basic tooling needed to build, but
for external libraries a package manager is recommended. The JDK uses
Expand Down Expand Up @@ -337,7 +337,7 @@ issues.
| Operating system | Toolchain version |
| ------------------ | ------------------------------------------ |
| Linux | gcc 11.2.0 |
| macOS | Apple Xcode 10.1 (using clang 10.0.0) |
| macOS | Apple Xcode 14.3.1 (using clang 14.0.3) |
| Windows | Microsoft Visual Studio 2022 update 17.1.0 |

All compilers are expected to be able to compile to the C99 language standard,
Expand Down
2 changes: 1 addition & 1 deletion make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ define SetupRunJtregTestBody
$$(RM) -r $$($1_TEST_RESULTS_DIR)

$1_COMMAND_LINE := \
$$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
$$(JTREG_JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
$$($1_JTREG_BASIC_OPTIONS) \
-testjdk:$$(JDK_UNDER_TEST) \
Expand Down
2 changes: 2 additions & 0 deletions make/RunTestsPrebuilt.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ $(eval $(call SetupVariable,JT_HOME))
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols,NO_CHECK))
$(eval $(call SetupVariable,JTREG_JAVA,$(BOOT_JDK)/bin/java))

# Provide default values for tools that we need
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
Expand Down Expand Up @@ -248,6 +249,7 @@ $(call CreateNewSpec, $(NEW_SPEC), \
TOPDIR := $(TOPDIR), \
OUTPUTDIR := $(OUTPUTDIR), \
BOOT_JDK := $(BOOT_JDK), \
JTREG_JAVA := $(FIXPATH) $(JTREG_JAVA), \
JT_HOME := $(JT_HOME), \
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
JCOV_IMAGE_DIR := $(JCOV_IMAGE_DIR), \
Expand Down
9 changes: 7 additions & 2 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -844,15 +844,20 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
]
)
if test "x$FILE_MACRO_CFLAGS" != x; then
# Add -pathmap for all VS system include paths using Windows
# full Long path name that is generated by the compiler
# Add -pathmap for all VS system include paths using Windows
# full Long path name that is generated by the compiler
# Not enabled under WSL as there is no easy way to obtain the
# Windows full long paths, thus reproducible WSL builds will
# depend on building with the same VS toolchain install location.
if test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl1" && test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl2"; then
for ipath in ${$3SYSROOT_CFLAGS}; do
if test "x${ipath:0:2}" == "x-I"; then
ipath_path=${ipath#"-I"}
UTIL_FIXUP_WIN_LONG_PATH(ipath_path)
FILE_MACRO_CFLAGS="$FILE_MACRO_CFLAGS -pathmap:\"$ipath_path\"=vsi"
fi
done
fi
fi
fi

Expand Down
38 changes: 37 additions & 1 deletion make/autoconf/lib-tests.m4
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,48 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JTREG],
UTIL_FIXUP_PATH(JT_HOME)
AC_SUBST(JT_HOME)

# Specify a JDK for running jtreg. Defaults to the BOOT_JDK.
AC_ARG_WITH(jtreg-jdk, [AS_HELP_STRING([--with-jdk],
[path to JDK for running jtreg @<:@BOOT_JDK@:>@])])

AC_MSG_CHECKING([for jtreg jdk])
if test "x${with_jtreg_jdk}" != x; then
if test "x${with_jtreg_jdk}" = xno; then
AC_MSG_RESULT([no, jtreg jdk not specified])
elif test "x${with_jtreg_jdk}" = xyes; then
AC_MSG_RESULT([not specified])
AC_MSG_ERROR([--with-jtreg-jdk needs a value])
else
JTREG_JDK="${with_jtreg_jdk}"
AC_MSG_RESULT([$JTREG_JDK])
UTIL_FIXUP_PATH(JTREG_JDK)
if test ! -f "$JTREG_JDK/bin/java"; then
AC_MSG_ERROR([Could not find jtreg java at $JTREG_JDK/bin/java])
fi
fi
else
JTREG_JDK="${BOOT_JDK}"
AC_MSG_RESULT([no, using BOOT_JDK])
fi

JTREG_JAVA="$JTREG_JDK/bin/java"
UTIL_FIXUP_PATH(JTREG_JAVA)
JTREG_JAVA="$FIXPATH $JTREG_JAVA"
AC_SUBST([JTREG_JAVA])


# Verify jtreg version
if test "x$JT_HOME" != x; then
AC_MSG_CHECKING([jtreg jar existence])
if test ! -f "$JT_HOME/lib/jtreg.jar"; then
AC_MSG_ERROR([Could not find jtreg jar at $JT_HOME/lib/jtreg.jar])
fi

AC_MSG_CHECKING([jtreg version number])
# jtreg -version looks like this: "jtreg 6.1+1-19"
# Extract actual version part ("6.1" in this case)
jtreg_version_full=`$JAVA -jar $JT_HOME/lib/jtreg.jar -version | $HEAD -n 1 | $CUT -d ' ' -f 2`
jtreg_version_full=$($JTREG_JAVA -jar $JT_HOME/lib/jtreg.jar -version | $HEAD -n 1 | $CUT -d ' ' -f 2)

jtreg_version=${jtreg_version_full/%+*}
AC_MSG_RESULT([$jtreg_version])

Expand Down
2 changes: 2 additions & 0 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
BUILDJDK_JAVA_FLAGS_SMALL:=@BUILDJDK_JAVA_FLAGS_SMALL@
JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@

JTREG_JAVA:=@JTREG_JAVA@

# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
# versions of the variables directly.
Expand Down
1 change: 1 addition & 0 deletions make/autoconf/util_paths.m4
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ AC_DEFUN([UTIL_FIXUP_PATH],

##############################################################################
# Fixup path to be a Windows full long path
# Note: Only supported with cygwin/msys2 (cygpath tool)
AC_DEFUN([UTIL_FIXUP_WIN_LONG_PATH],
[
# Only process if variable expands to non-empty
Expand Down
2 changes: 1 addition & 1 deletion make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ var getJibProfilesDependencies = function (input, common) {

var devkit_platform_revisions = {
linux_x64: "gcc11.2.0-OL6.4+1.0",
macosx: "Xcode12.4+1.1",
macosx: "Xcode14.3.1+1.0",
windows_x64: "VS2022-17.1.0+1.1",
linux_aarch64: input.build_cpu == "x64" ? "gcc11.2.0-OL7.6+1.1" : "gcc11.2.0-OL7.6+1.0",
linux_arm: "gcc8.2.0-Fedora27+1.0",
Expand Down
8 changes: 4 additions & 4 deletions make/devkit/createMacosxDevkit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ for ex in $EXCLUDE_DIRS; do
done

echo "Copying Xcode.app..."
echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP/." $DEVKIT_ROOT/Xcode.app/
rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP/." $DEVKIT_ROOT/Xcode.app/
echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP/." $DEVKIT_ROOT/Xcode
rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP/." $DEVKIT_ROOT/Xcode

################################################################################

Expand All @@ -119,8 +119,8 @@ echo "Generating devkit.info..."
rm -f $DEVKIT_ROOT/devkit.info
echo-info "# This file describes to configure how to interpret the contents of this devkit"
echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode/Contents/Developer/usr/bin\""
echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""

################################################################################
Expand Down
22 changes: 21 additions & 1 deletion make/modules/java.base/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,30 @@ ifeq ($(ENABLE_FALLBACK_LINKER), true)
NAME := fallbackLinker, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFFI_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBFFI_LIBS), \
LIBS_windows := $(LIBFFI_LIBS) ws2_32.lib, \
))

TARGETS += $(BUILD_LIBFALLBACKLINKER)
endif

################################################################################

ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, x86_64)+$(INCLUDE_COMPILER2)+$(filter $(TOOLCHAIN_TYPE), gcc), true+true+true+gcc)
$(eval $(call SetupJdkLibrary, BUILD_LIB_SIMD_SORT, \
NAME := simdsort, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB), \
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBCXX), \
LIBS_linux := -lc -lm -ldl, \
))

TARGETS += $(BUILD_LIB_SIMD_SORT)
endif

################################################################################
20 changes: 6 additions & 14 deletions src/hotspot/cpu/ppc/continuationFreezeThaw_ppc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ void FreezeBase::adjust_interpreted_frame_unextended_sp(frame& f) {
// nothing to do
}

static inline void relativize_one(intptr_t* const vfp, intptr_t* const hfp, int offset) {
assert(*(hfp + offset) == *(vfp + offset), "");
intptr_t* addr = hfp + offset;
intptr_t value = *(intptr_t**)addr - vfp;
*addr = value;
}

inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, const frame& hf) {
intptr_t* vfp = f.fp();
intptr_t* hfp = hf.fp();
Expand All @@ -90,7 +83,9 @@ inline void FreezeBase::relativize_interpreted_frame_metadata(const frame& f, co
// Make sure that monitors is already relativized.
assert(hf.at_absolute(ijava_idx(monitors)) <= -(frame::ijava_state_size / wordSize), "");

relativize_one(vfp, hfp, ijava_idx(esp));
// Make sure that esp is already relativized.
assert(hf.at_absolute(ijava_idx(esp)) <= hf.at_absolute(ijava_idx(monitors)), "");

// top_frame_sp is already relativized

// hfp == hf.sp() + (f.fp() - f.sp()) is not true on ppc because the stack frame has room for
Expand Down Expand Up @@ -536,18 +531,15 @@ inline intptr_t* ThawBase::align(const frame& hf, intptr_t* frame_sp, frame& cal
return nullptr;
}

static inline void derelativize_one(intptr_t* const fp, int offset) {
intptr_t* addr = fp + offset;
*addr = (intptr_t)(fp + *addr);
}

inline void ThawBase::derelativize_interpreted_frame_metadata(const frame& hf, const frame& f) {
intptr_t* vfp = f.fp();

// Make sure that monitors is still relativized.
assert(f.at_absolute(ijava_idx(monitors)) <= -(frame::ijava_state_size / wordSize), "");

derelativize_one(vfp, ijava_idx(esp));
// Make sure that esp is still relativized.
assert(f.at_absolute(ijava_idx(esp)) <= f.at_absolute(ijava_idx(monitors)), "");

// Keep top_frame_sp relativized.
}

Expand Down
11 changes: 8 additions & 3 deletions src/hotspot/cpu/ppc/frame_ppc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ inline oop* frame::interpreter_frame_temp_oop_addr() const {
}

inline intptr_t* frame::interpreter_frame_esp() const {
return (intptr_t*) at(ijava_idx(esp));
return (intptr_t*) at_relative(ijava_idx(esp));
}

// Convenient setters
Expand All @@ -235,7 +235,12 @@ inline void frame::interpreter_frame_set_monitor_end(BasicObjectLock* end) {
}

inline void frame::interpreter_frame_set_cpcache(ConstantPoolCache* cp) { *interpreter_frame_cache_addr() = cp; }
inline void frame::interpreter_frame_set_esp(intptr_t* esp) { get_ijava_state()->esp = (intptr_t) esp; }

inline void frame::interpreter_frame_set_esp(intptr_t* esp) {
assert(is_interpreted_frame(), "interpreted frame expected");
// set relativized esp
get_ijava_state()->esp = (intptr_t) (esp - fp());
}

inline void frame::interpreter_frame_set_top_frame_sp(intptr_t* top_frame_sp) {
assert(is_interpreted_frame(), "interpreted frame expected");
Expand All @@ -252,7 +257,7 @@ inline intptr_t* frame::interpreter_frame_expression_stack() const {

// top of expression stack
inline intptr_t* frame::interpreter_frame_tos_address() const {
return (intptr_t*)at(ijava_idx(esp)) + Interpreter::stackElementWords;
return interpreter_frame_esp() + Interpreter::stackElementWords;
}

inline int frame::interpreter_frame_monitor_size() {
Expand Down
7 changes: 6 additions & 1 deletion src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2215,7 +2215,9 @@ void InterpreterMacroAssembler::call_VM(Register oop_result, address entry_point

void InterpreterMacroAssembler::save_interpreter_state(Register scratch) {
ld(scratch, 0, R1_SP);
std(R15_esp, _ijava_state_neg(esp), scratch);
subf(R0, scratch, R15_esp);
sradi(R0, R0, Interpreter::logStackElementSize);
std(R0, _ijava_state_neg(esp), scratch);
std(R14_bcp, _ijava_state_neg(bcp), scratch);
subf(R0, scratch, R26_monitor);
sradi(R0, R0, Interpreter::logStackElementSize);
Expand Down Expand Up @@ -2245,7 +2247,10 @@ void InterpreterMacroAssembler::restore_interpreter_state(Register scratch, bool
ld(R19_method, _ijava_state_neg(method), scratch);
ld(R27_constPoolCache, _ijava_state_neg(cpoolCache), scratch);
// Following ones are stack addresses and don't require reload.
// Derelativize esp
ld(R15_esp, _ijava_state_neg(esp), scratch);
sldi(R15_esp, R15_esp, Interpreter::logStackElementSize);
add(R15_esp, R15_esp, scratch);
ld(R18_locals, _ijava_state_neg(locals), scratch);
sldi(R18_locals, R18_locals, Interpreter::logStackElementSize);
add(R18_locals, R18_locals, scratch);
Expand Down
4 changes: 3 additions & 1 deletion src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,9 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call, Regist
__ std(R12_scratch2, _ijava_state_neg(monitors), R1_SP);
__ std(R14_bcp, _ijava_state_neg(bcp), R1_SP);
if (ProfileInterpreter) { __ std(R28_mdx, _ijava_state_neg(mdx), R1_SP); }
__ std(R15_esp, _ijava_state_neg(esp), R1_SP);
__ sub(R12_scratch2, R15_esp, R1_SP);
__ sradi(R12_scratch2, R12_scratch2, Interpreter::logStackElementSize);
__ std(R12_scratch2, _ijava_state_neg(esp), R1_SP);
__ std(R0, _ijava_state_neg(oop_tmp), R1_SP); // only used for native_call

// Store sender's SP and this frame's top SP.
Expand Down
20 changes: 20 additions & 0 deletions src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4172,6 +4172,26 @@ void StubGenerator::generate_compiler_stubs() {
= CAST_FROM_FN_PTR(address, SharedRuntime::montgomery_square);
}

// Load x86_64_sort library on supported hardware to enable avx512 sort and partition intrinsics
if (UseAVX > 2 && VM_Version::supports_avx512dq()) {
void *libsimdsort = nullptr;
char ebuf_[1024];
char dll_name_simd_sort[JVM_MAXPATHLEN];
if (os::dll_locate_lib(dll_name_simd_sort, sizeof(dll_name_simd_sort), Arguments::get_dll_dir(), "simdsort")) {
libsimdsort = os::dll_load(dll_name_simd_sort, ebuf_, sizeof ebuf_);
}
// Get addresses for avx512 sort and partition routines
if (libsimdsort != nullptr) {
log_info(library)("Loaded library %s, handle " INTPTR_FORMAT, JNI_LIB_PREFIX "simdsort" JNI_LIB_SUFFIX, p2i(libsimdsort));

snprintf(ebuf_, sizeof(ebuf_), "avx512_sort");
StubRoutines::_array_sort = (address)os::dll_lookup(libsimdsort, ebuf_);

snprintf(ebuf_, sizeof(ebuf_), "avx512_partition");
StubRoutines::_array_partition = (address)os::dll_lookup(libsimdsort, ebuf_);
}
}

// Get svml stub routine addresses
void *libjsvml = nullptr;
char ebuf[1024];
Expand Down
6 changes: 0 additions & 6 deletions src/hotspot/os/linux/globals_linux.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,12 @@
product(bool, UseLinuxPosixThreadCPUClocks, true, \
"enable fast Linux Posix clocks where available") \
\
product(bool, UseHugeTLBFS, false, \
"Use MAP_HUGETLB for large pages") \
\
product(bool, UseTransparentHugePages, false, \
"Use MADV_HUGEPAGE for large pages") \
\
product(bool, LoadExecStackDllInVMThread, true, \
"Load DLLs with executable-stack attribute in the VM Thread") \
\
product(bool, UseSHM, false, \
"Use SYSV shared memory for large pages") \
\
product(bool, UseContainerSupport, true, \
"Enable detection and runtime container configuration support") \
\
Expand Down
Loading
Loading