Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
haimaychao committed Oct 18, 2023
2 parents 2e264f9 + 9843c97 commit aca5841
Show file tree
Hide file tree
Showing 359 changed files with 8,455 additions and 2,940 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ on:
jobs:
build-macos:
name: build
runs-on: macos-11
runs-on: macos-13

strategy:
fail-fast: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-x64
xcode-toolset-version: '12.5.1'
xcode-toolset-version: '14.3.1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.macos-x64 == 'true'
Expand All @@ -238,7 +238,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-aarch64
xcode-toolset-version: '12.5.1'
xcode-toolset-version: '14.3.1'
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand Down Expand Up @@ -318,7 +318,7 @@ jobs:
with:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-11
runs-on: macos-13

test-windows-x64:
name: windows-x64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2023, 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 @@ -132,7 +132,7 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'
Expand Down
10 changes: 3 additions & 7 deletions make/autoconf/flags.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, 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 @@ -128,16 +128,12 @@ AC_DEFUN([FLAGS_SETUP_MACOSX_VERSION],
# The expected format for <version> is either nn.n.n or nn.nn.nn. See
# /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/AvailabilityVersions.h
# MACOSX_VERSION_MIN specifies the lowest version of Macosx that the built
# MACOSX_VERSION_MIN specifies the lowest version of macOS that the built
# binaries should be compatible with, even if compiled on a newer version
# of the OS. It currently has a hard coded value. Setting this also limits
# exposure to API changes in header files. Bumping this is likely to
# require code changes to build.
if test "x$OPENJDK_TARGET_CPU_ARCH" = xaarch64; then
MACOSX_VERSION_MIN=11.00.00
else
MACOSX_VERSION_MIN=10.12.0
fi
MACOSX_VERSION_MIN=11.00.00
MACOSX_VERSION_MIN_NODOTS=${MACOSX_VERSION_MIN//\./}
AC_SUBST(MACOSX_VERSION_MIN)
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 @@ -441,7 +441,7 @@ var getJibProfilesProfiles = function (input, common, data) {
target_cpu: "x64",
dependencies: ["devkit", "gtest", "pandoc"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=10.12.00",
"--with-macosx-version-max=11.00.00",
"--enable-compatible-cds-alignment",
// Use system SetFile instead of the one in the devkit as the
// devkit one may not work on Catalina.
Expand Down
15 changes: 15 additions & 0 deletions make/hotspot/gensrc/GensrcAdlc.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ ifeq ($(call check-jvm-feature, compiler2), true)
ADLCFLAGS += -DARM=1
endif

# Set ASSERT, NDEBUG and PRODUCT flags just like in JvmFlags.gmk
ifeq ($(DEBUG_LEVEL), release)
# release builds disable uses of assert macro from <assert.h>.
ADLCFLAGS += -DNDEBUG
# For hotspot, release builds differ internally between "optimized" and "product"
# in that "optimize" does not define PRODUCT.
ifneq ($(HOTSPOT_DEBUG_LEVEL), optimized)
ADLCFLAGS += -DPRODUCT
endif
else ifeq ($(DEBUG_LEVEL), fastdebug)
ADLCFLAGS += -DASSERT
else ifeq ($(DEBUG_LEVEL), slowdebug)
ADLCFLAGS += -DASSERT
endif

##############################################################################
# Concatenate all ad source files into a single file, which will be fed to
# adlc. Also include a #line directive at the start of every included file
Expand Down
15 changes: 1 addition & 14 deletions make/modules/java.desktop/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -919,19 +919,6 @@ endif

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

# MACOSX_METAL_VERSION_MIN specifies the lowest version of Macosx
# that should be used to compile Metal shaders. We support Metal
# pipeline only on Macosx >=10.14. For Macosx versions <10.14 even if
# we enable Metal pipeline using -Dsun.java2d.metal=true, at
# runtime we force it to use OpenGL pipeline. And MACOSX_VERSION_MIN
# for aarch64 has always been >10.14 so we use continue to use
# MACOSX_VERSION_MIN for aarch64.
ifeq ($(OPENJDK_TARGET_CPU_ARCH), xaarch64)
MACOSX_METAL_VERSION_MIN=$(MACOSX_VERSION_MIN)
else
MACOSX_METAL_VERSION_MIN=10.14.0
endif

ifeq ($(call isTargetOs, macosx), true)
SHADERS_SRC := $(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/shaders.metal
SHADERS_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/native/java.desktop/libosxui
Expand All @@ -944,7 +931,7 @@ ifeq ($(call isTargetOs, macosx), true)
OUTPUT_FILE := $(SHADERS_AIR), \
SUPPORT_DIR := $(SHADERS_SUPPORT_DIR), \
COMMAND := $(METAL) -c -std=osx-metal2.0 \
-mmacosx-version-min=$(MACOSX_METAL_VERSION_MIN) \
-mmacosx-version-min=$(MACOSX_VERSION_MIN) \
-o $(SHADERS_AIR) $(SHADERS_SRC), \
))

Expand Down
1 change: 1 addition & 0 deletions make/test/BuildMicrobenchmark.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JDK_MICROBENCHMARK, \
--add-exports java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED \
--add-exports java.base/jdk.internal.vm=ALL-UNNAMED \
--add-exports java.base/jdk.internal.event=ALL-UNNAMED \
--add-exports java.base/jdk.internal.foreign=ALL-UNNAMED \
--enable-preview \
-processor org.openjdk.jmh.generators.BenchmarkProcessor, \
JAVA_FLAGS := --add-modules jdk.unsupported --limit-modules java.management \
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/frame_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@

frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc);

frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb);
frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, bool allow_cb_null = false);
// used for fast frame construction by continuations
frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, const ImmutableOopMap* oop_map, bool on_heap);

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ inline frame::frame(intptr_t* sp, intptr_t* fp, address pc) {
init(sp, fp, pc);
}

inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb) {
inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address pc, CodeBlob* cb, bool allow_cb_null) {
assert(pauth_ptr_is_raw(pc), "cannot be signed");
intptr_t a = intptr_t(sp);
intptr_t b = intptr_t(fp);
Expand All @@ -102,7 +102,7 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address
assert(pc != nullptr, "no pc?");
_cb = cb;
_oop_map = nullptr;
assert(_cb != nullptr, "pc: " INTPTR_FORMAT, p2i(pc));
assert(_cb != nullptr || allow_cb_null, "pc: " INTPTR_FORMAT, p2i(pc));
_on_heap = false;
DEBUG_ONLY(_frame_index = -1;)

Expand Down
31 changes: 31 additions & 0 deletions src/hotspot/cpu/arm/interp_masm_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "oops/markWord.hpp"
#include "oops/method.hpp"
#include "oops/methodData.hpp"
#include "oops/resolvedFieldEntry.hpp"
#include "oops/resolvedIndyEntry.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
Expand Down Expand Up @@ -312,6 +313,36 @@ void InterpreterMacroAssembler::load_resolved_indy_entry(Register cache, Registe
add(cache, cache, index);
}

void InterpreterMacroAssembler::load_field_entry(Register cache, Register index, int bcp_offset) {
// Get index out of bytecode pointer
assert_different_registers(cache, index);

get_index_at_bcp(index, bcp_offset, cache /*as tmp*/, sizeof(u2));

// Scale the index to be the entry index * sizeof(ResolvedFieldEntry)
// sizeof(ResolvedFieldEntry) is 16 on Arm, so using shift
if (is_power_of_2(sizeof(ResolvedFieldEntry))) {
// load constant pool cache pointer
ldr(cache, Address(FP, frame::interpreter_frame_cache_offset * wordSize));
// Get address of field entries array
ldr(cache, Address(cache, in_bytes(ConstantPoolCache::field_entries_offset())));

add(cache, cache, Array<ResolvedFieldEntry>::base_offset_in_bytes());
add(cache, cache, AsmOperand(index, lsl, log2i_exact(sizeof(ResolvedFieldEntry))));
}
else {
mov(cache, sizeof(ResolvedFieldEntry));
mul(index, index, cache);
// load constant pool cache pointer
ldr(cache, Address(FP, frame::interpreter_frame_cache_offset * wordSize));

// Get address of field entries array
ldr(cache, Address(cache, in_bytes(ConstantPoolCache::field_entries_offset())));
add(cache, cache, Array<ResolvedFieldEntry>::base_offset_in_bytes());
add(cache, cache, index);
}
}

// Generate a subtype check: branch to not_subtype if sub_klass is
// not a subtype of super_klass.
// Profiling code for the subtype check failure (profile_typecheck_failed)
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/cpu/arm/interp_masm_arm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
void load_resolved_klass_at_offset(Register Rcpool, Register Rindex, Register Rklass);

void load_resolved_indy_entry(Register cache, Register index);
void load_field_entry(Register cache, Register index, int bcp_offset = 1);

void pop_ptr(Register r);
void pop_i(Register r = R0_tos);
Expand Down
Loading

0 comments on commit aca5841

Please sign in to comment.