merge master

This commit is contained in:
Noah 2021-03-24 00:24:14 +08:00
parent e77ae562da
commit a659a94af5
26 changed files with 8373 additions and 65 deletions

View File

@ -0,0 +1,116 @@
From c0bd92ca26dc2979f8be2f0a0477b1a945fe84ea Mon Sep 17 00:00:00 2001
Date: Mon, 8 Feb 2021 09:47:28 +0800
Subject: 8140597: Postpone the initial mark request until the
current mixed GC phase has finished.
DTS/AR: DTS202102030LAZOBP1G00
Summary: <g1>: <Postpone the initial mark request until the current mixed GC phase has finished.>
LLT: jtreg
Patch Type: backport
Bug url: https://dts-szv.clouddragon.huawei.com/DTSPortal/ticket/DTS202102030LAZOBP1G00
---
.../gc_implementation/g1/g1CollectedHeap.cpp | 1 -
.../g1/g1CollectorPolicy.cpp | 37 +++++++------------
.../g1/g1CollectorPolicy.hpp | 2 +
3 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
index 722e59857..47d8000a0 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
@@ -2564,7 +2564,6 @@ void G1CollectedHeap::collect(GCCause::Cause cause) {
return;
} else {
if (cause == GCCause::_gc_locker || cause == GCCause::_wb_young_gc
- || cause == GCCause::_g1_periodic_collection
DEBUG_ONLY(|| cause == GCCause::_scavenge_alot)) {
// Schedule a standard evacuation pause. We're setting word_size
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
index 05a270d26..ebf2619f9 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
@@ -921,8 +921,12 @@ void G1CollectorPolicy::record_concurrent_pause() {
}
}
+bool G1CollectorPolicy::about_to_start_mixed_phase() const {
+ return _g1->concurrent_mark()->cmThread()->during_cycle() || _last_young_gc;
+}
+
bool G1CollectorPolicy::need_to_start_conc_mark(const char* source, size_t alloc_word_size) {
- if (_g1->concurrent_mark()->cmThread()->during_cycle()) {
+ if (about_to_start_mixed_phase()) {
return false;
}
@@ -1068,16 +1072,10 @@ void G1CollectorPolicy::record_collection_pause_end(double pause_time_ms, Evacua
if (_last_young_gc) {
// This is supposed to to be the "last young GC" before we start
// doing mixed GCs. Here we decide whether to start mixed GCs or not.
-
- if (!last_pause_included_initial_mark) {
- if (next_gc_should_be_mixed("start mixed GCs",
+ assert(!last_pause_included_initial_mark, "The last young GC is not allowed to be an initial mark GC");
+ if (next_gc_should_be_mixed("start mixed GCs",
"do not start mixed GCs")) {
- set_gcs_are_young(false);
- }
- } else {
- ergo_verbose0(ErgoMixedGCs,
- "do not start mixed GCs",
- ergo_format_reason("concurrent cycle is about to start"));
+ set_gcs_are_young(false);
}
_last_young_gc = false;
}
@@ -1488,6 +1486,9 @@ void G1CollectorPolicy::update_survivors_policy(GCTracer &tracer) {
bool G1CollectorPolicy::force_initial_mark_if_outside_cycle(
GCCause::Cause gc_cause) {
+ // We actually check whether we are marking here and not if we are in a
+ // reclamation phase. This means that we will schedule a concurrent mark
+ // even while we are still in the process of reclaiming memory.
bool during_cycle = _g1->concurrent_mark()->cmThread()->during_cycle();
if (!during_cycle) {
ergo_verbose1(ErgoConcCycles,
@@ -1523,20 +1524,10 @@ G1CollectorPolicy::decide_on_conc_mark_initiation() {
// gone over the initiating threshold and we should start a
// concurrent marking cycle. So we might initiate one.
- bool during_cycle = _g1->concurrent_mark()->cmThread()->during_cycle();
- if (!during_cycle) {
- // The concurrent marking thread is not "during a cycle", i.e.,
- // it has completed the last one. So we can go ahead and
- // initiate a new cycle.
-
+ if (!about_to_start_mixed_phase() && gcs_are_young()) {
+ // Initiate a new initial mark only if there is no marking or reclamation going
+ // on.
set_during_initial_mark_pause();
- // We do not allow mixed GCs during marking.
- if (!gcs_are_young()) {
- set_gcs_are_young(true);
- ergo_verbose0(ErgoMixedGCs,
- "end mixed GCs",
- ergo_format_reason("concurrent cycle is about to start"));
- }
// And we can now clear initiate_conc_mark_if_possible() as
// we've already acted on it.
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
index 1c9180704..6438e5e90 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
@@ -706,6 +706,8 @@ public:
bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
+ bool about_to_start_mixed_phase() const;
+
// Record the start and end of an evacuation pause.
void record_collection_pause_start(double start_time_sec, GCTracer &tracer);
void record_collection_pause_end(double pause_time_ms, EvacuationInfo& evacuation_info);
--
2.19.0

View File

@ -82,8 +82,8 @@ diff --git a/hotspot/src/share/vm/opto/macro.cpp b/hotspot/src/share/vm/opto/mac
index 3c13f973f..628ee6656 100644
--- a/hotspot/src/share/vm/opto/macro.cpp
+++ b/hotspot/src/share/vm/opto/macro.cpp
@@ -1381,14 +1381,23 @@ void PhaseMacroExpand::expand_allocate_common(
@@ -1402,11 +1402,20 @@ void PhaseMacroExpand::expand_allocate_common(
// If initialization is performed by an array copy, any required
// MemBarStoreStore was already added. If the object does not
- // escape no need for a MemBarStoreStore. Otherwise we need a
@ -102,14 +102,11 @@ index 3c13f973f..628ee6656 100644
+ // implementation: CMS and G1 will not scan newly created object,
+ // so it's safe to skip storestore barrier when allocation does
+ // not escape.
#ifndef AARCH64
if (init == NULL || (!init->is_complete_with_arraycopy() && !init->does_not_escape())) {
#else
if (!alloc->does_not_escape_thread() &&
+ !alloc->is_allocation_MemBar_redundant() &&
(init == NULL || !init->is_complete_with_arraycopy())) {
#endif
if (init == NULL || init->req() < InitializeNode::RawStores) {
if ( AARCH64_ONLY ( !alloc->does_not_escape_thread() &&
+ !alloc->is_allocation_MemBar_redundant() &&
(init == NULL ||
!init->is_complete_with_arraycopy()) )
NOT_AARCH64 ( init == NULL ||
diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp
index 2d6daa159..da0c6dd68 100644
--- a/hotspot/src/share/vm/opto/parse1.cpp

444
8160369.patch Normal file
View File

@ -0,0 +1,444 @@
From be5a699028cd0b8fd49eb2df0c4b3d1653eca4f3 Mon Sep 17 00:00:00 2001
Date: Mon, 25 Jan 2021 17:22:52 +0800
Subject: Backport of JDK-8160369
Summary:<GC>:[Backport of JDK-8160369 and it's subtasks] Memory fences needed around setting and reading object lengths
LLT:
bug url: https://bugs.openjdk.java.net/browse/JDK-8160369
---
.../g1/g1BlockOffsetTable.cpp | 2 +-
.../g1/g1BlockOffsetTable.inline.hpp | 4 +-
.../vm/gc_implementation/g1/g1RemSet.cpp | 101 +++++++++----
.../vm/gc_implementation/g1/heapRegion.cpp | 140 ++++++++++--------
.../vm/gc_implementation/g1/heapRegion.hpp | 2 +
.../gc_implementation/g1/heapRegionType.hpp | 3 +
.../parNew/parNewGeneration.cpp | 21 ++-
7 files changed, 173 insertions(+), 100 deletions(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp
index ead98e24a..1977fc83d 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp
@@ -264,7 +264,7 @@ G1BlockOffsetArray::forward_to_block_containing_addr_slow(HeapWord* q,
while (n <= next_boundary) {
q = n;
oop obj = oop(q);
- if (obj->klass_or_null() == NULL) return q;
+ if (obj->klass_or_null_acquire() == NULL) return q;
n += block_size(q);
}
assert(q <= next_boundary && n > next_boundary, "Consequence of loop");
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp
index bcfd52a4a..ffc56a0ba 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp
@@ -166,7 +166,7 @@ forward_to_block_containing_addr_const(HeapWord* q, HeapWord* n,
while (n <= addr) {
q = n;
oop obj = oop(q);
- if (obj->klass_or_null() == NULL) return q;
+ if (obj->klass_or_null_acquire() == NULL) return q;
n += block_size(q);
}
assert(q <= n, "wrong order for q and addr");
@@ -177,7 +177,7 @@ forward_to_block_containing_addr_const(HeapWord* q, HeapWord* n,
inline HeapWord*
G1BlockOffsetArray::forward_to_block_containing_addr(HeapWord* q,
const void* addr) {
- if (oop(q)->klass_or_null() == NULL) return q;
+ if (oop(q)->klass_or_null_acquire() == NULL) return q;
HeapWord* n = q + block_size(q);
// In the normal case, where the query "addr" is a card boundary, and the
// offset table chunks are the same size as cards, the block starting at
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp
index 4cad9234c..b062947c8 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RemSet.cpp
@@ -460,18 +460,26 @@ bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i,
// And find the region containing it.
HeapRegion* r = _g1->heap_region_containing(start);
- // Why do we have to check here whether a card is on a young region,
- // given that we dirty young regions and, as a result, the
- // post-barrier is supposed to filter them out and never to enqueue
- // them? When we allocate a new region as the "allocation region" we
- // actually dirty its cards after we release the lock, since card
- // dirtying while holding the lock was a performance bottleneck. So,
- // as a result, it is possible for other threads to actually
- // allocate objects in the region (after the acquire the lock)
- // before all the cards on the region are dirtied. This is unlikely,
- // and it doesn't happen often, but it can happen. So, the extra
- // check below filters out those cards.
- if (r->is_young()) {
+ // This check is needed for some uncommon cases where we should
+ // ignore the card.
+ //
+ // The region could be young. Cards for young regions are
+ // distinctly marked (set to g1_young_gen), so the post-barrier will
+ // filter them out. However, that marking is performed
+ // concurrently. A write to a young object could occur before the
+ // card has been marked young, slipping past the filter.
+ //
+ // The card could be stale, because the region has been freed since
+ // the card was recorded. In this case the region type could be
+ // anything. If (still) free or (reallocated) young, just ignore
+ // it. If (reallocated) old or humongous, the later card trimming
+ // and additional checks in iteration may detect staleness. At
+ // worst, we end up processing a stale card unnecessarily.
+ //
+ // In the normal (non-stale) case, the synchronization between the
+ // enqueueing of the card and processing it here will have ensured
+ // we see the up-to-date region type here.
+ if (!r->is_old_or_humongous()) {
return false;
}
@@ -503,26 +511,69 @@ bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i,
assert(!check_for_refs_into_cset, "sanity");
assert(!SafepointSynchronize::is_at_safepoint(), "sanity");
+ const jbyte* orig_card_ptr = card_ptr;
card_ptr = hot_card_cache->insert(card_ptr);
if (card_ptr == NULL) {
// There was no eviction. Nothing to do.
return false;
- }
-
- start = _ct_bs->addr_for(card_ptr);
- r = _g1->heap_region_containing(start);
+ } else if (card_ptr != orig_card_ptr) {
+ // Original card was inserted and an old card was evicted.
+ start = _ct_bs->addr_for(card_ptr);
+ r = _g1->heap_region_containing(start);
+
+ // Check whether the region formerly in the cache should be
+ // ignored, as discussed earlier for the original card. The
+ // region could have been freed while in the cache. The cset is
+ // not relevant here, since we're in concurrent phase.
+ if (!r->is_old_or_humongous()) {
+ return false;
+ }
+ } // Else we still have the original card.
+ }
- // Checking whether the region we got back from the cache
- // is young here is inappropriate. The region could have been
- // freed, reallocated and tagged as young while in the cache.
- // Hence we could see its young type change at any time.
+ // Trim the region designated by the card to what's been allocated
+ // in the region. The card could be stale, or the card could cover
+ // (part of) an object at the end of the allocated space and extend
+ // beyond the end of allocation.
+ HeapWord* scan_limit;
+ if (_g1->is_gc_active()) {
+ // If we're in a STW GC, then a card might be in a GC alloc region
+ // and extend onto a GC LAB, which may not be parsable. Stop such
+ // at the "scan_top" of the region.
+ scan_limit = r->scan_top();
+ } else {
+ // Non-humongous objects are only allocated in the old-gen during
+ // GC, so if region is old then top is stable. Humongous object
+ // allocation sets top last; if top has not yet been set, this is
+ // a stale card and we'll end up with an empty intersection. If
+ // this is not a stale card, the synchronization between the
+ // enqueuing of the card and processing it here will have ensured
+ // we see the up-to-date top here.
+ scan_limit = r->top();
+ }
+ if (scan_limit <= start) {
+ // If the trimmed region is empty, the card must be stale.
+ return false;
}
+ // Okay to clean and process the card now. There are still some
+ // stale card cases that may be detected by iteration and dealt with
+ // as iteration failure.
+ *const_cast<volatile jbyte*>(card_ptr) = CardTableModRefBS::clean_card_val();
+
+ // This fence serves two purposes. First, the card must be cleaned
+ // before processing the contents. Second, we can't proceed with
+ // processing until after the read of top, for synchronization with
+ // possibly concurrent humongous object allocation. It's okay that
+ // reading top and reading type were racy wrto each other. We need
+ // both set, in any order, to proceed.
+ OrderAccess::fence();
+
// Don't use addr_for(card_ptr + 1) which can ask for
- // a card beyond the heap. This is not safe without a perm
- // gen at the upper end of the heap.
- HeapWord* end = start + CardTableModRefBS::card_size_in_words;
- MemRegion dirtyRegion(start, end);
+ // a card beyond the heap.
+ HeapWord* end = start + CardTableModRefBS::card_size_in_words;
+ MemRegion dirty_region(start, MIN2(scan_limit, end));
+ assert(!dirty_region.is_empty(), "sanity");
#if CARD_REPEAT_HISTO
init_ct_freq_table(_g1->max_capacity());
@@ -570,7 +621,7 @@ bool G1RemSet::refine_card(jbyte* card_ptr, uint worker_i,
// allocation in this region and making it safe to check the young type.
bool card_processed =
- r->oops_on_card_seq_iterate_careful(dirtyRegion,
+ r->oops_on_card_seq_iterate_careful(dirty_region,
&filter_then_update_rs_oop_cl,
card_ptr);
diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
index 794911ef6..7c48501f3 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
@@ -375,6 +375,50 @@ void HeapRegion::note_self_forwarding_removal_end(bool during_initial_mark,
_prev_marked_bytes = marked_bytes;
}
+// Humongous objects are allocated directly in the old-gen. Need
+// special handling for concurrent processing encountering an
+// in-progress allocation.
+static bool do_oops_on_card_in_humongous(MemRegion mr,
+ FilterOutOfRegionClosure* cl,
+ HeapRegion* hr,
+ G1CollectedHeap* g1h) {
+ assert(hr->isHumongous(), "precondition");
+ HeapRegion* sr = hr->humongous_start_region();
+ oop obj = oop(sr->bottom());
+
+ // If concurrent and klass_or_null is NULL, then space has been
+ // allocated but the object has not yet been published by setting
+ // the klass. That can only happen if the card is stale. However,
+ // we've already set the card clean, so we must return failure,
+ // since the allocating thread could have performed a write to the
+ // card that might be missed otherwise.
+ if (!g1h->is_gc_active() && (obj->klass_or_null_acquire() == NULL)) {
+ return false;
+ }
+
+ // We have a well-formed humongous object at the start of sr.
+ // Only filler objects follow a humongous object in the containing
+ // regions, and we can ignore those. So only process the one
+ // humongous object.
+ if (!g1h->is_obj_dead(obj, sr)) {
+ if (obj->is_objArray() || (sr->bottom() < mr.start())) {
+ // objArrays are always marked precisely, so limit processing
+ // with mr. Non-objArrays might be precisely marked, and since
+ // it's humongous it's worthwhile avoiding full processing.
+ // However, the card could be stale and only cover filler
+ // objects. That should be rare, so not worth checking for;
+ // instead let it fall out from the bounded iteration.
+ obj->oop_iterate(cl, mr);
+ } else {
+ // If obj is not an objArray and mr contains the start of the
+ // obj, then this could be an imprecise mark, and we need to
+ // process the entire object.
+ obj->oop_iterate(cl);
+ }
+ }
+ return true;
+}
+
HeapWord*
HeapRegion::object_iterate_mem_careful(MemRegion mr,
ObjectClosure* cl) {
@@ -399,9 +443,6 @@ HeapRegion::object_iterate_mem_careful(MemRegion mr,
} else if (!g1h->is_obj_dead(obj)) {
cl->do_object(obj);
}
- if (cl->abort()) return cur;
- // The check above must occur before the operation below, since an
- // abort might invalidate the "size" operation.
cur += block_size(cur);
}
return NULL;
@@ -411,30 +452,14 @@ bool HeapRegion::oops_on_card_seq_iterate_careful(MemRegion mr,
FilterOutOfRegionClosure* cl,
jbyte* card_ptr) {
assert(card_ptr != NULL, "pre-condition");
+ assert(MemRegion(bottom(), end()).contains(mr), "Card region not in heap region");
G1CollectedHeap* g1h = G1CollectedHeap::heap();
- // If we're within a stop-world GC, then we might look at a card in a
- // GC alloc region that extends onto a GC LAB, which may not be
- // parseable. Stop such at the "scan_top" of the region.
- if (g1h->is_gc_active()) {
- mr = mr.intersection(MemRegion(bottom(), scan_top()));
- } else {
- mr = mr.intersection(used_region());
- }
- if (mr.is_empty()) {
- return true;
- }
- // Otherwise, find the obj that extends onto mr.start().
-
- // The intersection of the incoming mr (for the card) and the
- // allocated part of the region is non-empty. This implies that
- // we have actually allocated into this region. The code in
- // G1CollectedHeap.cpp that allocates a new region sets the
- // is_young tag on the region before allocating. Thus we
- // safely know if this region is young.
- if (is_young()) {
- return true;
+ // Special handling for humongous regions.
+ if (isHumongous()) {
+ return do_oops_on_card_in_humongous(mr, cl, this, g1h);
}
+ assert(is_old(), "precondition");
// We can only clean the card here, after we make the decision that
// the card is not young.
@@ -446,50 +471,37 @@ bool HeapRegion::oops_on_card_seq_iterate_careful(MemRegion mr,
HeapWord* const start = mr.start();
HeapWord* const end = mr.end();
- // Update BOT as needed while finding start of (potential) object.
+ // Find the obj that extends onto mr.start().
+ // Update BOT as needed while finding start of (possibly dead)
+ // object containing the start of the region.
HeapWord* cur = block_start(start);
- assert(cur <= start, "Postcondition");
-
- oop obj;
-
- HeapWord* next = cur;
- do {
- cur = next;
- obj = oop(cur);
- if (obj->klass_or_null() == NULL) {
- // Ran into an unparseable point.
- assert(!g1h->is_gc_active(),
- err_msg("Unparsable heap during GC at " PTR_FORMAT, p2i(cur)));
- return false;
- }
- // Otherwise...
- next = cur + block_size(cur);
- } while (next <= start);
-
- // If we finish the above loop...We have a parseable object that
- // begins on or before the start of the memory region, and ends
- // inside or spans the entire region.
- assert(cur <= start, "Loop postcondition");
- assert(obj->klass_or_null() != NULL, "Loop postcondition");
+#ifdef ASSERT
+ {
+ assert(cur <= start,
+ err_msg("cur: " PTR_FORMAT ", start: " PTR_FORMAT, p2i(cur), p2i(start)));
+ HeapWord* next = cur + block_size(cur);
+ assert(start < next,
+ err_msg("start: " PTR_FORMAT ", next: " PTR_FORMAT, p2i(start), p2i(next)));
+ }
+#endif
do {
- obj = oop(cur);
- assert((cur + block_size(cur)) > (HeapWord*)obj, "Loop invariant");
- if (obj->klass_or_null() == NULL) {
- // Ran into an unparseable point.
- assert(!g1h->is_gc_active(),
- err_msg("Unparsable heap during GC at " PTR_FORMAT, p2i(cur)));
- return false;
- }
-
- // Advance the current pointer. "obj" still points to the object to iterate.
- cur = cur + block_size(cur);
+ oop obj = oop(cur);
+ assert(obj->is_oop(true), err_msg("Not an oop at " PTR_FORMAT, p2i(obj)));
+ assert(obj->klass_or_null() != NULL,
+ err_msg("Unparsable heap at " PTR_FORMAT, p2i(obj)));
+
+ if (g1h->is_obj_dead(obj, this)) {
+ // Carefully step over dead object.
+ cur += block_size(cur);
+ } else {
+ // Step over live object, and process its references.
+ cur += obj->size();
+ // Non-objArrays are usually marked imprecise at the object
+ // start, in which case we need to iterate over them in full.
+ // objArrays are precisely marked, but can still be iterated
+ // over in full if completely covered.
- if (!g1h->is_obj_dead(obj)) {
- // Non-objArrays are sometimes marked imprecise at the object start. We
- // always need to iterate over them in full.
- // We only iterate over object arrays in full if they are completely contained
- // in the memory region.
if (!obj->is_objArray() || (((HeapWord*)obj) >= start && cur <= end)) {
obj->oop_iterate(cl);
} else {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp
index 52ef1d0d2..8a45b3915 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.hpp
@@ -422,6 +422,8 @@ class HeapRegion: public G1OffsetTableContigSpace {
bool is_old() const { return _type.is_old(); }
+ bool is_old_or_humongous() const { return _type.is_old_or_humongous(); }
+
// For a humongous region, region in which it starts.
HeapRegion* humongous_start_region() const {
return _humongous_start_region;
diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionType.hpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionType.hpp
index a9a4fbc25..007dabf19 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionType.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionType.hpp
@@ -111,6 +111,9 @@ public:
bool is_old() const { return get() == OldTag; }
+ bool is_old_or_humongous() const { return (get() & (OldTag | HumMask)) != 0; }
+
+
// Setters
void set_free() { set(FreeTag); }
diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
index f05b4f177..9481dba10 100644
--- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
@@ -1551,22 +1551,25 @@ bool ParNewGeneration::take_from_overflow_list_work(ParScanThreadState* par_scan
return false;
}
assert(prefix != NULL && prefix != BUSY, "Error");
- size_t i = 1;
oop cur = prefix;
- while (i < objsFromOverflow && cur->klass_or_null() != NULL) {
- i++; cur = cur->list_ptr_from_klass();
+ for (size_t i = 1; i < objsFromOverflow; ++i) {
+ oop next = cur->list_ptr_from_klass();
+ if (next == NULL) break;
+ cur = next;
}
+ assert(cur != NULL, "Loop postcondition");
// Reattach remaining (suffix) to overflow list
- if (cur->klass_or_null() == NULL) {
+ oop suffix = cur->list_ptr_from_klass();
+ if (suffix == NULL) {
// Write back the NULL in lieu of the BUSY we wrote
// above and it is still the same value.
if (_overflow_list == BUSY) {
(void) Atomic::cmpxchg_ptr(NULL, &_overflow_list, BUSY);
}
} else {
- assert(cur->klass_or_null() != (Klass*)(address)BUSY, "Error");
- oop suffix = cur->list_ptr_from_klass(); // suffix will be put back on global list
+ assert(suffix != BUSY, "Error");
+ // suffix will be put back on global list
cur->set_klass_to_list_ptr(NULL); // break off suffix
// It's possible that the list is still in the empty(busy) state
// we left it in a short while ago; in that case we may be
@@ -1586,8 +1589,10 @@ bool ParNewGeneration::take_from_overflow_list_work(ParScanThreadState* par_scan
// Too bad, someone else got in in between; we'll need to do a splice.
// Find the last item of suffix list
oop last = suffix;
- while (last->klass_or_null() != NULL) {
- last = last->list_ptr_from_klass();
+ while (true) {
+ oop next = last->list_ptr_from_klass();
+ if (next == NULL) break;
+ last = next;
}
// Atomically prepend suffix to current overflow list
observed_overflow_list = _overflow_list;
--
2.19.0

View File

@ -0,0 +1,32 @@
From 9b140509c32b5878c1abdc16ec0edfd3e9f2f600 Mon Sep 17 00:00:00 2001
Date: Fri, 29 Jan 2021 09:34:07 +0800
Subject: 8168996: backport of C2 crash at postaloc.cpp:140 :
assert(false) failed: unexpected yanked node
DTS/AR: DTS2021012903VX2SP0H00
Summary: <C2>: Prevent MemBarAcquire from keeping a LoadNNode alive by adding it to the worklist if it is the only user of a DecodeNNode.
LLT: NA
Patch Type: backport
Bug url: https://bugs.openjdk.java.net/browse/JDK-8168996
---
hotspot/src/share/vm/opto/node.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hotspot/src/share/vm/opto/node.cpp b/hotspot/src/share/vm/opto/node.cpp
index 60b390c09..a0d9acca4 100644
--- a/hotspot/src/share/vm/opto/node.cpp
+++ b/hotspot/src/share/vm/opto/node.cpp
@@ -1168,8 +1168,8 @@ bool Node::has_special_unique_user() const {
if( this->is_Store() ) {
// Condition for back-to-back stores folding.
return n->Opcode() == op && n->in(MemNode::Memory) == this;
- } else if (this->is_Load()) {
- // Condition for removing an unused LoadNode from the MemBarAcquire precedence input
+ } else if (this->is_Load() || this->is_DecodeN()) {
+ // Condition for removing an unused LoadNode or DecodeNNode from the MemBarAcquire precedence input
return n->Opcode() == Op_MemBarAcquire;
} else if( op == Op_AddL ) {
// Condition for convL2I(addL(x,y)) ==> addI(convL2I(x),convL2I(y))
--
2.19.0

View File

@ -774,14 +774,46 @@ diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm
index c8223b2eb..0f1376b49 100644
--- a/hotspot/src/share/vm/utilities/taskqueue.hpp
+++ b/hotspot/src/share/vm/utilities/taskqueue.hpp
@@ -620,8 +632,8 @@ public:
@@ -503,6 +503,8 @@ protected:
public:
// Returns "true" if some TaskQueue in the set contains a task.
virtual bool peek() = 0;
+ // Tasks in queue
+ virtual uint tasks() const = 0;
virtual size_t tasks() = 0;
};
@@ -540,6 +542,7 @@ public:
bool steal(uint queue_num, int* seed, E& t);
bool peek();
+ uint tasks() const;
size_t tasks();
uint size() const { return _n; }
@@ -609,6 +612,15 @@ size_t GenericTaskQueueSet<T, F>::tasks() {
return n;
}
+template<class T, MEMFLAGS F>
+uint GenericTaskQueueSet<T, F>::tasks() const {
+ uint n = 0;
+ for (uint j = 0; j < _n; j++) {
+ n += _queues[j]->size();
+ }
+ return n;
+}
+
// When to terminate from the termination protocol.
class TerminatorTerminator: public CHeapObj<mtInternal> {
public:
@@ -620,7 +632,7 @@ public:
#undef TRACESPINNING
-class ParallelTaskTerminator: public StackObj {
-private:
+class ParallelTaskTerminator: public CHeapObj<mtGC> {
+protected:
protected:
int _n_threads;
TaskQueueSetSuper* _queue_set;
@@ -656,7 +668,7 @@ public:

View File

@ -20,6 +20,7 @@ Bug url: https://bugs.openjdk.java.net/browse/JDK-8205921
.../parallelScavenge/psCompactionManager.hpp | 12 +-
.../parallelScavenge/psPromotionManager.hpp | 4 +-
.../parallelScavenge/psTasks.cpp | 3 +-
.../shenandoah/shenandoahConcurrentMark.cpp | 3 +-
hotspot/src/share/vm/utilities/taskqueue.cpp | 18 ---
hotspot/src/share/vm/utilities/taskqueue.hpp | 105 ++++++++++++++----
16 files changed, 113 insertions(+), 92 deletions(-)
@ -388,6 +389,27 @@ index f829e9344..4fe869fd6 100644
TASKQUEUE_STATS_ONLY(pm->record_steal(p));
pm->process_popped_location_depth(p);
pm->drain_stacks_depth(true);
diff --git a/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.cpp
index 85bbea6cd..afcb0dd4a 100644
--- a/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shenandoah/shenandoahConcurrentMark.cpp
@@ -939,7 +939,6 @@ void ShenandoahConcurrentMark::mark_loop_prework(uint w, ShenandoahTaskTerminato
template <class T, bool CANCELLABLE>
void ShenandoahConcurrentMark::mark_loop_work(T* cl, ShenandoahLiveData* live_data, uint worker_id, ShenandoahTaskTerminator *terminator) {
- int seed = 17;
uintx stride = ShenandoahMarkLoopStride;
ShenandoahHeap* heap = ShenandoahHeap::heap();
@@ -999,7 +998,7 @@ void ShenandoahConcurrentMark::mark_loop_work(T* cl, ShenandoahLiveData* live_da
uint work = 0;
for (uint i = 0; i < stride; i++) {
if (q->pop(t) ||
- queues->steal(worker_id, &seed, t)) {
+ queues->steal(worker_id, t)) {
do_task<T>(q, cl, live_data, &t);
work++;
} else {
diff --git a/hotspot/src/share/vm/utilities/taskqueue.cpp b/hotspot/src/share/vm/utilities/taskqueue.cpp
index 0f4dcc90b..37f4066ab 100644
--- a/hotspot/src/share/vm/utilities/taskqueue.cpp
@ -493,10 +515,10 @@ index 0f1376b49..77556a7d4 100644
public:
// Returns "true" if some TaskQueue in the set contains a task.
virtual bool peek() = 0;
@@ -517,27 +557,23 @@ private:
@@ -520,27 +560,23 @@ private:
public:
typedef typename T::element_type E;
- GenericTaskQueueSet(int n) : _n(n) {
+ GenericTaskQueueSet(uint n) : _n(n) {
typedef T* GenericTaskQueuePtr;
@ -506,14 +528,14 @@ index 0f1376b49..77556a7d4 100644
_queues[i] = NULL;
}
}
- bool steal_best_of_2(uint queue_num, int* seed, E& t);
+ bool steal_best_of_2(uint queue_num, E& t);
void register_queue(uint i, T* q);
T* queue(uint n);
- // The thread with queue number "queue_num" (and whose random number seed is
- // at "seed") is trying to steal a task from some other queue. (It may try
- // several queues, according to some configuration parameter.) If some steal
@ -525,8 +547,8 @@ index 0f1376b49..77556a7d4 100644
+ // Returns if stealing succeeds, and sets "t" to the stolen task.
+ bool steal(uint queue_num, E& t);
bool peek();
};
uint tasks() const;
size_t tasks();
@@ -560,9 +596,9 @@ GenericTaskQueueSet<T, F>::queue(uint i) {
}

View File

@ -0,0 +1,84 @@
From 7419e8c4fd5b858c43378cffc55b45845f845191 Mon Sep 17 00:00:00 2001
Date: Mon, 8 Mar 2021 09:28:45 +0800
Subject: 8214418: half-closed SSLEngine status may cause
application dead loop
DTS/AR: DTS20210308033J8XP0F00
Summary: <javax>: half-closed SSLEngine status may cause application dead loop
LLT: NA
Patch Type: backport
Bug url: https://hg.openjdk.java.net/jdk-updates/jdk11u-dev/rev/6852be0de227
---
.../classes/sun/security/ssl/Ciphertext.java | 2 --
.../classes/sun/security/ssl/SSLEngineImpl.java | 15 ++++++++++++++-
.../sun/security/ssl/TransportContext.java | 8 +-------
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/jdk/src/share/classes/sun/security/ssl/Ciphertext.java b/jdk/src/share/classes/sun/security/ssl/Ciphertext.java
index 842db23af..5f95102b4 100644
--- a/jdk/src/share/classes/sun/security/ssl/Ciphertext.java
+++ b/jdk/src/share/classes/sun/security/ssl/Ciphertext.java
@@ -31,8 +31,6 @@ import javax.net.ssl.SSLEngineResult.HandshakeStatus;
* Ciphertext
*/
final class Ciphertext {
- static final Ciphertext CIPHERTEXT_NULL = new Ciphertext();
-
final byte contentType;
final byte handshakeType;
final long recordSN;
diff --git a/jdk/src/share/classes/sun/security/ssl/SSLEngineImpl.java b/jdk/src/share/classes/sun/security/ssl/SSLEngineImpl.java
index 7906e5181..ef64c7b4e 100644
--- a/jdk/src/share/classes/sun/security/ssl/SSLEngineImpl.java
+++ b/jdk/src/share/classes/sun/security/ssl/SSLEngineImpl.java
@@ -227,6 +227,19 @@ final class SSLEngineImpl extends SSLEngine implements SSLTransport {
hsStatus = ciphertext.handshakeStatus;
} else {
hsStatus = getHandshakeStatus();
+ if (ciphertext == null && !conContext.isNegotiated &&
+ conContext.isInboundClosed() &&
+ hsStatus == HandshakeStatus.NEED_WRAP) {
+ // Even the outboud is open, no futher data could be wrapped as:
+ // 1. the outbound is empty
+ // 2. no negotiated connection
+ // 3. the inbound has closed, cannot complete the handshake
+ //
+ // Mark the engine as closed if the handshake status is
+ // NEED_WRAP. Otherwise, it could lead to dead loops in
+ // applications.
+ status = Status.CLOSED;
+ }
}
int deltaSrcs = srcsRemains;
@@ -258,7 +271,7 @@ final class SSLEngineImpl extends SSLEngine implements SSLTransport {
}
if (ciphertext == null) {
- return Ciphertext.CIPHERTEXT_NULL;
+ return null;
}
// Is the handshake completed?
diff --git a/jdk/src/share/classes/sun/security/ssl/TransportContext.java b/jdk/src/share/classes/sun/security/ssl/TransportContext.java
index e9ffb3802..77a3c3bd5 100644
--- a/jdk/src/share/classes/sun/security/ssl/TransportContext.java
+++ b/jdk/src/share/classes/sun/security/ssl/TransportContext.java
@@ -576,13 +576,7 @@ class TransportContext implements ConnectionContext {
} else if (!isOutboundClosed()) {
// Special case that the inbound was closed, but outbound open.
return HandshakeStatus.NEED_WRAP;
- }
- } else if (isOutboundClosed() && !isInboundClosed()) {
- // Special case that the outbound was closed, but inbound open.
- return HandshakeStatus.NEED_UNWRAP;
- } else if (!isOutboundClosed() && isInboundClosed()) {
- // Special case that the inbound was closed, but outbound open.
- return HandshakeStatus.NEED_WRAP;
+ } // Otherwise, both inbound and outbound are closed.
}
return HandshakeStatus.NOT_HANDSHAKING;
--
2.19.0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
From b271a27e0a3742705b1515976ad63ffa791a6a79 Mon Sep 17 00:00:00 2001
Date: Fri, 18 Dec 2020 11:18:19 +0800
Subject: 8231841: debug.cpp help() is missing an AArch64 line
for pns
DTS/AR: AR.SR.IREQ02373832.002.001
Summary: < hotspot> : debug.cpp help() is missing an AArch64 line for pns
LLT: NA
Patch Type: backport
Bug url: https://bugs.openjdk.java.net/browse/JDK-8231841
---
hotspot/src/share/vm/utilities/debug.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/hotspot/src/share/vm/utilities/debug.cpp b/hotspot/src/share/vm/utilities/debug.cpp
index 4f7cbddcd..7ba3a4c83 100644
--- a/hotspot/src/share/vm/utilities/debug.cpp
+++ b/hotspot/src/share/vm/utilities/debug.cpp
@@ -687,6 +687,7 @@ void help() {
tty->print_cr(" pns(void* sp, void* fp, void* pc) - print native (i.e. mixed) stack trace. E.g.");
tty->print_cr(" pns($sp, $rbp, $pc) on Linux/amd64 and Solaris/amd64 or");
tty->print_cr(" pns($sp, $ebp, $pc) on Linux/x86 or");
+ tty->print_cr(" pns($sp, $fp, $pc) on Linux/AArch64 or");
tty->print_cr(" pns($sp, 0, $pc) on Linux/ppc64 or");
tty->print_cr(" pns($sp + 0x7ff, 0, $pc) on Solaris/SPARC");
tty->print_cr(" - in gdb do 'set overload-resolution off' before calling pns()");
--
2.19.0

View File

@ -0,0 +1,92 @@
From 4deae815b41e9dd02eb49bae3148f774c346e8a5 Mon Sep 17 00:00:00 2001
Date: Mon, 25 Jan 2021 15:48:35 +0800
Subject: 8254078: DataOutputStream is very slow post-disabling
of Biased Locking
DTS/AR: DTS202101180520BWP1D00
Summary: <JDK> : DataOutputStream is very slow post-disabling of Biased Locking
LLT: jtreg
Patch Type: backport
Bug url: https://bugs.openjdk.java.net/browse/JDK-8254078
---
.../classes/java/io/DataInputStream.java | 7 +++---
.../classes/java/io/DataOutputStream.java | 24 ++++++++++++-------
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/jdk/src/share/classes/java/io/DataInputStream.java b/jdk/src/share/classes/java/io/DataInputStream.java
index 7b24b74de..9516d0a7d 100644
--- a/jdk/src/share/classes/java/io/DataInputStream.java
+++ b/jdk/src/share/classes/java/io/DataInputStream.java
@@ -31,9 +31,10 @@ package java.io;
* way. An application uses a data output stream to write data that
* can later be read by a data input stream.
* <p>
- * DataInputStream is not necessarily safe for multithreaded access.
- * Thread safety is optional and is the responsibility of users of
- * methods in this class.
+ * A DataInputStream is not safe for use by multiple concurrent
+ * threads. If a DataInputStream is to be used by more than one
+ * thread then access to the data input stream should be controlled
+ * by appropriate synchronization.
*
* @author Arthur van Hoff
* @see java.io.DataOutputStream
diff --git a/jdk/src/share/classes/java/io/DataOutputStream.java b/jdk/src/share/classes/java/io/DataOutputStream.java
index 99fafed84..7628fb916 100644
--- a/jdk/src/share/classes/java/io/DataOutputStream.java
+++ b/jdk/src/share/classes/java/io/DataOutputStream.java
@@ -29,6 +29,11 @@ package java.io;
* A data output stream lets an application write primitive Java data
* types to an output stream in a portable way. An application can
* then use a data input stream to read the data back in.
+ * <p>
+ * A DataOutputStream is not safe for use by multiple concurrent
+ * threads. If a DataOutputStream is to be used by more than one
+ * thread then access to the data output stream should be controlled
+ * by appropriate synchronization.
*
* @author unascribed
* @see java.io.DataInputStream
@@ -164,8 +169,9 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* @see java.io.FilterOutputStream#out
*/
public final void writeShort(int v) throws IOException {
- out.write((v >>> 8) & 0xFF);
- out.write((v >>> 0) & 0xFF);
+ writeBuffer[0] = (byte)(v >>> 8);
+ writeBuffer[1] = (byte)(v >>> 0);
+ out.write(writeBuffer, 0, 2);
incCount(2);
}
@@ -179,8 +185,9 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* @see java.io.FilterOutputStream#out
*/
public final void writeChar(int v) throws IOException {
- out.write((v >>> 8) & 0xFF);
- out.write((v >>> 0) & 0xFF);
+ writeBuffer[0] = (byte)(v >>> 8);
+ writeBuffer[1] = (byte)(v >>> 0);
+ out.write(writeBuffer, 0, 2);
incCount(2);
}
@@ -194,10 +201,11 @@ class DataOutputStream extends FilterOutputStream implements DataOutput {
* @see java.io.FilterOutputStream#out
*/
public final void writeInt(int v) throws IOException {
- out.write((v >>> 24) & 0xFF);
- out.write((v >>> 16) & 0xFF);
- out.write((v >>> 8) & 0xFF);
- out.write((v >>> 0) & 0xFF);
+ writeBuffer[0] = (byte)(v >>> 24);
+ writeBuffer[1] = (byte)(v >>> 16);
+ writeBuffer[2] = (byte)(v >>> 8);
+ writeBuffer[3] = (byte)(v >>> 0);
+ out.write(writeBuffer, 0, 4);
incCount(4);
}
--
2.19.0

View File

@ -0,0 +1,95 @@
From c30e6789e2406ef5085978458c1342505f0eeb0b Mon Sep 17 00:00:00 2001
Date: Thu, 11 Mar 2021 14:34:12 +0800
Subject: 8259886: Improve SSL session cache performance and
scalability
DTS/AR: DTS202103110E0APCP0H00
Summary: <javax.net.ssl>: Improve SSL session cache performance and scalability
LLT: NA
Patch Type: backport
Bug url: https://bugs.openjdk.java.net/browse/JDK-8259886
---
.../classes/sun/security/util/Cache.java | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/jdk/src/share/classes/sun/security/util/Cache.java b/jdk/src/share/classes/sun/security/util/Cache.java
index 7a2e6f394..1ba64a2c7 100644
--- a/jdk/src/share/classes/sun/security/util/Cache.java
+++ b/jdk/src/share/classes/sun/security/util/Cache.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2021, 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
@@ -252,6 +252,7 @@ class MemoryCache<K,V> extends Cache<K,V> {
private final Map<K, CacheEntry<K,V>> cacheMap;
private int maxSize;
private long lifetime;
+ private long nextExpirationTime = Long.MAX_VALUE;
// ReferenceQueue is of type V instead of Cache<K,V>
// to allow SoftCacheEntry to extend SoftReference<V>
@@ -321,12 +322,18 @@ class MemoryCache<K,V> extends Cache<K,V> {
}
int cnt = 0;
long time = System.currentTimeMillis();
+ if (nextExpirationTime > time) {
+ return;
+ }
+ nextExpirationTime = Long.MAX_VALUE;
for (Iterator<CacheEntry<K,V>> t = cacheMap.values().iterator();
t.hasNext(); ) {
CacheEntry<K,V> entry = t.next();
if (entry.isValid(time) == false) {
t.remove();
cnt++;
+ } else if (nextExpirationTime > entry.getExpirationTime()) {
+ nextExpirationTime = entry.getExpirationTime();
}
}
if (DEBUG) {
@@ -360,6 +367,9 @@ class MemoryCache<K,V> extends Cache<K,V> {
emptyQueue();
long expirationTime = (lifetime == 0) ? 0 :
System.currentTimeMillis() + lifetime;
+ if (expirationTime < nextExpirationTime) {
+ nextExpirationTime = expirationTime;
+ }
CacheEntry<K,V> newEntry = newEntry(key, value, expirationTime, queue);
CacheEntry<K,V> oldEntry = cacheMap.put(key, newEntry);
if (oldEntry != null) {
@@ -474,6 +484,7 @@ class MemoryCache<K,V> extends Cache<K,V> {
V getValue();
+ long getExpirationTime();
}
private static class HardCacheEntry<K,V> implements CacheEntry<K,V> {
@@ -496,6 +507,10 @@ class MemoryCache<K,V> extends Cache<K,V> {
return value;
}
+ public long getExpirationTime() {
+ return expirationTime;
+ }
+
public boolean isValid(long currentTime) {
boolean valid = (currentTime <= expirationTime);
if (valid == false) {
@@ -533,6 +548,10 @@ class MemoryCache<K,V> extends Cache<K,V> {
return get();
}
+ public long getExpirationTime() {
+ return expirationTime;
+ }
+
public boolean isValid(long currentTime) {
boolean valid = (currentTime <= expirationTime) && (get() != null);
if (valid == false) {
--
2.19.0

121
C1-typos-repair.patch Executable file
View File

@ -0,0 +1,121 @@
From 693b5eed765417ab055a19cbd5fd392cb052b06f Mon Sep 17 00:00:00 2001
Date: Sat, 27 Feb 2021 17:06:24 +0800
Subject: C1 typos repair
DTS/AR: DTS202102240GWU4QP1O00
Summary: <hotspot>: <C1 typos repair>
LLT: NA
Patch Type: huawei
Bug url: NA
---
.../src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp | 6 +++---
.../src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp | 3 +--
hotspot/src/share/vm/c1/c1_GraphBuilder.cpp | 7 +++----
hotspot/src/share/vm/c1/c1_LIR.hpp | 12 ++++++------
hotspot/src/share/vm/c1/c1_LIRGenerator.hpp | 1 -
5 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
index 2df587d96..60b67494c 100644
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
@@ -1004,7 +1004,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
if (UseCompressedOops && !wide) {
__ ldrw(dest->as_register(), as_Address(from_addr));
} else {
- __ ldr(dest->as_register(), as_Address(from_addr));
+ __ ldr(dest->as_register(), as_Address(from_addr));
}
break;
case T_METADATA:
@@ -1020,9 +1020,9 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
// address that matches klass_offset_in_bytes() will be loaded
// as a word, not a long.
if (UseCompressedClassPointers && addr->disp() == oopDesc::klass_offset_in_bytes()) {
- __ ldrw(dest->as_register(), as_Address(from_addr));
+ __ ldrw(dest->as_register(), as_Address(from_addr));
} else {
- __ ldr(dest->as_register(), as_Address(from_addr));
+ __ ldr(dest->as_register(), as_Address(from_addr));
}
break;
case T_INT:
diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
index cee0730d9..6d0b4acbd 100644
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRGenerator_aarch64.cpp
@@ -965,7 +965,6 @@ void LIRGenerator::do_update_CRC32(Intrinsic* x) {
assert(UseCRC32Intrinsics, "why are we here?");
// Make all state_for calls early since they can emit code
LIR_Opr result = rlock_result(x);
- int flags = 0;
switch (x->id()) {
case vmIntrinsics::_updateCRC32: {
LIRItem crc(x->argument_at(0), this);
@@ -992,7 +991,7 @@ void LIRGenerator::do_update_CRC32(Intrinsic* x) {
int offset = is_updateBytes ? arrayOopDesc::base_offset_in_bytes(T_BYTE) : 0;
if(off.result()->is_constant()) {
index = LIR_OprFact::illegalOpr;
- offset += off.result()->as_jint();
+ offset += off.result()->as_jint();
}
LIR_Opr base_op = buf.result();
diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
index 174e59436..459315cb7 100644
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
@@ -3243,10 +3243,9 @@ GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope)
// Compiles where the root method is an intrinsic need a special
// compilation environment because the bytecodes for the method
// shouldn't be parsed during the compilation, only the special
- // Intrinsic node should be emitted. If this isn't done the the
- // code for the inlined version will be different than the root
- // compiled version which could lead to monotonicity problems on
- // intel.
+ // Intrinsic node should be emitted. If this isn't done the code
+ // for the inlined version will be different than the root compiled
+ // version which could lead to monotonicity problems on intel.
// Set up a stream so that appending instructions works properly.
ciBytecodeStream s(scope->method());
diff --git a/hotspot/src/share/vm/c1/c1_LIR.hpp b/hotspot/src/share/vm/c1/c1_LIR.hpp
index 37232b9ba..cde709684 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp
@@ -200,14 +200,14 @@ class LIR_Const: public LIR_OprPtr {
class LIR_OprDesc: public CompilationResourceObj {
public:
// value structure:
- // data opr-type opr-kind
- // +--------------+-------+-------+
- // [max...........|7 6 5 4|3 2 1 0]
- // ^
- // is_pointer bit
+ // data opr-type opr-kind
+ // +-----------+----------+-------+
+ // [max........|6 5 4 3|2 1 0]
+ // ^
+ // is_pointer bit
//
// lowest bit cleared, means it is a structure pointer
- // we need 4 bits to represent types
+ // we need 4 bits to represent types
private:
friend class LIR_OprFact;
diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
index 0ae48924a..24d072b36 100644
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
@@ -611,7 +611,6 @@ class LIRItem: public CompilationResourceObj {
} else {
return _result;
}
- return _result;
}
void set_result(LIR_Opr opr);
--
2.19.0

View File

@ -3,9 +3,9 @@ index 1e9b1cb91..c0fd37d05 100644
--- a/hotspot/src/cpu/aarch64/vm/assembler_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/assembler_aarch64.hpp
@@ -2061,6 +2061,14 @@ public:
ld_st(Vt, T, a, op1, op2); \
ld_st(Vt, T, a, op1, op2); \
}
+ void ld1_d(FloatRegister Vt, int index, const Address &a) {
+ starti;
+ assert(index == 0 || index == 1, "Index must be 0 or 1 for Vx.2D");
@ -164,16 +164,16 @@ diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp b/hotspot/src
index 388177589..1abc7e3b0 100644
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
@@ -1173,6 +1181,9 @@ public:
@@ -1180,6 +1180,9 @@ public:
Register table0, Register table1, Register table2, Register table3,
bool upper = false);
+ void f2j_ddot(Register n, Register dx, Register incx,
+ Register dy, Register incy, Register temp_reg);
+
void string_compare(Register str1, Register str2,
Register cnt1, Register cnt2, Register result,
Register tmp1);
Register cnt1, Register cnt2, Register result,
Register tmp1);
@@ -1236,6 +1239,11 @@ private:
// Uses rscratch2 if the address is not directly reachable
Address spill_address(int size, int offset, Register tmp=rscratch2);
@ -190,6 +190,14 @@ diff --git a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp b/hotspot/src/
index 0d73c0c0c..337d5c1dd 100644
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
@@ -45,6 +45,7 @@
#include "stubRoutines_aarch64.hpp"
+
#ifdef COMPILER2
#include "opto/runtime.hpp"
#endif
@@ -3220,6 +3221,39 @@ class StubGenerator: public StubCodeGenerator {
return start;
}

View File

@ -3,13 +3,13 @@ index 84f0a4ac..b38ee52e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCCause.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/gc_interface/GCCause.java
@@ -54,6 +54,7 @@ public enum GCCause {
_g1_inc_collection_pause ("G1 Evacuation Pause"),
_g1_humongous_allocation ("G1 Humongous Allocation"),
+ _g1_periodic_gc ("G1 Periodic GC"),
_last_ditch_collection ("Last ditch collection"),
_last_gc_cause ("ILLEGAL VALUE - last gc cause - ILLEGAL VALUE");
_shenandoah_allocation_failure_evac ("Allocation Failure During Evacuation"),
_shenandoah_stop_vm ("Stopping VM"),
diff --git a/hotspot/make/bsd/makefiles/mapfile-vers-debug b/hotspot/make/bsd/makefiles/mapfile-vers-debug
index 49a70edc..00651d42 100644
--- a/hotspot/make/bsd/makefiles/mapfile-vers-debug
@ -1669,25 +1669,38 @@ index bdac7cb0..283df9bf 100644
@@ -100,6 +100,9 @@ const char* GCCause::to_string(GCCause::Cause cause) {
case _g1_humongous_allocation:
return "G1 Humongous Allocation";
+ case _g1_periodic_collection:
+ return "G1 Periodic Collection";
+
case _last_ditch_collection:
return "Last ditch collection";
case _shenandoah_allocation_failure_evac:
return "Allocation Failure During Evacuation";
diff --git a/hotspot/src/share/vm/gc_interface/gcCause.hpp b/hotspot/src/share/vm/gc_interface/gcCause.hpp
index 29408d77..5be14548 100644
--- a/hotspot/src/share/vm/gc_interface/gcCause.hpp
+++ b/hotspot/src/share/vm/gc_interface/gcCause.hpp
@@ -72,6 +72,7 @@ class GCCause : public AllStatic {
_g1_inc_collection_pause,
_g1_humongous_allocation,
+ _g1_periodic_collection,
_last_ditch_collection,
_last_gc_cause
_shenandoah_stop_vm,
_shenandoah_metadata_gc_clear_softrefs,
diff --git a/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp b/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp
index 0f8727fe..8bbcbda4 100644
--- a/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp
+++ b/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp
@@ -98,7 +98,7 @@ private:
static GlobalTLABStats* global_stats() { return _global_stats; }
public:
- ThreadLocalAllocBuffer() : _allocation_fraction(TLABAllocationWeight), _allocated_before_last_gc(0), _initialized(false) {
+ ThreadLocalAllocBuffer() : _allocation_fraction(TLABAllocationWeight), _allocated_before_last_gc(0), _initialized(false), _gclab(false) {
// do nothing. tlabs must be inited by initialize() calls
}
diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
index de01fefd..e149ca64 100644
--- a/hotspot/src/share/vm/prims/jvm.cpp
@ -1759,16 +1772,16 @@ diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runt
index 3db27350..7374eee5 100644
--- a/hotspot/src/share/vm/runtime/thread.cpp
+++ b/hotspot/src/share/vm/runtime/thread.cpp
@@ -98,6 +98,7 @@
#if INCLUDE_ALL_GCS
@@ -99,6 +99,7 @@
#include "gc_implementation/shenandoah/shenandoahControlThread.hpp"
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
#include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
+#include "gc_implementation/g1/g1CollectedHeap.hpp"
#include "gc_implementation/parallelScavenge/pcTasks.hpp"
#endif // INCLUDE_ALL_GCS
#ifdef COMPILER1
@@ -3605,6 +3619,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
ConcurrentMarkSweepThread::makeSurrogateLockerThread(THREAD);
@@ -3677,6 +3678,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
ShenandoahControlThread::makeSurrogateLockerThread(THREAD);
} else {
ConcurrentMarkThread::makeSurrogateLockerThread(THREAD);
+ G1CollectedHeap::heap()->init_periodic_gc_thread();

View File

@ -0,0 +1,51 @@
From 79a2de08f6a6aa5113e730bd9bc58229f7a2da14 Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 16:21:34 +0800
Subject: Remove unused GenericTaskQueueSet<T, F>::tasks()
Summary: <gc>: remove unused GenericTaskQueueSet<T, F>::tasks()
LLT: NA
Bug url: NA
---
hotspot/src/share/vm/utilities/taskqueue.hpp | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp
index 77556a7d4..3df7744dc 100644
--- a/hotspot/src/share/vm/utilities/taskqueue.hpp
+++ b/hotspot/src/share/vm/utilities/taskqueue.hpp
@@ -543,8 +543,6 @@ class TaskQueueSetSuper {
public:
// Returns "true" if some TaskQueue in the set contains a task.
virtual bool peek() = 0;
- // Tasks in queue
- virtual uint tasks() const = 0;
virtual size_t tasks() = 0;
};
@@ -578,7 +576,6 @@ public:
// Returns if stealing succeeds, and sets "t" to the stolen task.
bool steal(uint queue_num, E& t);
bool peek();
- uint tasks() const;
size_t tasks();
uint size() const { return _n; }
@@ -677,15 +674,6 @@ size_t GenericTaskQueueSet<T, F>::tasks() {
return n;
}
-template<class T, MEMFLAGS F>
-uint GenericTaskQueueSet<T, F>::tasks() const {
- uint n = 0;
- for (uint j = 0; j < _n; j++) {
- n += _queues[j]->size();
- }
- return n;
-}
-
// When to terminate from the termination protocol.
class TerminatorTerminator: public CHeapObj<mtInternal> {
public:
--
2.19.0

133
Use-Mutex-when-G1Uncommit.patch Executable file
View File

@ -0,0 +1,133 @@
From 120ea606bc94b68e8a8d7d8c2cfc41bf472b5742 Mon Sep 17 00:00:00 2001
Date: Mon, 8 Feb 2021 10:32:10 +0800
Subject: Use Mutex when G1Uncommit
DTS/AR: DTS2021021804F2O5P0H00
Summary: <g1>: <Use Mutex when G1Uncommit>
LLT: jtreg
Patch Type: huawei
Bug url: https://dts-szv.clouddragon.huawei.com/DTSPortal/ticket/DTS2021021804F2O5P0H00
---
.../g1/g1PageBasedVirtualSpace.cpp | 8 +++----
.../g1/g1RegionToSpaceMapper.cpp | 22 +++++++++++++------
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
index 1a22af82a..075217d60 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1PageBasedVirtualSpace.cpp
@@ -211,12 +211,12 @@ bool G1PageBasedVirtualSpace::commit(size_t start_page, size_t size_in_pages) {
// Check for dirty pages and update zero_filled if any found.
if (_dirty.get_next_one_offset(start_page, end_page) < end_page) {
zero_filled = false;
- _dirty.clear_range(start_page, end_page);
+ _dirty.par_clear_range(start_page, end_page, BitMap::unknown_range);
}
} else {
commit_internal(start_page, end_page);
}
- _committed.set_range(start_page, end_page);
+ _committed.par_set_range(start_page, end_page, BitMap::unknown_range);
if (AlwaysPreTouch) {
pretouch_internal(start_page, end_page);
@@ -239,12 +239,12 @@ void G1PageBasedVirtualSpace::uncommit(size_t start_page, size_t size_in_pages)
if (_special) {
// Mark that memory is dirty. If committed again the memory might
// need to be cleared explicitly.
- _dirty.set_range(start_page, end_page);
+ _dirty.par_set_range(start_page, end_page, BitMap::unknown_range);
} else {
uncommit_internal(start_page, end_page);
}
- _committed.clear_range(start_page, end_page);
+ _committed.par_clear_range(start_page, end_page, BitMap::unknown_range);
}
bool G1PageBasedVirtualSpace::contains(const void* p) const {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
index 51b2bd8ad..f07c27107 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
@@ -26,6 +26,8 @@
#include "gc_implementation/g1/g1BiasedArray.hpp"
#include "gc_implementation/g1/g1RegionToSpaceMapper.hpp"
#include "memory/allocation.inline.hpp"
+#include "runtime/mutex.hpp"
+#include "runtime/mutexLocker.hpp"
#include "runtime/virtualspace.hpp"
#include "services/memTracker.hpp"
#include "utilities/bitMap.inline.hpp"
@@ -68,13 +70,13 @@ class G1RegionsLargerThanCommitSizeMapper : public G1RegionToSpaceMapper {
virtual void commit_regions(uint start_idx, size_t num_regions) {
bool zero_filled = _storage.commit((size_t)start_idx * _pages_per_region, num_regions * _pages_per_region);
- _commit_map.set_range(start_idx, start_idx + num_regions);
+ _commit_map.par_set_range(start_idx, start_idx + num_regions, BitMap::unknown_range);
fire_on_commit(start_idx, num_regions, zero_filled);
}
virtual void uncommit_regions(uint start_idx, size_t num_regions) {
_storage.uncommit((size_t)start_idx * _pages_per_region, num_regions * _pages_per_region);
- _commit_map.clear_range(start_idx, start_idx + num_regions);
+ _commit_map.par_clear_range(start_idx, start_idx + num_regions, BitMap::unknown_range);
}
};
@@ -89,7 +91,7 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper {
};
size_t _regions_per_page;
-
+ Mutex _par_lock;
CommitRefcountArray _refcounts;
uintptr_t region_idx_to_page_idx(uint region) const {
@@ -104,6 +106,7 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper {
size_t commit_factor,
MemoryType type) :
G1RegionToSpaceMapper(rs, actual_size, page_size, alloc_granularity, type),
+ _par_lock(Mutex::leaf, "G1RegionsSmallerThanCommitSizeMapper par lock"),
_regions_per_page((page_size * commit_factor) / alloc_granularity), _refcounts() {
guarantee((page_size * commit_factor) >= alloc_granularity, "allocation granularity smaller than commit granularity");
@@ -113,13 +116,15 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper {
virtual void commit_regions(uint start_idx, size_t num_regions) {
for (uint i = start_idx; i < start_idx + num_regions; i++) {
+ MutexLockerEx x(&_par_lock);
assert(!_commit_map.at(i), err_msg("Trying to commit storage at region %u that is already committed", i));
size_t idx = region_idx_to_page_idx(i);
- uint new_refcount = Atomic::add(1, (volatile jint*)_refcounts.get_address_by_index(idx));
+ uint old_refcount = _refcounts.get_by_index(idx);
bool zero_filled = false;
- if (new_refcount == 1) {
+ if (old_refcount == 0) {
zero_filled = _storage.commit(idx, 1);
}
+ _refcounts.set_by_index(idx, old_refcount + 1);
_commit_map.set_bit(i);
fire_on_commit(i, 1, zero_filled);
}
@@ -127,12 +132,15 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper {
virtual void uncommit_regions(uint start_idx, size_t num_regions) {
for (uint i = start_idx; i < start_idx + num_regions; i++) {
+ MutexLockerEx x(&_par_lock);
assert(_commit_map.at(i), err_msg("Trying to uncommit storage at region %u that is not committed", i));
size_t idx = region_idx_to_page_idx(i);
- uint new_refcount = Atomic::add(-1, (volatile jint*)_refcounts.get_address_by_index(idx));
- if (new_refcount == 0) {
+ uint old_refcount = _refcounts.get_by_index(idx);
+ assert(old_refcount > 0, "must be");
+ if (old_refcount == 1) {
_storage.uncommit(idx, 1);
}
+ _refcounts.set_by_index(idx, old_refcount - 1);
_commit_map.clear_bit(i);
}
}
--
2.19.0

View File

@ -0,0 +1,110 @@
From bdff9eab4eb0bc16ebdbe908cc6237e0a70d53e6 Mon Sep 17 00:00:00 2001
Date: Sat, 26 Dec 2020 11:22:37 +0800
Subject: Use atomic operation when G1Uncommit
DTS/AR: DTS2021012207P2X7P0E00
Summary: <g1>: <Use atomic operation when G1Uncommit>
LLT: jtreg
Patch Type: huawei
Bug url: https://dts-szv.clouddragon.huawei.com/DTSPortal/ticket/DTS2021012207P2X7P0E00
---
.../vm/gc_implementation/g1/g1BiasedArray.hpp | 5 ++++
.../g1/g1RegionToSpaceMapper.cpp | 11 ++++-----
.../vm/gc_implementation/g1/heapRegion.cpp | 24 +++++++++++++++++++
3 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
index 88a673574..e13c3fe8d 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1BiasedArray.hpp
@@ -109,6 +109,11 @@ public:
return this->base()[index];
}
+ T* get_address_by_index(idx_t index) const {
+ verify_index(index);
+ return this->base() + index;
+ }
+
// Set the element of the given array at the given index to the
// given value. Assume the index is valid. This is a convenience
// method that does sanity checking on the index.
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
index 0c26b783e..51b2bd8ad 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1RegionToSpaceMapper.cpp
@@ -115,12 +115,11 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper {
for (uint i = start_idx; i < start_idx + num_regions; i++) {
assert(!_commit_map.at(i), err_msg("Trying to commit storage at region %u that is already committed", i));
size_t idx = region_idx_to_page_idx(i);
- uint old_refcount = _refcounts.get_by_index(idx);
+ uint new_refcount = Atomic::add(1, (volatile jint*)_refcounts.get_address_by_index(idx));
bool zero_filled = false;
- if (old_refcount == 0) {
+ if (new_refcount == 1) {
zero_filled = _storage.commit(idx, 1);
}
- _refcounts.set_by_index(idx, old_refcount + 1);
_commit_map.set_bit(i);
fire_on_commit(i, 1, zero_filled);
}
@@ -130,12 +129,10 @@ class G1RegionsSmallerThanCommitSizeMapper : public G1RegionToSpaceMapper {
for (uint i = start_idx; i < start_idx + num_regions; i++) {
assert(_commit_map.at(i), err_msg("Trying to uncommit storage at region %u that is not committed", i));
size_t idx = region_idx_to_page_idx(i);
- uint old_refcount = _refcounts.get_by_index(idx);
- assert(old_refcount > 0, "must be");
- if (old_refcount == 1) {
+ uint new_refcount = Atomic::add(-1, (volatile jint*)_refcounts.get_address_by_index(idx));
+ if (new_refcount == 0) {
_storage.uncommit(idx, 1);
}
- _refcounts.set_by_index(idx, old_refcount - 1);
_commit_map.clear_bit(i);
}
}
diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
index 32f8b1985..987d2c138 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp
@@ -322,6 +322,29 @@ HeapRegion::HeapRegion(uint hrm_index,
}
void HeapRegion::initialize(MemRegion mr, bool clear_space, bool mangle_space) {
+ _humongous_start_region = NULL;
+ _in_collection_set = false;
+ _next_in_special_set = NULL;
+ _orig_end = NULL;
+ _claimed = InitialClaimValue;
+ _evacuation_failed = false;
+ _prev_marked_bytes = 0;
+ _next_marked_bytes = 0;
+ _gc_efficiency = 0.0;
+ _next_young_region = NULL;
+ _next_dirty_cards_region = NULL;
+ _next = NULL;
+ _prev = NULL;
+#ifdef ASSERT
+ _containing_set = NULL;
+#endif // ASSERT
+ _in_uncommit_list = false;
+ _young_index_in_cset = -1;
+ _surv_rate_group = NULL;
+ _age_index = -1;
+ _recorded_rs_length = 0;
+ _predicted_elapsed_time_ms = 0;
+ _predicted_bytes_to_copy = 0;
assert(_rem_set->is_empty(), "Remembered set must be empty");
G1OffsetTableContigSpace::initialize(mr, clear_space, mangle_space);
@@ -1161,6 +1184,7 @@ G1OffsetTableContigSpace(G1BlockOffsetSharedArray* sharedOffsetArray,
void G1OffsetTableContigSpace::initialize(MemRegion mr, bool clear_space, bool mangle_space) {
CompactibleSpace::initialize(mr, clear_space, mangle_space);
+ _gc_time_stamp = 0;
_top = bottom();
_scan_top = bottom();
set_saved_mark_word(NULL);
--
2.19.0

View File

@ -0,0 +1,261 @@
From 00a5f242451e72d32e29156bb132ceb4b78cf719 Mon Sep 17 00:00:00 2001
Date: Tue, 26 Jan 2021 16:46:28 +0800
Subject: delete untrustworthy cacert files
Summary: <JDK> : delete untrustworthy cacert files
LLT: jtreg -nr -va jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
Bug url: NA
---
jdk/make/data/cacerts/addtrustexternalca | 32 ------------------
jdk/make/data/cacerts/addtrustqualifiedca | 32 ------------------
jdk/make/data/cacerts/thawtepremiumserverca | 27 ---------------
jdk/make/data/cacerts/utnuserfirstobjectca | 33 -------------------
jdk/make/data/cacerts/verisigntsaca | 24 --------------
.../security/lib/cacerts/VerifyCACerts.java | 25 +++-----------
6 files changed, 5 insertions(+), 168 deletions(-)
delete mode 100644 jdk/make/data/cacerts/addtrustexternalca
delete mode 100644 jdk/make/data/cacerts/addtrustqualifiedca
delete mode 100644 jdk/make/data/cacerts/thawtepremiumserverca
delete mode 100644 jdk/make/data/cacerts/utnuserfirstobjectca
delete mode 100644 jdk/make/data/cacerts/verisigntsaca
diff --git a/jdk/make/data/cacerts/addtrustexternalca b/jdk/make/data/cacerts/addtrustexternalca
deleted file mode 100644
index ad84cad96..000000000
--- a/jdk/make/data/cacerts/addtrustexternalca
+++ /dev/null
@@ -1,32 +0,0 @@
-Owner: CN=AddTrust External CA Root, OU=AddTrust External TTP Network, O=AddTrust AB, C=SE
-Issuer: CN=AddTrust External CA Root, OU=AddTrust External TTP Network, O=AddTrust AB, C=SE
-Serial number: 1
-Valid from: Tue May 30 10:48:38 GMT 2000 until: Sat May 30 10:48:38 GMT 2020
-Signature algorithm name: SHA1withRSA
-Subject Public Key Algorithm: 2048-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
-MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
-IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
-MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux
-FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h
-bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v
-dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt
-H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9
-uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX
-mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX
-a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN
-E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0
-WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD
-VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0
-Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU
-cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx
-IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN
-AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH
-YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
-6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
-Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
-c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
-mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/addtrustqualifiedca b/jdk/make/data/cacerts/addtrustqualifiedca
deleted file mode 100644
index 0c62d44c7..000000000
--- a/jdk/make/data/cacerts/addtrustqualifiedca
+++ /dev/null
@@ -1,32 +0,0 @@
-Owner: CN=AddTrust Qualified CA Root, OU=AddTrust TTP Network, O=AddTrust AB, C=SE
-Issuer: CN=AddTrust Qualified CA Root, OU=AddTrust TTP Network, O=AddTrust AB, C=SE
-Serial number: 1
-Valid from: Tue May 30 10:44:50 GMT 2000 until: Sat May 30 10:44:50 GMT 2020
-Signature algorithm name: SHA1withRSA
-Subject Public Key Algorithm: 2048-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU
-MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
-b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1
-MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK
-EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIzAh
-BgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG9w0B
-AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq
-xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G
-87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i
-2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U
-WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
-0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G
-A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T
-AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr
-pGkwZzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQL
-ExRBZGRUcnVzdCBUVFAgTmV0d29yazEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlm
-aWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBABmrder4i2VhlRO6aQTv
-hsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxGGuoYQ992zPlm
-hpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
-dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3
-P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y
-iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
-xqE=
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/thawtepremiumserverca b/jdk/make/data/cacerts/thawtepremiumserverca
deleted file mode 100644
index 2df456ab0..000000000
--- a/jdk/make/data/cacerts/thawtepremiumserverca
+++ /dev/null
@@ -1,27 +0,0 @@
-Owner: EMAILADDRESS=premium-server@thawte.com, CN=Thawte Premium Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
-Issuer: EMAILADDRESS=premium-server@thawte.com, CN=Thawte Premium Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, ST=Western Cape, C=ZA
-Serial number: 36122296c5e338a520a1d25f4cd70954
-Valid from: Thu Aug 01 00:00:00 GMT 1996 until: Fri Jan 01 23:59:59 GMT 2021
-Signature algorithm name: SHA1withRSA
-Subject Public Key Algorithm: 1024-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIDNjCCAp+gAwIBAgIQNhIilsXjOKUgodJfTNcJVDANBgkqhkiG9w0BAQUFADCB
-zjELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJ
-Q2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UE
-CxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhh
-d3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNl
-cnZlckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIxMDEwMTIzNTk1OVow
-gc4xCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcT
-CUNhcGUgVG93bjEdMBsGA1UEChMUVGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNV
-BAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRo
-YXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1z
-ZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2
-aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560
-ZXUCTe/LCaIhUdib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j
-+ao6hnO2RlNYyIkFvYMRuHM/qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/
-BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBlkKyID1bZ5jA01CbH0FDxkt5r1DmI
-CSLGpmODA/eZd9iy5Ri4XWPz1HP7bJyZePFLeH0ZJMMrAoT4vCLZiiLXoPxx7JGH
-IPG47LHlVYCsPVLIOQ7C8MAFT9aCdYy9X9LcdpoFEsmvcsPcJX6kTY4XpeCHf+Ga
-WuFg3GQjPEIuTQ==
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/utnuserfirstobjectca b/jdk/make/data/cacerts/utnuserfirstobjectca
deleted file mode 100644
index 80a0b5c23..000000000
--- a/jdk/make/data/cacerts/utnuserfirstobjectca
+++ /dev/null
@@ -1,33 +0,0 @@
-Owner: CN=UTN-USERFirst-Object, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, ST=UT, C=US
-Issuer: CN=UTN-USERFirst-Object, OU=http://www.usertrust.com, O=The USERTRUST Network, L=Salt Lake City, ST=UT, C=US
-Serial number: 44be0c8b500024b411d3362de0b35f1b
-Valid from: Fri Jul 09 18:31:20 GMT 1999 until: Tue Jul 09 18:40:36 GMT 2019
-Signature algorithm name: SHA1withRSA
-Subject Public Key Algorithm: 2048-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIEZjCCA06gAwIBAgIQRL4Mi1AAJLQR0zYt4LNfGzANBgkqhkiG9w0BAQUFADCB
-lTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
-Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
-dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHTAbBgNVBAMTFFVUTi1VU0VSRmlyc3Qt
-T2JqZWN0MB4XDTk5MDcwOTE4MzEyMFoXDTE5MDcwOTE4NDAzNlowgZUxCzAJBgNV
-BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAc
-BgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3
-dy51c2VydHJ1c3QuY29tMR0wGwYDVQQDExRVVE4tVVNFUkZpcnN0LU9iamVjdDCC
-ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6qgT+jo2F4qjEAVZURnicP
-HxzfOpuCaDDASmEd8S8O+r5596Uj71VRloTN2+O5bj4x2AogZ8f02b+U60cEPgLO
-KqJdhwQJ9jCdGIqXsqoc/EHSoTbL+z2RuufZcDX65OeQw5ujm9M89RKZd7G3CeBo
-5hy485RjiGpq/gt2yb70IuRnuasaXnfBhQfdDWy/7gbHd2pBnqcP1/vulBe3/IW+
-pKvEHDHd17bR5PDv3xaPslKT16HUiaEHLr/hARJCHhrh2JU022R5KP+6LhHC5ehb
-kkj7RwvCbNqtMoNB86XlQXD9ZZBt+vpRxPm9lisZBCzTbafc8H9vg2XiaquHhnUC
-AwEAAaOBrzCBrDALBgNVHQ8EBAMCAcYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
-FgQU2u1kdBScFDyr3ZmpvVsoTYs8ydgwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDov
-L2NybC51c2VydHJ1c3QuY29tL1VUTi1VU0VSRmlyc3QtT2JqZWN0LmNybDApBgNV
-HSUEIjAgBggrBgEFBQcDAwYIKwYBBQUHAwgGCisGAQQBgjcKAwQwDQYJKoZIhvcN
-AQEFBQADggEBAAgfUrE3RHjb/c652pWWmKpVZIC1WkDdIaXFwfNfLEzIR1pp6ujw
-NTX00CXzyKakh0q9G7FzCL3Uw8q2NbtZhncxzaeAFK4T7/yxSPlrJSUtUbYsbUXB
-mMiKVl0+7kNOPmsnjtA6S4ULX9Ptaqd1y9Fahy85dRNacrACgZ++8A+EVCBibGnU
-4U3GDZlDAQ0Slox4nb9QorFEqmrPF3rPbw/U+CRVX/A0FklmPlBGyWNxODFiuGK5
-81OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCGhU3IfdeLA/5u1fedFqySLKAj5ZyR
-Uh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g=
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/verisigntsaca b/jdk/make/data/cacerts/verisigntsaca
deleted file mode 100644
index 9813ddaea..000000000
--- a/jdk/make/data/cacerts/verisigntsaca
+++ /dev/null
@@ -1,24 +0,0 @@
-Owner: CN=Thawte Timestamping CA, OU=Thawte Certification, O=Thawte, L=Durbanville, ST=Western Cape, C=ZA
-Issuer: CN=Thawte Timestamping CA, OU=Thawte Certification, O=Thawte, L=Durbanville, ST=Western Cape, C=ZA
-Serial number: 67c8e1e8e3be1cbdfc913b8ea6238749
-Valid from: Wed Jan 01 00:00:00 GMT 1997 until: Fri Jan 01 23:59:59 GMT 2021
-Signature algorithm name: SHA1withRSA
-Subject Public Key Algorithm: 1024-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIICsDCCAhmgAwIBAgIQZ8jh6OO+HL38kTuOpiOHSTANBgkqhkiG9w0BAQUFADCB
-izELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxML
-RHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhhd3RlIENl
-cnRpZmljYXRpb24xHzAdBgNVBAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcgQ0EwHhcN
-OTcwMTAxMDAwMDAwWhcNMjEwMTAxMjM1OTU5WjCBizELMAkGA1UEBhMCWkExFTAT
-BgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNV
-BAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhhd3RlIENlcnRpZmljYXRpb24xHzAdBgNV
-BAMTFlRoYXd0ZSBUaW1lc3RhbXBpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0A
-MIGJAoGBANYrWHhhRYZT6jR7UZztsOYuGA7+4F+oJ9O0yeB8WU4WDnNUYMF/9p8u
-6TqFJBU820cEY8OexJQaWt9MevPZQx08EHp5JduQ/vBR5zDWQQD9nyjfeb6Uu522
-FOMjhdepQeBMpHmwKxqL8vg7ij5FrHGSALSQQZj7X+36ty6K+Ig3AgMBAAGjEzAR
-MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAS+mqF4EF+3kKMZ/F
-QfRWVKvpwuWXjhj+kckMPiZkyaFMJ2SnvQGTVXFuF0853BvcSTUQOSP/ypvIz2Y/
-3Ewa1IEGQlIf4SaxFhe65nByMUToTo1b5NP50OOPJWQx5yr4GIg2GlLFDUE1G2m3
-JvUXzMEZXkt8XOKDgJH6L/uatxY=
------END CERTIFICATE-----
diff --git a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
index 1f443381c..29d4f0f97 100644
--- a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
+++ b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
@@ -27,7 +27,6 @@
* @bug 8189131 8198240 8191844 8189949 8191031 8196141 8204923 8195774 8199779
* 8209452 8209506 8210432 8195793 8216577 8222089 8222133 8222137 8222136
* 8223499 8225392 8232019 8234245 8233223 8225068 8225069 8243321 8243320
- * 8225072 8258630
* @summary Check root CA entries in cacerts file
*/
import java.io.ByteArrayInputStream;
@@ -58,7 +57,7 @@ public class VerifyCACerts {
// SHA-256 of cacerts, can be generated with
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
private static final String CHECKSUM
- = "84:BB:36:9E:B0:07:A7:C5:7F:38:EC:36:82:5C:0F:46:C0:35:3B:B1:1F:06:C2:D0:47:B9:39:FA:87:64:E5:9D";
+ = "8E:A5:85:3C:66:C0:7C:B1:2A:B6:67:31:B3:4A:8E:78:1B:8D:DC:49:F1:42:65:DB:CE:7C:69:41:F3:94:3A:F7";
// map of cert alias to SHA-256 fingerprint
@SuppressWarnings("serial")
@@ -93,12 +92,6 @@ public class VerifyCACerts {
"E7:93:C9:B0:2F:D8:AA:13:E2:1C:31:22:8A:CC:B0:81:19:64:3B:74:9C:89:89:64:B1:74:6D:46:C3:D4:CB:D2");
put("usertrusteccca [jdk]",
"4F:F4:60:D5:4B:9C:86:DA:BF:BC:FC:57:12:E0:40:0D:2B:ED:3F:BC:4D:4F:BD:AA:86:E0:6A:DC:D2:A9:AD:7A");
- put("utnuserfirstobjectca [jdk]",
- "6F:FF:78:E4:00:A7:0C:11:01:1C:D8:59:77:C4:59:FB:5A:F9:6A:3D:F0:54:08:20:D0:F4:B8:60:78:75:E5:8F");
- put("addtrustexternalca [jdk]",
- "68:7F:A4:51:38:22:78:FF:F0:C8:B1:1F:8D:43:D5:76:67:1C:6E:B2:BC:EA:B4:13:FB:83:D9:65:D0:6D:2F:F2");
- put("addtrustqualifiedca [jdk]",
- "80:95:21:08:05:DB:4B:BC:35:5E:44:28:D8:FD:6E:C2:CD:E3:AB:5F:B9:7A:99:42:98:8E:B8:F4:DC:D0:60:16");
put("baltimorecybertrustca [jdk]",
"16:AF:57:A9:F6:76:B0:AB:12:60:95:AA:5E:BA:DE:F2:2A:B3:11:19:D6:44:AC:95:CD:4B:93:DB:F3:F2:6A:EB");
put("digicertglobalrootca [jdk]",
@@ -253,19 +246,11 @@ public class VerifyCACerts {
@SuppressWarnings("serial")
private static final HashSet<String> EXPIRY_EXC_ENTRIES = new HashSet<String>() {
{
- // Valid until: Tue Jul 09 14:40:36 EDT 2019
- add("utnuserfirstobjectca [jdk]");
- // Valid until: Sat May 30 10:38:31 GMT 2020
- add("addtrustexternalca [jdk]");
- // Valid until: Sat May 30 10:44:50 GMT 2020
- add("addtrustqualifiedca [jdk]");
- // Valid until: Fri Jan 01 15:59:59 PST 2021
- add("verisigntsaca [jdk]");
- // Valid until: Fri Jan 01 15:59:59 PST 2021
- add("thawtepremiumserverca [jdk]");
- // Valid until: Wed Mar 17 02:51:37 PDT 2021
+ // Valid until: Wed Mar 17 17:51:37 HKT 2021
add("luxtrustglobalrootca [jdk]");
- // Valid until: Wed Mar 17 11:33:33 PDT 2021
+ // Valid until: Tue Apr 06 15:29:40 HKT 2021
+ add("soneraclass2ca [jdk]");
+ // Valid until: Thu Mar 18 02:33:33 HKT 2021
add("quovadisrootca [jdk]");
}
};
--
2.19.0

View File

@ -19,6 +19,12 @@
# level folder, name is created, based on parameter
#
if [ ! "x$PR3756" = "x" ] ; then
if [ ! -f "$PR3756" ] ; then
echo "You have specified PR3756 as $PR3756 but it does not exists. exiting"
exit 1
fi
fi
set -e
OPENJDK_URL_DEFAULT=http://hg.openjdk.java.net
@ -105,6 +111,32 @@ do
hg clone ${REPO_ROOT}/${subrepo} -r ${VERSION}
done
#if [ -d jdk ]; then
#echo "Removing EC source code we don't build"
#rm -vf jdk/src/share/native/sun/security/ec/impl/ec2.h
#rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_163.c
#rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_193.c
#rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_233.c
#rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_aff.c
#rm -vf jdk/src/share/native/sun/security/ec/impl/ec2_mont.c
#rm -vf jdk/src/share/native/sun/security/ec/impl/ecp_192.c
#rm -vf jdk/src/share/native/sun/security/ec/impl/ecp_224.c
#
#echo "Syncing EC list with NSS"
#
#if [ "x$PR3756" = "x" ] ; then
## get pr3756.patch (from http://icedtea.classpath.org/hg/icedtea8) from most correct tag
## Do not push it or publish it (see http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3756)
# wget http://icedtea.classpath.org/hg/icedtea8/raw-file/tip/patches/pr3756.patch
# patch -Np1 < pr3756.patch
# rm pr3756.patch
#else
# echo "Applying ${PR3756}"
# patch -Np1 < $PR3756
#fi;
#fi
#find . -name '*.orig' -exec rm -vf '{}' ';'
popd
echo "Compressing remaining forest"
if [ "X$COMPRESSION" = "Xxz" ] ; then

View File

@ -0,0 +1,29 @@
From 00c58142616a05509f005a676f786edaad88bfb4 Mon Sep 17 00:00:00 2001
Date: Thu, 24 Dec 2020 16:12:02 +0800
Subject: initialized value should be 0 in perfInit()
DTS/AR: AR.SR.IREQ02517150.001.001
Summary: <g1>: <initialized value should be 0 in perfInit()>
LLT:
Patch Type: huawei
Bug url:
---
hotspot/src/os/linux/vm/process_load.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hotspot/src/os/linux/vm/process_load.hpp b/hotspot/src/os/linux/vm/process_load.hpp
index 83800b199..896754d5e 100644
--- a/hotspot/src/os/linux/vm/process_load.hpp
+++ b/hotspot/src/os/linux/vm/process_load.hpp
@@ -197,7 +197,7 @@ static int get_jvmticks(ticks *pticks) {
* This method must be called first, before any data can be gathererd.
*/
int perfInit() {
- static int initialized=1;
+ static int initialized = 0;
if (!initialized) {
int i;
--
2.19.0

View File

@ -146,9 +146,10 @@
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
# Define old aarch64/jdk8u tree variables for compatibility
%global project jdk8u
%global repo jdk8u
%global revision jdk8u292-b01
%global project aarch64-port
%global repo jdk8u-shenandoah
%global revision aarch64-shenandoah-jdk8u282-b08
%global full_revision %{project}-%{repo}-%{revision}
# Define IcedTea version used for SystemTap tapsets and desktop files
%global icedteaver 3.15.0
@ -586,6 +587,9 @@ exit 0
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnet.so
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnio.so
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnpt.so
%ifarch %{aarch64}
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2kae.so
%endif
%ifarch %{sa_arches}
%{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsaproc.so
%endif
@ -627,6 +631,9 @@ exit 0
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunjce_provider.jar
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/sunpkcs11.jar
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/zipfs.jar
%ifarch %{aarch64}
%{_jvmdir}/%{jredir -- %{?1}}/lib/ext/kae_openssl.jar
%endif
%ifarch %{jfr_arches}
%{_jvmdir}/%{jredir -- %{?1}}/lib/jfr.jar
%{_jvmdir}/%{jredir -- %{?1}}/lib/jfr/default.jfc
@ -914,7 +921,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver}
Release: 0
Release: 8
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@ -942,7 +949,7 @@ Group: Development/Languages
License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib
URL: http://openjdk.java.net/
Source0: %{project}-%{repo}-%{revision}.tar.xz
Source0: %{full_revision}.tar.xz
# Custom README for -src subpackage
Source2: README.md
@ -1010,6 +1017,7 @@ Patch75: Add-ability-to-configure-third-port-for-remote-JMX.patch
Patch76: 8203196.patch
Patch77: 8190332.patch
Patch78: 8171410.patch
Patch83: 8204947.patch
Patch85: 8139041.patch
# 8u252
@ -1042,6 +1050,7 @@ Patch114: 8181503.patch
Patch115: 8243670.patch
Patch116: fix-crash-in-JVMTI-debug.patch
Patch118: Fix-LineBuffer-vappend-when-buffer-too-small.patch
Patch121: Remove-unused-GenericTaskQueueSet-T-F-tasks.patch
Patch122: optimize-jmap-F-dump-xxx.patch
Patch123: recreate-.java_pid-file-when-deleted-for-attach-mechanism.patch
Patch124: Support-Git-commit-ID-in-the-SOURCE-field-of-the-release.patch
@ -1051,20 +1060,35 @@ Patch127: add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch
# 8u272
Patch129: 8248336.patch
Patch133: 8160369.patch
Patch134: PS-GC-adding-acquire_size-method-for-PSParallelCompa.patch
Patch138: add-appcds-file-lock.patch
Patch139: G1-memory-uncommit.patch
Patch140: 8015927.patch
Patch141: 8040327.patch
Patch142: 8207160.patch
Patch143: delete-untrustworthy-cacert-files.patch
Patch144: add-appcds-test-case.patch
# 8u282
Patch145: 8080911.patch
Patch146: 8168926.patch
Patch147: 8215047.patch
Patch148: 8237894.patch
Patch149: Remove-the-parentheses-around-company-name.patch
Patch150: 8240353.patch
Patch151: kae-phase1.patch
Patch152: 8231841-debug.cpp-help-is-missing-an-AArch64-line-fo.patch
Patch153: initialized-value-should-be-0-in-perfInit.patch
Patch154: 8254078-DataOutputStream-is-very-slow-post-disabling.patch
Patch155: Use-atomic-operation-when-G1Uncommit.patch
Patch156: 8168996-backport-of-C2-crash-at-postaloc.cpp-140-ass.patch
Patch157: 8140597-Postpone-the-initial-mark-request-until-the-.patch
Patch158: Use-Mutex-when-G1Uncommit.patch
Patch159: C1-typos-repair.patch
Patch160: 8214418-half-closed-SSLEngine-status-may-cause-appli.patch
Patch161: 8259886-Improve-SSL-session-cache-performance-and-sc.patch
Patch162: 8214535-support-Jmap-parallel.patch
#############################################
#
@ -1148,6 +1172,7 @@ BuildRequires: pkgconfig
BuildRequires: xorg-x11-proto-devel
BuildRequires: zip
BuildRequires: unzip
BuildRequires: openssl-devel
BuildRequires: java-1.8.0-openjdk-devel
@ -1439,6 +1464,7 @@ pushd %{top_level_dir_name}
%patch76 -p1
%patch77 -p1
%patch78 -p1
%patch83 -p1
%patch85 -p1
%patch86 -p1
%patch87 -p1
@ -1465,6 +1491,7 @@ pushd %{top_level_dir_name}
%patch115 -p1
%patch116 -p1
%patch118 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
@ -1472,18 +1499,33 @@ pushd %{top_level_dir_name}
%patch126 -p1
%patch127 -p1
%patch129 -p1
%patch133 -p1
%patch134 -p1
%patch138 -p1
%patch139 -p1
%patch140 -p1
%patch141 -p1
%patch142 -p1
%patch143 -p1
%patch144 -p1
%patch145 -p1
%patch146 -p1
%patch147 -p1
%patch148 -p1
%patch149 -p1
%patch150 -p1
%patch151 -p1
%patch152 -p1
%patch153 -p1
%patch154 -p1
%patch155 -p1
%patch156 -p1
%patch157 -p1
%patch158 -p1
%patch159 -p1
%patch160 -p1
%patch161 -p1
%patch162 -p1
popd
@ -2100,13 +2142,23 @@ require "copy_jdk_configs.lua"
%endif
%changelog
* Tue Feb 9 2021 jdkboy <ge.guo@huawei.com> - 1:1.8.0.292-b01.0
- updated to jdk8u292-b01 (from jdk8u/jdk8u)
- delete 8204947.patch temperarily
- delete Remove-unused-GenericTaskQueueSet-T-F-tasks.patch
- delete 8160369.patch
- delete 8215047.patch temperarily
- delte delete-untrustworthy-cacert-files.patch
* Fri Mar 19 2021 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.282-b08.8
- add 8214535-support-Jmap-parallel.patch
* Fri Mar 19 2021 DataAndOperation <mashoubing1@huawei.com> - 1:1.8.0.282-b08.7
- add 8231841-debug.cpp-help-is-missing-an-AArch64-line-fo.patch
- add initialized-value-should-be-0-in-perfInit.patch
- add 8254078-DataOutputStream-is-very-slow-post-disabling.patch
- add Use-atomic-operation-when-G1Uncommit.patch
- add 8168996-backport-of-C2-crash-at-postaloc.cpp-140-ass.patch
- add 8140597-Postpone-the-initial-mark-request-until-the-.patch
- add Use-Mutex-when-G1Uncommit.patch
- add C1-typos-repair.patch
- add 8214418-half-closed-SSLEngine-status-may-cause-appli.patch
- add 8259886-Improve-SSL-session-cache-performance-and-sc.patch
* Wed Mar 17 2021 noah <hedongbo@huawei.com> - 1:1.8.0.282-b08.6
- add kae-phase1.patch
* Fri Feb 5 2021 noah <hedongbo@huawei.com> - 1:1.8.0.282-b08.5
- delete some file header

5496
kae-phase1.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -38,12 +38,13 @@ Add-ability-to-configure-third-port-for-remote-JMX.patch
8203196.patch
8190332.patch
8171410.patch
8204947.patch
8139041.patch
6858051-Create-GC-worker-threads-dynamically.patch
6858051-Add-a-switch-for-the-dynamic-thread-related-log.patch
dismiss-warnings-in-GCC-8.X.patch
8144993.patch
8223504.patch
8144993-Elide-redundant-memory-barrier-after-AllocationNode.patch
8223504-improve-performance-of-forall-loops-by-better.patch
add-vm-option-BoxTypeCachedMax-for-Integer-and-Long-cache.patch
8080289-8040213-8189067-move-the-store-out-of-the-loop.patch
8182397.patch
@ -64,6 +65,7 @@ Test8167409.sh-fails-to-run-with-32bit-jdk-on-64bit-.patch
8243670.patch
fix-crash-in-JVMTI-debug.patch
Fix-LineBuffer-vappend-when-buffer-too-small.patch
Remove-unused-GenericTaskQueueSet-T-F-tasks.patch
optimize-jmap-F-dump-xxx.patch
recreate-.java_pid-file-when-deleted-for-attach-mechanism.patch
Support-Git-commit-ID-in-the-SOURCE-field-of-the-release.patch
@ -71,15 +73,17 @@ Extend-CDS-to-support-app-class-metadata-sharing.patch
zlib-optimization.patch
add-DumpSharedSpace-guarantee-when-create-anonymous-classes.patch
8248336.patch
8160369.patch
PS-GC-adding-acquire_size-method-for-PSParallelCompa.patch
add-appcds-file-lock.patch
G1-memory-uncommit.patch
8015927.patch
8040327.patch
8207160.patch
delete-untrustworthy-cacert-files.patch
add-appcds-test-case.patch
8080911.patch
8168926.patch
8215047.patch
8237894.patch
Remove-the-parentheses-around-company-name.patch
8240353.patch

View File

@ -1,2 +1,2 @@
SHA512 (tapsets-icedtea-3.15.0.tar.xz) = 36eed87c370306c715d7a9d0906a7d719d6d956d38d03fb8f2d528d22e0067cabb3a7df10e8a7c5b65b70f2c12b9a8e7078a78a3cac478b6031d42f36415b05f
SHA512 (jdk8u-jdk8u-jdk8u292-b01.tar.xz) = 629e4443e84f003c5736261f55ca9c7cab3e24487e54a8136a4b7d627da68b46
SHA512 (aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u282-b08.tar.xz) = c0a525bc2c8e5b81af7903952eac1e3d9e6b7793399b38ef4c1abbb14370798dcc0478bc6bbf9ef63ba4461c98e16fa99d13d642413b045ef39d4305d6312b5f

View File

@ -15,16 +15,23 @@
#
# the used values are then substituted to spec and sources
if [ ! "x$PR2126" = "x" ] ; then
if [ ! -f "$PR2126" ] ; then
echo "You have specified PR2126 as $PR2126 but it does not exists. exiting"
exit 1
fi
fi
set -e
if [ "x$PROJECT_NAME" = "x" ] ; then
PROJECT_NAME="jdk8u"
PROJECT_NAME="aarch64-port"
fi
if [ "x$REPO_NAME" = "x" ] ; then
REPO_NAME="jdk8u"
REPO_NAME="jdk8u-shenandoah"
fi
if [ "x$VERSION" = "x" ] ; then
VERSION="jdk8u292-b01"
VERSION="aarch64-shenandoah-jdk8u282-b08"
fi
if [ "x$COMPRESSION" = "x" ] ; then
@ -47,12 +54,13 @@ fi
FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION}
if [ ! -f ${FILENAME} ] ; then
echo "Generating ${FILENAME}"
. ./generate_source_tarball.sh
echo "Generating ${FILENAME}"
. ./generate_source_tarball.sh
else
echo "${FILENAME} already exists, using"
echo "${FILENAME} already exists, using"
fi
echo "Touching spec: $SPEC"
echo sed -i "s/^%global\s\+project.*/%global project ${PROJECT_NAME}/" $SPEC
echo sed -i "s/^%global\s\+repo.*/%global repo ${REPO_NAME}/" $SPEC