Skip to content

Commit

Permalink
Merge branch 'master' into bsd-port
Browse files Browse the repository at this point in the history
  • Loading branch information
battleblow committed Apr 17, 2019
2 parents ac94500 + 6037baa commit 5833cb0
Show file tree
Hide file tree
Showing 76 changed files with 1,689 additions and 261 deletions.
13 changes: 13 additions & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -537,3 +537,16 @@ b5f7bb57de2f797be34f6c75d45c3245ad37ab97 jdk-12+31
4ce47bc1fb92cf94c6e3d1f49d582f02dcb851ab jdk-12+32
b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12+33
b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12-ga
60ff8949381adea46f489f6bbecf9232a028e830 jdk-12.0.1+1
c3fc07bf408084671904abac6b1873aebf7983c7 jdk-12.0.1+2
d52a133717eef8e05abd6d12bb75d943607c517c jdk-12.0.1+3
9a91d1dc777a633330e5d99f78123e46c3b2cdf2 jdk-12.0.1+4
c9c530b917a3479a25c4b9eaca2c31a37e2e5206 jdk-12.0.1+5
0c9a2cd825dc312270eb7b043baef59a289ad9ec jdk-12.0.1+6
e4607e374223b6fc9e2883ee52ae4971c21e6757 jdk-12.0.1+7
efc36b43b3f9fbe174336f364954c85cb7a7747b jdk-12.0.1+8
edbfbc928f5d928a237d6cc384e75672759a2c6f jdk-12.0.1+9
e657e6b868841da27767e780f932f221b72e5713 jdk-12.0.1+10
8afa031910e32132bb19830b73e26e2991a7d68f jdk-12.0.1+11
e831fc6bca9e6afa6b486f07d386146e1ae0f6e1 jdk-12.0.1+12
e831fc6bca9e6afa6b486f07d386146e1ae0f6e1 jdk-12.0.1-ga
37 changes: 35 additions & 2 deletions make/Bundles.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 2019, 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 @@ -29,6 +29,7 @@ include $(SPEC)
include MakeBase.gmk

PRODUCT_TARGETS :=
LEGACY_TARGETS :=
TEST_TARGETS :=
DOCS_TARGETS :=

Expand Down Expand Up @@ -146,19 +147,25 @@ endef
# correct base directories.
ifeq ($(OPENJDK_TARGET_OS)-$(DEBUG_LEVEL), macosx-release)
JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
JDK_BUNDLE_SUBDIR :=
JRE_BUNDLE_SUBDIR :=
else
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
ifneq ($(DEBUG_LEVEL), release)
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
endif
endif

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

ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )
ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )
$(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR)))

SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
Expand Down Expand Up @@ -198,6 +205,22 @@ ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )

TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES))

ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR))

# Create special filter rules when dealing with unzipped .dSYM directories on
# macosx
ifeq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
$(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
endif
endif

JRE_BUNDLE_FILES := $(filter-out \
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
$(SYMBOLS_EXCLUDE_PATTERN), \
$(ALL_JRE_FILES))

$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
FILES := $(JDK_BUNDLE_FILES), \
Expand All @@ -208,6 +231,15 @@ ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )

PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)

$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
FILES := $(JRE_BUNDLE_FILES), \
BASE_DIRS := $(JRE_IMAGE_DIR), \
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
))

LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)

$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
Expand Down Expand Up @@ -283,6 +315,7 @@ $(eval $(call IncludeCustomExtension, Bundles.gmk))
################################################################################

product-bundles: $(PRODUCT_TARGETS)
legacy-bundles: $(LEGACY_TARGETS)
test-bundles: $(TEST_TARGETS)
docs-bundles: $(DOCS_TARGETS)
jcov-bundles: $(JCOV_TARGETS)
Expand Down
14 changes: 12 additions & 2 deletions make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,9 @@ ALL_TARGETS += test exploded-test
product-bundles:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles)

legacy-bundles:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk legacy-bundles)

test-bundles:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles)

Expand All @@ -587,7 +590,7 @@ ifeq ($(JCOV_ENABLED), true)
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk jcov-bundles)
endif

ALL_TARGETS += product-bundles test-bundles docs-bundles jcov-bundles
ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles jcov-bundles

################################################################################
# Install targets
Expand Down Expand Up @@ -909,6 +912,8 @@ else

product-bundles: product-images

legacy-bundles: legacy-images

test-bundles: test-image

docs-bundles: docs-image
Expand Down Expand Up @@ -1011,6 +1016,9 @@ mac-bundles: mac-jdk-bundle
# (and possibly other, more specific versions)
product-images: jdk-image symbols-image exploded-image

# This target builds the legacy images, e.g. the legacy JRE image
legacy-images: legacy-jre-image

# zip-security is actually a bundle, but for now it needs to be considered
# an image until this can be cleaned up properly.
product-images: zip-security
Expand All @@ -1027,6 +1035,8 @@ endif

ifeq ($(OPENJDK_TARGET_OS), macosx)
product-images: mac-jdk-bundle

legacy-images: mac-legacy-jre-bundle
endif

# This target builds the documentation image
Expand Down Expand Up @@ -1061,7 +1071,7 @@ ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
exploded-image-base exploded-image \
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
docs-javase docs-reference docs-javadoc mac-bundles product-images \
docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
docs-image test-image all-images \
all-bundles

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 @@ -898,13 +898,15 @@ else
JDK_BUNDLE_EXTENSION := tar.gz
endif
JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)

JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
TEST_DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_DEMOS_BUNDLE_NAME)
TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
Expand Down
4 changes: 2 additions & 2 deletions make/autoconf/version-numbers
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@

DEFAULT_VERSION_FEATURE=12
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_UPDATE=1
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2019-03-19
DEFAULT_VERSION_DATE=2019-04-16
DEFAULT_VERSION_CLASSFILE_MAJOR=56 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="11 12"
Expand Down
2 changes: 1 addition & 1 deletion make/data/unicodedata/UnicodeData.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11836,7 +11836,7 @@
32FC;CIRCLED KATAKANA WI;So;0;L;<circle> 30F0;;;;N;;;;;
32FD;CIRCLED KATAKANA WE;So;0;L;<circle> 30F1;;;;N;;;;;
32FE;CIRCLED KATAKANA WO;So;0;L;<circle> 30F2;;;;N;;;;;
32FF;SQUARE ERA NAME NEWERA;So;0;L;<square> 5143 53F7;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME NEWERA;;;;
32FF;SQUARE ERA NAME REIWA;So;0;L;<square> 4EE4 548C;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME REIWA;;;;
3300;SQUARE APAATO;So;0;L;<square> 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;;
3301;SQUARE ARUHUA;So;0;L;<square> 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;;
3302;SQUARE ANPEA;So;0;L;<square> 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;;
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/cpu/x86/templateTable_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,9 @@ void TemplateTable::condy_helper(Label& Done) {
__ cmpl(flags, ltos);
__ jcc(Assembler::notEqual, notLong);
// ltos
__ movptr(rax, field);
// Loading high word first because movptr clobbers rax
NOT_LP64(__ movptr(rdx, field.plus_disp(4)));
__ movptr(rax, field);
__ push(ltos);
__ jmp(Done);

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/x86/x86_32.ad
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ void MachSpillCopyNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
}

uint MachSpillCopyNode::size(PhaseRegAlloc *ra_) const {
return implementation( NULL, ra_, true, NULL );
return MachNode::size(ra_);
}


Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/classfile/classFileParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6016,9 +6016,9 @@ void ClassFileParser::parse_stream(const ClassFileStream* const stream,
_minor_version = stream->get_u2_fast();
_major_version = stream->get_u2_fast();

if (DumpSharedSpaces && _major_version < JAVA_1_5_VERSION) {
if (DumpSharedSpaces && _major_version < JAVA_6_VERSION) {
ResourceMark rm;
warning("Pre JDK 1.5 class not supported by CDS: %u.%u %s",
warning("Pre JDK 6 class not supported by CDS: %u.%u %s",
_major_version, _minor_version, _class_name->as_C_string());
Exceptions::fthrow(
THREAD_AND_LOCATION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void ShenandoahAdaptiveHeuristics::choose_collection_set_from_regiondata(Shenand
// we hit max_cset. When max_cset is hit, we terminate the cset selection. Note that in this scheme,
// ShenandoahGarbageThreshold is the soft threshold which would be ignored until min_garbage is hit.

size_t capacity = ShenandoahHeap::heap()->capacity();
size_t capacity = ShenandoahHeap::heap()->max_capacity();
size_t free_target = ShenandoahMinFreeThreshold * capacity / 100;
size_t min_garbage = free_target > actual_free ? (free_target - actual_free) : 0;
size_t max_cset = (size_t)(1.0 * ShenandoahEvacReserve * capacity / 100 / ShenandoahEvacWaste);
Expand Down Expand Up @@ -126,12 +126,12 @@ void ShenandoahAdaptiveHeuristics::record_phase_time(ShenandoahPhaseTimings::Pha

bool ShenandoahAdaptiveHeuristics::should_start_normal_gc() const {
ShenandoahHeap* heap = ShenandoahHeap::heap();
size_t capacity = heap->capacity();
size_t capacity = heap->max_capacity();
size_t available = heap->free_set()->available();

// Check if we are falling below the worst limit, time to trigger the GC, regardless of
// anything else.
size_t min_threshold = ShenandoahMinFreeThreshold * heap->capacity() / 100;
size_t min_threshold = ShenandoahMinFreeThreshold * heap->max_capacity() / 100;
if (available < min_threshold) {
log_info(gc)("Trigger: Free (" SIZE_FORMAT "M) is below minimum threshold (" SIZE_FORMAT "M)",
available / M, min_threshold / M);
Expand All @@ -141,7 +141,7 @@ bool ShenandoahAdaptiveHeuristics::should_start_normal_gc() const {
// Check if are need to learn a bit about the application
const size_t max_learn = ShenandoahLearningSteps;
if (_gc_times_learned < max_learn) {
size_t init_threshold = ShenandoahInitFreeThreshold * heap->capacity() / 100;
size_t init_threshold = ShenandoahInitFreeThreshold * heap->max_capacity() / 100;
if (available < init_threshold) {
log_info(gc)("Trigger: Learning " SIZE_FORMAT " of " SIZE_FORMAT ". Free (" SIZE_FORMAT "M) is below initial threshold (" SIZE_FORMAT "M)",
_gc_times_learned + 1, max_learn, available / M, init_threshold / M);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ bool ShenandoahCompactHeuristics::should_start_normal_gc() const {
ShenandoahHeap* heap = ShenandoahHeap::heap();

size_t available = heap->free_set()->available();
size_t threshold_bytes_allocated = heap->capacity() * ShenandoahAllocationThreshold / 100;
size_t min_threshold = ShenandoahMinFreeThreshold * heap->capacity() / 100;
size_t threshold_bytes_allocated = heap->max_capacity() * ShenandoahAllocationThreshold / 100;
size_t min_threshold = ShenandoahMinFreeThreshold * heap->max_capacity() / 100;

if (available < min_threshold) {
log_info(gc)("Trigger: Free (" SIZE_FORMAT "M) is below minimum threshold (" SIZE_FORMAT "M)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void ShenandoahPassiveHeuristics::choose_collection_set_from_regiondata(Shenando

// Do not select too large CSet that would overflow the available free space.
// Take at least the entire evacuation reserve, and be free to overflow to free space.
size_t capacity = ShenandoahHeap::heap()->capacity();
size_t capacity = ShenandoahHeap::heap()->max_capacity();
size_t available = MAX2(ShenandoahEvacReserve * capacity / 100, actual_free);
size_t max_cset = (size_t)(available / ShenandoahEvacWaste);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ShenandoahStaticHeuristics::~ShenandoahStaticHeuristics() {}
bool ShenandoahStaticHeuristics::should_start_normal_gc() const {
ShenandoahHeap* heap = ShenandoahHeap::heap();

size_t capacity = heap->capacity();
size_t capacity = heap->max_capacity();
size_t available = heap->free_set()->available();
size_t threshold_available = (capacity * ShenandoahFreeThreshold) / 100;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void ShenandoahTraversalHeuristics::choose_collection_set(ShenandoahCollectionSe
// The significant complication is that liveness data was collected at the previous cycle, and only
// for those regions that were allocated before previous cycle started.

size_t capacity = heap->capacity();
size_t capacity = heap->max_capacity();
size_t actual_free = heap->free_set()->available();
size_t free_target = ShenandoahMinFreeThreshold * capacity / 100;
size_t min_garbage = free_target > actual_free ? (free_target - actual_free) : 0;
Expand Down Expand Up @@ -216,12 +216,12 @@ bool ShenandoahTraversalHeuristics::should_start_traversal_gc() {
ShenandoahHeap* heap = ShenandoahHeap::heap();
assert(!heap->has_forwarded_objects(), "no forwarded objects here");

size_t capacity = heap->capacity();
size_t capacity = heap->max_capacity();
size_t available = heap->free_set()->available();

// Check if we are falling below the worst limit, time to trigger the GC, regardless of
// anything else.
size_t min_threshold = ShenandoahMinFreeThreshold * heap->capacity() / 100;
size_t min_threshold = ShenandoahMinFreeThreshold * heap->max_capacity() / 100;
if (available < min_threshold) {
log_info(gc)("Trigger: Free (" SIZE_FORMAT "M) is below minimum threshold (" SIZE_FORMAT "M)",
available / M, min_threshold / M);
Expand All @@ -231,7 +231,7 @@ bool ShenandoahTraversalHeuristics::should_start_traversal_gc() {
// Check if are need to learn a bit about the application
const size_t max_learn = ShenandoahLearningSteps;
if (_gc_times_learned < max_learn) {
size_t init_threshold = ShenandoahInitFreeThreshold * heap->capacity() / 100;
size_t init_threshold = ShenandoahInitFreeThreshold * heap->max_capacity() / 100;
if (available < init_threshold) {
log_info(gc)("Trigger: Learning " SIZE_FORMAT " of " SIZE_FORMAT ". Free (" SIZE_FORMAT "M) is below initial threshold (" SIZE_FORMAT "M)",
_gc_times_learned + 1, max_learn, available / M, init_threshold / M);
Expand Down
5 changes: 5 additions & 0 deletions src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ void ShenandoahArguments::initialize() {
FLAG_SET_DEFAULT(ShenandoahUncommit, false);
}

if ((InitialHeapSize == MaxHeapSize) && ShenandoahUncommit) {
log_info(gc)("Min heap equals to max heap, disabling ShenandoahUncommit");
FLAG_SET_DEFAULT(ShenandoahUncommit, false);
}

// If class unloading is disabled, no unloading for concurrent cycles as well.
// If class unloading is enabled, users should opt-in for unloading during
// concurrent cycles.
Expand Down
8 changes: 5 additions & 3 deletions src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,11 @@ void ShenandoahControlThread::service_stw_degenerated_cycle(GCCause::Cause cause
void ShenandoahControlThread::service_uncommit(double shrink_before) {
ShenandoahHeap* heap = ShenandoahHeap::heap();

// Scan through the heap and determine if there is work to do. This avoids taking
// heap lock if there is no work available, avoids spamming logs with superfluous
// logging messages, and minimises the amount of work while locks are taken.
// Determine if there is work to do. This avoids taking heap lock if there is
// no work available, avoids spamming logs with superfluous logging messages,
// and minimises the amount of work while locks are taken.

if (heap->committed() <= heap->min_capacity()) return;

bool has_work = false;
for (size_t i = 0; i < heap->num_regions(); i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ void ShenandoahFreeSet::rebuild() {
}

// Evac reserve: reserve trailing space for evacuations
size_t to_reserve = ShenandoahEvacReserve * _heap->capacity() / 100;
size_t to_reserve = ShenandoahEvacReserve * _heap->max_capacity() / 100;
size_t reserved = 0;

for (size_t idx = _heap->num_regions() - 1; idx > 0; idx--) {
Expand Down
Loading

0 comments on commit 5833cb0

Please sign in to comment.