Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/openjdk/jdk into feature/…
Browse files Browse the repository at this point in the history
…fm-vh-checks-0
  • Loading branch information
liach committed Jan 30, 2025
2 parents a95cea9 + 1ac2d6e commit 059bb44
Show file tree
Hide file tree
Showing 203 changed files with 9,008 additions and 4,633 deletions.
8 changes: 4 additions & 4 deletions doc/hotspot-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ <h3 id="source-files">Source Files</h3>
should be put in the .hpp file, and not in the .inline.hpp file. This
rule exists to resolve problems with circular dependencies between
.inline.hpp files.</p></li>
<li><p>All .cpp files include precompiled.hpp as the first include
line.</p></li>
<li><p>precompiled.hpp is just a build time optimization, so don't rely
on it to resolve include problems.</p></li>
<li><p>Some build configurations use precompiled headers to speed up the
build times. The precompiled headers are included in the precompiled.hpp
file. Note that precompiled.hpp is just a build time optimization, so
don't rely on it to resolve include problems.</p></li>
<li><p>Keep the include lines alphabetically sorted.</p></li>
<li><p>Put conditional inclusions (<code>#if ...</code>) at the end of
the include list.</p></li>
Expand Down
8 changes: 4 additions & 4 deletions doc/hotspot-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ the first include line. Declarations needed by other files should be put
in the .hpp file, and not in the .inline.hpp file. This rule exists to
resolve problems with circular dependencies between .inline.hpp files.

* All .cpp files include precompiled.hpp as the first include line.

* precompiled.hpp is just a build time optimization, so don't rely on
it to resolve include problems.
* Some build configurations use precompiled headers to speed up the
build times. The precompiled headers are included in the precompiled.hpp
file. Note that precompiled.hpp is just a build time optimization, so
don't rely on it to resolve include problems.

* Keep the include lines alphabetically sorted.

Expand Down
4 changes: 4 additions & 0 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ $(eval $(call IncludeCustomExtension, RunTests.gmk))

# This is the JDK that we will test
JDK_UNDER_TEST := $(JDK_IMAGE_DIR)
# The JDK used to compile jtreg test code. By default it is the same as
# JDK_UNDER_TEST.
JDK_FOR_COMPILE := $(JDK_IMAGE_DIR)

TEST_RESULTS_DIR := $(OUTPUTDIR)/test-results
TEST_SUPPORT_DIR := $(OUTPUTDIR)/test-support
Expand Down Expand Up @@ -979,6 +982,7 @@ define SetupRunJtregTestBody
$$(JTREG_JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
$$($1_JTREG_BASIC_OPTIONS) \
-compilejdk:$$(JDK_FOR_COMPILE) \
-testjdk:$$(JDK_UNDER_TEST) \
-dir:$$(JTREG_TOPDIR) \
-reportDir:$$($1_TEST_RESULTS_DIR) \
Expand Down
8 changes: 7 additions & 1 deletion make/autoconf/basic.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -624,4 +624,10 @@ AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
# Make the compare script executable
$CHMOD +x $OUTPUTDIR/compare.sh
# Copy the linker wrapper script for clang on AIX and make it executable
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
$CP -f "$TOPDIR/make/scripts/aix/ld.sh" "$OUTPUTDIR/ld.sh"
$CHMOD +x "$OUTPUTDIR/ld.sh"
fi
])
18 changes: 9 additions & 9 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
[
# bounds, memory and behavior checking options
if test "x$TOOLCHAIN_TYPE" = xgcc; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
case $DEBUG_LEVEL in
release )
# no adjustment
Expand Down Expand Up @@ -517,12 +517,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
fi
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
# clang compiler on aix needs -ffunction-sections
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno -fstack-protector"
TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char -fstack-protector"
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"
TOOLCHAIN_CFLAGS_JDK="-fvisibility=hidden -pipe -fstack-protector"
Expand All @@ -542,7 +536,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# Restrict the debug information created by Clang to avoid
# too big object files and speed the build up a little bit
# (see http://llvm.org/bugs/show_bug.cgi?id=7554)
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info -fstack-protector"
# In principle the stack alignment below is cpu- and ABI-dependent and
# should agree with values of StackAlignmentInBytes in various
Expand All @@ -560,7 +554,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JDK="-pipe"
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
fi
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden"
if test "x$OPENJDK_TARGET_OS" = xaix; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno"
TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char"
fi
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden -fstack-protector"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# The -utf-8 option sets source and execution character sets to UTF-8 to enable correct
Expand Down
4 changes: 2 additions & 2 deletions make/autoconf/flags-ldflags.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -79,7 +79,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
-Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k"
-Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k -fuse-ld=$OUTPUTDIR/ld.sh"
BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc"
fi
Expand Down
4 changes: 2 additions & 2 deletions make/common/Modules.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -92,7 +92,7 @@ SRC_SUBDIRS += share/classes

SPEC_SUBDIRS += share/specs

MAN_SUBDIRS += share/man
MAN_SUBDIRS += share/man windows/man

# Find all module-info.java files for the current build target platform and
# configuration.
Expand Down
7 changes: 2 additions & 5 deletions make/modules/java.desktop/lib/ClientLibraries.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -360,8 +360,6 @@ else
LIBFONTMANAGER_JDK_LIBS += libfreetype
endif

LIBFONTMANAGER_OPTIMIZATION := HIGHEST

ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
# gcc (and to an extent clang) is particularly bad at optimizing these files,
# causing a massive spike in compile time. We don't care about these
Expand All @@ -372,7 +370,6 @@ endif

ifeq ($(call isTargetOs, windows), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c X11TextRenderer.c
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
else ifeq ($(call isTargetOs, macosx), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c X11TextRenderer.c \
fontpath.c lcdglyph.c
Expand All @@ -393,7 +390,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
AccelGlyphCache.c, \
CFLAGS := $(LIBFONTMANAGER_CFLAGS), \
CXXFLAGS := $(LIBFONTMANAGER_CFLAGS), \
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
OPTIMIZATION := HIGHEST, \
CFLAGS_windows = -DCC_NOEX, \
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \
EXTRA_SRC := $(LIBFONTMANAGER_EXTRA_SRC), \
Expand Down
27 changes: 27 additions & 0 deletions make/scripts/aix/ld.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
#
# Copyright (c) 2025 SAP SE. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
unset LIBPATH
exec /usr/bin/ld "$@"
140 changes: 140 additions & 0 deletions src/hotspot/cpu/aarch64/stubDeclarations_aarch64.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/

#ifndef CPU_AARCH64_STUBDECLARATIONS_HPP
#define CPU_AARCH64_STUBDECLARATIONS_HPP

#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(initial, 10000) \


#define STUBGEN_CONTINUATION_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(continuation, 2000) \


#define STUBGEN_COMPILER_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(compiler, 30000 ZGC_ONLY(+10000)) \
do_stub(compiler, vector_iota_indices) \
do_arch_entry(aarch64, compiler, vector_iota_indices, \
vector_iota_indices, vector_iota_indices) \
do_stub(compiler, large_array_equals) \
do_arch_entry(aarch64, compiler, large_array_equals, \
large_array_equals, large_array_equals) \
do_stub(compiler, large_arrays_hashcode_boolean) \
do_arch_entry(aarch64, compiler, large_arrays_hashcode_boolean, \
large_arrays_hashcode_boolean, \
large_arrays_hashcode_boolean) \
do_stub(compiler, large_arrays_hashcode_byte) \
do_arch_entry(aarch64, compiler, large_arrays_hashcode_byte, \
large_arrays_hashcode_byte, \
large_arrays_hashcode_byte) \
do_stub(compiler, large_arrays_hashcode_char) \
do_arch_entry(aarch64, compiler, large_arrays_hashcode_char, \
large_arrays_hashcode_char, \
large_arrays_hashcode_char) \
do_stub(compiler, large_arrays_hashcode_short) \
do_arch_entry(aarch64, compiler, large_arrays_hashcode_short, \
large_arrays_hashcode_short, \
large_arrays_hashcode_short) \
do_stub(compiler, large_arrays_hashcode_int) \
do_arch_entry(aarch64, compiler, large_arrays_hashcode_int, \
large_arrays_hashcode_int, \
large_arrays_hashcode_int) \
do_stub(compiler, large_byte_array_inflate) \
do_arch_entry(aarch64, compiler, large_byte_array_inflate, \
large_byte_array_inflate, large_byte_array_inflate) \
do_stub(compiler, count_positives) \
do_arch_entry(aarch64, compiler, count_positives, count_positives, \
count_positives) \
do_stub(compiler, count_positives_long) \
do_arch_entry(aarch64, compiler, count_positives_long, \
count_positives_long, count_positives_long) \
do_stub(compiler, compare_long_string_LL) \
do_arch_entry(aarch64, compiler, compare_long_string_LL, \
compare_long_string_LL, compare_long_string_LL) \
do_stub(compiler, compare_long_string_UU) \
do_arch_entry(aarch64, compiler, compare_long_string_UU, \
compare_long_string_UU, compare_long_string_UU) \
do_stub(compiler, compare_long_string_LU) \
do_arch_entry(aarch64, compiler, compare_long_string_LU, \
compare_long_string_LU, compare_long_string_LU) \
do_stub(compiler, compare_long_string_UL) \
do_arch_entry(aarch64, compiler, compare_long_string_UL, \
compare_long_string_UL, compare_long_string_UL) \
do_stub(compiler, string_indexof_linear_ll) \
do_arch_entry(aarch64, compiler, string_indexof_linear_ll, \
string_indexof_linear_ll, string_indexof_linear_ll) \
do_stub(compiler, string_indexof_linear_uu) \
do_arch_entry(aarch64, compiler, string_indexof_linear_uu, \
string_indexof_linear_uu, string_indexof_linear_uu) \
do_stub(compiler, string_indexof_linear_ul) \
do_arch_entry(aarch64, compiler, string_indexof_linear_ul, \
string_indexof_linear_ul, string_indexof_linear_ul) \
/* this uses the entry for ghash_processBlocks */ \
do_stub(compiler, ghash_processBlocks_wide) \


#define STUBGEN_FINAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(final, 20000 ZGC_ONLY(+100000)) \
do_stub(final, copy_byte_f) \
do_arch_entry(aarch64, final, copy_byte_f, copy_byte_f, \
copy_byte_f) \
do_stub(final, copy_byte_b) \
do_arch_entry(aarch64, final, copy_byte_b, copy_byte_b, \
copy_byte_b) \
do_stub(final, copy_oop_f) \
do_arch_entry(aarch64, final, copy_oop_f, copy_oop_f, copy_oop_f) \
do_stub(final, copy_oop_b) \
do_arch_entry(aarch64, final, copy_oop_b, copy_oop_b, copy_oop_b) \
do_stub(final, copy_oop_uninit_f) \
do_arch_entry(aarch64, final, copy_oop_uninit_f, copy_oop_uninit_f, \
copy_oop_uninit_f) \
do_stub(final, copy_oop_uninit_b) \
do_arch_entry(aarch64, final, copy_oop_uninit_b, copy_oop_uninit_b, \
copy_oop_uninit_b) \
do_stub(final, zero_blocks) \
do_arch_entry(aarch64, final, zero_blocks, zero_blocks, \
zero_blocks) \
do_stub(final, spin_wait) \
do_arch_entry_init(aarch64, final, spin_wait, spin_wait, \
spin_wait, empty_spin_wait) \
/* stub only -- entries are not stored in StubRoutines::aarch64 */ \
/* n.b. these are not the same as the generic atomic stubs */ \
do_stub(final, atomic_entry_points) \


#endif // CPU_AARCH64_STUBDECLARATIONS_HPP
Loading

0 comments on commit 059bb44

Please sign in to comment.