--- a/src/hotspot/share/gc/shared/collectedHeap.cpp Mon Oct 15 11:39:10 2018 -0700
+++ b/src/hotspot/share/gc/shared/collectedHeap.cpp Mon Oct 15 11:39:38 2018 -0700
@@ -445,6 +445,15 @@
CollectedHeap::fill_with_object(start, end, zap);
}
+size_t CollectedHeap::min_dummy_object_size() const {
+ return oopDesc::header_size();
+}
+
+size_t CollectedHeap::tlab_alloc_reserve() const {
+ size_t min_size = min_dummy_object_size();
+ return min_size > (size_t)MinObjAlignment ? align_object_size(min_size) : 0;
+}
+
HeapWord* CollectedHeap::allocate_new_tlab(size_t min_size,
size_t requested_size,
size_t* actual_size) {
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp Mon Oct 15 11:39:10 2018 -0700
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp Mon Oct 15 11:39:38 2018 -0700
@@ -309,6 +309,8 @@
}
virtual void fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap);
+ virtual size_t min_dummy_object_size() const;
+ size_t tlab_alloc_reserve() const;
// Return the address "addr" aligned by "alignment_in_bytes" if such
// an address is below "end". Return NULL otherwise.
--- a/src/hotspot/share/gc/shared/plab.cpp Mon Oct 15 11:39:10 2018 -0700
+++ b/src/hotspot/share/gc/shared/plab.cpp Mon Oct 15 11:39:38 2018 -0700
@@ -27,7 +27,6 @@
#include "gc/shared/plab.inline.hpp"
#include "gc/shared/threadLocalAllocBuffer.hpp"
#include "logging/log.hpp"
-#include "oops/arrayOop.hpp"
#include "oops/oop.inline.hpp"
size_t PLAB::min_size() {
@@ -43,8 +42,7 @@
_word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL),
_end(NULL), _hard_end(NULL), _allocated(0), _wasted(0), _undo_wasted(0)
{
- // ArrayOopDesc::header_size depends on command line initialization.
- AlignmentReserve = oopDesc::header_size() > MinObjAlignment ? align_object_size(arrayOopDesc::header_size(T_INT)) : 0;
+ AlignmentReserve = Universe::heap()->tlab_alloc_reserve();
assert(min_size() > AlignmentReserve,
"Minimum PLAB size " SIZE_FORMAT " must be larger than alignment reserve " SIZE_FORMAT " "
"to be able to contain objects", min_size(), AlignmentReserve);
--- a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp Mon Oct 15 11:39:10 2018 -0700
+++ b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp Mon Oct 15 11:39:38 2018 -0700
@@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
+#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/threadLocalAllocBuffer.inline.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
@@ -461,3 +462,8 @@
_perf_max_slow_allocations ->set_value(_max_slow_allocations);
}
}
+
+size_t ThreadLocalAllocBuffer::end_reserve() {
+ size_t reserve_size = Universe::heap()->tlab_alloc_reserve();
+ return MAX2(reserve_size, (size_t)_reserve_for_allocation_prefetch);
+}
--- a/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp Mon Oct 15 11:39:10 2018 -0700
+++ b/src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp Mon Oct 15 11:39:38 2018 -0700
@@ -26,7 +26,6 @@
#define SHARE_VM_GC_SHARED_THREADLOCALALLOCBUFFER_HPP
#include "gc/shared/gcUtil.hpp"
-#include "oops/typeArrayOop.hpp"
#include "runtime/perfData.hpp"
#include "runtime/vm_version.hpp"
@@ -138,10 +137,7 @@
inline HeapWord* allocate(size_t size);
// Reserve space at the end of TLAB
- static size_t end_reserve() {
- int reserve_size = typeArrayOopDesc::header_size(T_INT);
- return MAX2(reserve_size, _reserve_for_allocation_prefetch);
- }
+ static size_t end_reserve();
static size_t alignment_reserve() { return align_object_size(end_reserve()); }
static size_t alignment_reserve_in_bytes() { return alignment_reserve() * HeapWordSize; }
--- a/src/java.base/share/classes/java/util/Locale.java Mon Oct 15 11:39:10 2018 -0700
+++ b/src/java.base/share/classes/java/util/Locale.java Mon Oct 15 11:39:38 2018 -0700
@@ -2246,22 +2246,26 @@
/**
* @serialField language String
- * language subtag in lower case. (See <a href="java/util/Locale.html#getLanguage()">getLanguage()</a>)
+ * language subtag in lower case.
+ * (See <a href="java.base/java/util/Locale.html#getLanguage()">getLanguage()</a>)
* @serialField country String
- * country subtag in upper case. (See <a href="java/util/Locale.html#getCountry()">getCountry()</a>)
+ * country subtag in upper case.
+ * (See <a href="java.base/java/util/Locale.html#getCountry()">getCountry()</a>)
* @serialField variant String
- * variant subtags separated by LOWLINE characters. (See <a href="java/util/Locale.html#getVariant()">getVariant()</a>)
+ * variant subtags separated by LOWLINE characters.
+ * (See <a href="java.base/java/util/Locale.html#getVariant()">getVariant()</a>)
* @serialField hashcode int
* deprecated, for forward compatibility only
* @serialField script String
- * script subtag in title case (See <a href="java/util/Locale.html#getScript()">getScript()</a>)
+ * script subtag in title case
+ * (See <a href="java.base/java/util/Locale.html#getScript()">getScript()</a>)
* @serialField extensions String
* canonical representation of extensions, that is,
* BCP47 extensions in alphabetical order followed by
* BCP47 private use subtags, all in lower case letters
* separated by HYPHEN-MINUS characters.
- * (See <a href="java/util/Locale.html#getExtensionKeys()">getExtensionKeys()</a>,
- * <a href="java/util/Locale.html#getExtension(char)">getExtension(char)</a>)
+ * (See <a href="java.base/java/util/Locale.html#getExtensionKeys()">getExtensionKeys()</a>,
+ * <a href="java.base/java/util/Locale.html#getExtension(char)">getExtension(char)</a>)
*/
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("language", String.class),