Skip to content

Commit 17cd2c4

Browse files
committed
Merge
2 parents 526ad75 + 13f0f12 commit 17cd2c4

File tree

341 files changed

+3768
-2371
lines changed

Some content is hidden

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

341 files changed

+3768
-2371
lines changed

doc/building.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,13 +898,13 @@ <h2 id="reproducible-builds">Reproducible Builds</h2>
898898
<pre><code>export SOURCE_DATE_EPOCH=946684800
899899
bash configure --with-version-opt=adhoc
900900
make</code></pre>
901-
<p>Note that regardless if you specify a source date for <code>configure</code> or not, the JDK build system will set <code>SOURCE_DATE_EPOCH</code> for all build tools when building. If <code>--with-source-date</code> has the value <code>updated</code> (which is the default unless <code>SOURCE_DATE_EPOCH</code> is found by in the environment by <code>configure</code>), the source date value will be determined at build time.</p>
901+
<p>Note that regardless if you specify a source date for <code>configure</code> or not, the JDK build system will set <code>SOURCE_DATE_EPOCH</code> for all build tools when building. If <code>--with-source-date</code> has the value <code>current</code> (which is the default unless <code>SOURCE_DATE_EPOCH</code> is found by in the environment by <code>configure</code>), the source date value will be determined at configure time.</p>
902902
<p>There are several aspects of reproducible builds that can be individually adjusted by <code>configure</code> arguments. If any of these are given, they will override the value derived from <code>SOURCE_DATE_EPOCH</code>. These arguments are:</p>
903903
<ul>
904904
<li><p><code>--with-source-date</code></p>
905905
<p>This option controls how the JDK build sets <code>SOURCE_DATE_EPOCH</code> when building. It can be set to a value describing a date, either an epoch based timestamp as an integer, or a valid ISO-8601 date.</p>
906906
<p>It can also be set to one of the special values <code>current</code>, <code>updated</code> or <code>version</code>. <code>current</code> means that the time of running <code>configure</code> will be used. <code>version</code> will use the nominal release date for the current JDK version. <code>updated</code>, which means that <code>SOURCE_DATE_EPOCH</code> will be set to the current time each time you are running <code>make</code>. All choices, except for <code>updated</code>, will set a fixed value for the source date timestamp.</p>
907-
<p>When <code>SOURCE_DATE_EPOCH</code> is set, the default value for <code>--with-source-date</code> will be the value given by <code>SOURCE_DATE_EPOCH</code>. Otherwise, the default value is <code>updated</code>.</p></li>
907+
<p>When <code>SOURCE_DATE_EPOCH</code> is set, the default value for <code>--with-source-date</code> will be the value given by <code>SOURCE_DATE_EPOCH</code>. Otherwise, the default value is <code>current</code>.</p></li>
908908
<li><p><code>--with-hotspot-build-time</code></p>
909909
<p>This option controls the build time string that will be included in the hotspot library (<code>libjvm.so</code> or <code>jvm.dll</code>). When the source date is fixed (e.g. by setting <code>SOURCE_DATE_EPOCH</code>), the default value for <code>--with-hotspot-build-time</code> will be an ISO 8601 representation of that time stamp. Otherwise the default value will be the current time when building hotspot.</p></li>
910910
<li><p><code>--with-copyright-year</code></p>

doc/building.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,9 +1559,9 @@ make
15591559
15601560
Note that regardless if you specify a source date for `configure` or not, the
15611561
JDK build system will set `SOURCE_DATE_EPOCH` for all build tools when building.
1562-
If `--with-source-date` has the value `updated` (which is the default unless
1562+
If `--with-source-date` has the value `current` (which is the default unless
15631563
`SOURCE_DATE_EPOCH` is found by in the environment by `configure`), the source
1564-
date value will be determined at build time.
1564+
date value will be determined at configure time.
15651565
15661566
There are several aspects of reproducible builds that can be individually
15671567
adjusted by `configure` arguments. If any of these are given, they will override
@@ -1582,7 +1582,7 @@ the value derived from `SOURCE_DATE_EPOCH`. These arguments are:
15821582
15831583
When `SOURCE_DATE_EPOCH` is set, the default value for `--with-source-date`
15841584
will be the value given by `SOURCE_DATE_EPOCH`. Otherwise, the default value
1585-
is `updated`.
1585+
is `current`.
15861586
15871587
* `--with-hotspot-build-time`
15881588

make/autoconf/jdk-options.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
648648
AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
649649
[
650650
AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date],
651-
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@updated/value of SOURCE_DATE_EPOCH@:>@])],
651+
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@current/value of SOURCE_DATE_EPOCH@:>@])],
652652
[with_source_date_present=true], [with_source_date_present=false])
653653
654654
if test "x$SOURCE_DATE_EPOCH" != x && test "x$with_source_date" != x; then
@@ -665,9 +665,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
665665
with_source_date_present=true
666666
AC_MSG_RESULT([$SOURCE_DATE, from SOURCE_DATE_EPOCH])
667667
else
668-
# Tell the makefiles to update at each build
669-
SOURCE_DATE=updated
670-
AC_MSG_RESULT([determined at build time (default)])
668+
# Tell makefiles to take the time from configure
669+
SOURCE_DATE=$($DATE +"%s")
670+
AC_MSG_RESULT([$SOURCE_DATE, from 'current' (default)])
671671
fi
672672
elif test "x$with_source_date" = xupdated; then
673673
SOURCE_DATE=updated

make/conf/jib-profiles.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,7 @@ var getJibProfilesCommon = function (input, data) {
254254
"--disable-jvm-feature-shenandoahgc",
255255
versionArgs(input, common))
256256
};
257-
// Extra settings for release profiles
258-
common.release_profile_base = {
259-
configure_args: [
260-
"--enable-reproducible-build",
261-
],
262-
};
257+
263258
// Extra settings for debug profiles
264259
common.debug_suffix = "-debug";
265260
common.debug_profile_base = {
@@ -854,13 +849,6 @@ var getJibProfilesProfiles = function (input, common, data) {
854849
});
855850
});
856851

857-
// After creating all derived profiles, we can add the release profile base
858-
// to the main profiles
859-
common.main_profile_names.forEach(function (name) {
860-
profiles[name] = concatObjects(profiles[name],
861-
common.release_profile_base);
862-
});
863-
864852
// Artifacts of JCov profiles
865853
[ "linux-aarch64", "linux-x64", "macosx-x64", "macosx-aarch64", "windows-x64" ]
866854
.forEach(function (name) {

make/data/charsetmapping/IBM864.c2b

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0x25 U+0025

make/test/JtregNativeJdk.gmk

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeJliLaunchTest := \
5353
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
5454
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli
5555

56+
TEST_LIB_NATIVE_SRC := $(TOPDIR)/test/lib/native
57+
5658
# Platform specific setup
5759
ifeq ($(call isTargetOs, windows), true)
5860
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c \
@@ -67,26 +69,32 @@ ifeq ($(call isTargetOs, windows), true)
6769
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX) jvm.lib
6870
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib
6971
BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeNullCallerTest := /EHsc
70-
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := /EHsc
71-
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncInvokers := /EHsc
72-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := /EHsc
73-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := /EHsc
74-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := /EHsc
75-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := $(LIBCXX)
76-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncInvokers := $(LIBCXX)
77-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := $(LIBCXX)
78-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := $(LIBCXX)
79-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := $(LIBCXX)
72+
73+
# java.lang.foreign tests
74+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := -I$(TEST_LIB_NATIVE_SRC)
75+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerUnnamed := -I$(TEST_LIB_NATIVE_SRC)
76+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerModule := -I$(TEST_LIB_NATIVE_SRC)
77+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLoaderLookupInvoker := -I$(TEST_LIB_NATIVE_SRC)
78+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncInvokers := -I$(TEST_LIB_NATIVE_SRC)
79+
8080
BUILD_JDK_JTREG_LIBRARIES_LIBS_libTracePinnedThreads := jvm.lib
8181
else
8282
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
8383
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
8484
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libNativeThread := -pthread
85-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := $(LIBCXX) -pthread
86-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncInvokers := $(LIBCXX) -pthread
87-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := $(LIBCXX) -pthread
88-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := $(LIBCXX) -pthread
89-
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := $(LIBCXX) -pthread
85+
86+
# java.lang.foreign tests
87+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := -I$(TEST_LIB_NATIVE_SRC)
88+
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := -pthread
89+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncInvokers := -I$(TEST_LIB_NATIVE_SRC)
90+
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncInvokers := -pthread
91+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerUnnamed := -I$(TEST_LIB_NATIVE_SRC)
92+
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := -pthread
93+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerModule := -I$(TEST_LIB_NATIVE_SRC)
94+
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := -pthread
95+
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLoaderLookupInvoker := -I$(TEST_LIB_NATIVE_SRC)
96+
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := -pthread
97+
9098
BUILD_JDK_JTREG_LIBRARIES_LIBS_libExplicitAttach := -ljvm
9199
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libExplicitAttach := -pthread
92100
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libImplicitAttach := -pthread

src/hotspot/cpu/aarch64/aarch64.ad

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -9230,103 +9230,6 @@ instruct castVVMask(pRegGov dst)
92309230
// ============================================================================
92319231
// Atomic operation instructions
92329232
//
9233-
// Intel and SPARC both implement Ideal Node LoadPLocked and
9234-
// Store{PIL}Conditional instructions using a normal load for the
9235-
// LoadPLocked and a CAS for the Store{PIL}Conditional.
9236-
//
9237-
// The ideal code appears only to use LoadPLocked/StorePLocked as a
9238-
// pair to lock object allocations from Eden space when not using
9239-
// TLABs.
9240-
//
9241-
// There does not appear to be a Load{IL}Locked Ideal Node and the
9242-
// Ideal code appears to use Store{IL}Conditional as an alias for CAS
9243-
// and to use StoreIConditional only for 32-bit and StoreLConditional
9244-
// only for 64-bit.
9245-
//
9246-
// We implement LoadPLocked and StorePLocked instructions using,
9247-
// respectively the AArch64 hw load-exclusive and store-conditional
9248-
// instructions. Whereas we must implement each of
9249-
// Store{IL}Conditional using a CAS which employs a pair of
9250-
// instructions comprising a load-exclusive followed by a
9251-
// store-conditional.
9252-
9253-
9254-
// Locked-load (linked load) of the current heap-top
9255-
// used when updating the eden heap top
9256-
// implemented using ldaxr on AArch64
9257-
9258-
instruct loadPLocked(iRegPNoSp dst, indirect mem)
9259-
%{
9260-
match(Set dst (LoadPLocked mem));
9261-
9262-
ins_cost(VOLATILE_REF_COST);
9263-
9264-
format %{ "ldaxr $dst, $mem\t# ptr linked acquire" %}
9265-
9266-
ins_encode(aarch64_enc_ldaxr(dst, mem));
9267-
9268-
ins_pipe(pipe_serial);
9269-
%}
9270-
9271-
// Conditional-store of the updated heap-top.
9272-
// Used during allocation of the shared heap.
9273-
// Sets flag (EQ) on success.
9274-
// implemented using stlxr on AArch64.
9275-
9276-
instruct storePConditional(memory8 heap_top_ptr, iRegP oldval, iRegP newval, rFlagsReg cr)
9277-
%{
9278-
match(Set cr (StorePConditional heap_top_ptr (Binary oldval newval)));
9279-
9280-
ins_cost(VOLATILE_REF_COST);
9281-
9282-
// TODO
9283-
// do we need to do a store-conditional release or can we just use a
9284-
// plain store-conditional?
9285-
9286-
format %{
9287-
"stlxr rscratch1, $newval, $heap_top_ptr\t# ptr cond release"
9288-
"cmpw rscratch1, zr\t# EQ on successful write"
9289-
%}
9290-
9291-
ins_encode(aarch64_enc_stlxr(newval, heap_top_ptr));
9292-
9293-
ins_pipe(pipe_serial);
9294-
%}
9295-
9296-
instruct storeLConditional(indirect mem, iRegLNoSp oldval, iRegLNoSp newval, rFlagsReg cr)
9297-
%{
9298-
match(Set cr (StoreLConditional mem (Binary oldval newval)));
9299-
9300-
ins_cost(VOLATILE_REF_COST);
9301-
9302-
format %{
9303-
"cmpxchg rscratch1, $mem, $oldval, $newval, $mem\t# if $mem == $oldval then $mem <-- $newval"
9304-
"cmpw rscratch1, zr\t# EQ on successful write"
9305-
%}
9306-
9307-
ins_encode(aarch64_enc_cmpxchg_acq(mem, oldval, newval));
9308-
9309-
ins_pipe(pipe_slow);
9310-
%}
9311-
9312-
// storeIConditional also has acquire semantics, for no better reason
9313-
// than matching storeLConditional. At the time of writing this
9314-
// comment storeIConditional was not used anywhere by AArch64.
9315-
instruct storeIConditional(indirect mem, iRegINoSp oldval, iRegINoSp newval, rFlagsReg cr)
9316-
%{
9317-
match(Set cr (StoreIConditional mem (Binary oldval newval)));
9318-
9319-
ins_cost(VOLATILE_REF_COST);
9320-
9321-
format %{
9322-
"cmpxchgw rscratch1, $mem, $oldval, $newval, $mem\t# if $mem == $oldval then $mem <-- $newval"
9323-
"cmpw rscratch1, zr\t# EQ on successful write"
9324-
%}
9325-
9326-
ins_encode(aarch64_enc_cmpxchgw_acq(mem, oldval, newval));
9327-
9328-
ins_pipe(pipe_slow);
9329-
%}
93309233

93319234
// standard CompareAndSwapX when we are using barriers
93329235
// these have higher priority than the rules selected by a predicate

src/hotspot/cpu/aarch64/gc/z/zGlobals_aarch64.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,6 @@
2424
#ifndef CPU_AARCH64_GC_Z_ZGLOBALS_AARCH64_HPP
2525
#define CPU_AARCH64_GC_Z_ZGLOBALS_AARCH64_HPP
2626

27-
const size_t ZPlatformGranuleSizeShift = 21; // 2MB
2827
const size_t ZPlatformHeapViews = 3;
2928
const size_t ZPlatformCacheLineSize = 64;
3029

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,9 +849,10 @@ void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, in
849849
call_VM_base(oop_result, noreg, noreg, entry_point, number_of_arguments, check_exceptions);
850850
}
851851

852-
// Maybe emit a call via a trampoline. If the code cache is small
852+
// Maybe emit a call via a trampoline. If the code cache is small
853853
// trampolines won't be emitted.
854-
address MacroAssembler::trampoline_call1(Address entry, CodeBuffer* cbuf, bool check_emit_size) {
854+
address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf,
855+
bool check_emit_size) {
855856
assert(entry.rspec().type() == relocInfo::runtime_call_type
856857
|| entry.rspec().type() == relocInfo::opt_virtual_call_type
857858
|| entry.rspec().type() == relocInfo::static_call_type
@@ -906,7 +907,6 @@ address MacroAssembler::trampoline_call1(Address entry, CodeBuffer* cbuf, bool c
906907
return pc();
907908
}
908909

909-
910910
// Emit a trampoline stub for a call to a target which is too far away.
911911
//
912912
// code sequences:

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,8 +1175,7 @@ class MacroAssembler: public Assembler {
11751175
// - relocInfo::virtual_call_type
11761176
//
11771177
// Return: NULL if CodeCache is full.
1178-
address trampoline_call(Address entry, CodeBuffer* cbuf = NULL) { return trampoline_call1(entry, cbuf, true); }
1179-
address trampoline_call1(Address entry, CodeBuffer* cbuf, bool check_emit_size = true);
1178+
address trampoline_call(Address entry, CodeBuffer* cbuf = NULL, bool check_emit_size = true);
11801179

11811180
static bool far_branches() {
11821181
return ReservedCodeCacheSize > branch_range;

0 commit comments

Comments
 (0)