I3PQM1: update to 8u292-b10

This commit is contained in:
eapen 2021-05-19 17:01:47 +08:00
parent 02f4fa1b5f
commit e0acea0df3
43 changed files with 1962 additions and 3084 deletions

View File

@ -1,27 +0,0 @@
From 26ad7960db3c1d445d3a3b8a47f426af0062d0ce Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 16:33:27 +0800
Subject: 6896810: Pin.java fails with OOME during System.out.println
Summary: <java.lang>: Pin.java fails with OOME during System.out.println
LLT: jdk8u/jdk/test/java/lang/ref/SoftReference/Pin.java
Bug url: https://bugs.openjdk.java.net/browse/JDK-6896810
---
jdk/test/java/lang/ref/SoftReference/Pin.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/jdk/test/java/lang/ref/SoftReference/Pin.java b/jdk/test/java/lang/ref/SoftReference/Pin.java
index dbdf9be1b..38cd56da2 100644
--- a/jdk/test/java/lang/ref/SoftReference/Pin.java
+++ b/jdk/test/java/lang/ref/SoftReference/Pin.java
@@ -76,6 +76,7 @@ public class Pin {
Thread.sleep(100); // yield, for what it's worth
}
} catch (OutOfMemoryError e) {
+ chain = null; // Free memory for further work.
System.err.println("Got OutOfMemoryError, as expected.");
}
--
2.19.0

31
8031818.patch Normal file
View File

@ -0,0 +1,31 @@
From 3c4faec7c6ace3004f9ee9fd5ea8fa56f22f1028 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Tue, 9 Mar 2021 17:27:50 +0800
Subject: [PATCH] [Backport]8031818: Experimental VM flag for enforcing
safe object construction
Offering: Cloud Compiler JDK
Reference: https://bugs.openjdk.java.net/browse/JDK-8031818
Signed-off-by: Sun Jianye <sunjianye@huawei.com>
---
hotspot/src/share/vm/opto/parse1.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp
index 2d6daa159..513747de0 100644
--- a/hotspot/src/share/vm/opto/parse1.cpp
+++ b/hotspot/src/share/vm/opto/parse1.cpp
@@ -958,7 +958,7 @@ void Parse::do_exits() {
// stores. We want to quarantee the same behaviour as on platforms
// with total store order, although this is not required by the Java
// memory model. So as with finals, we add a barrier here.
- if (wrote_final() PPC64_ONLY(|| (wrote_volatile() && method()->is_initializer()))) {
+ if (method()->is_initializer() && (wrote_final() PPC64_ONLY(|| wrote_volatile()))) {
// This method (which must be a constructor by the rules of Java)
// wrote a final. The effects of all initializations must be
// committed to memory before any code after the constructor
--
2.19.0

View File

@ -1,31 +0,0 @@
From adf268747c4627968329fb223d5286f5400402b6 Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 16:58:26 +0800
Subject: 8080911: sun/security/krb5/auto/UseCacheAndStoreKey.java timed out intermittently
Summary: <Corelib>: backport JDK-8080911
LLT: NA
Bug url: https://bugs.openjdk.java.net/browse/JDK-8080911
---
jdk/src/share/classes/sun/security/krb5/Config.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/jdk/src/share/classes/sun/security/krb5/Config.java b/jdk/src/share/classes/sun/security/krb5/Config.java
index ec19a3029..117acb840 100644
--- a/jdk/src/share/classes/sun/security/krb5/Config.java
+++ b/jdk/src/share/classes/sun/security/krb5/Config.java
@@ -146,8 +146,10 @@ public class Config {
* java.security.krb5.kdc not specified, error reading configuration file.
*/
- public static synchronized void refresh() throws KrbException {
- singleton = new Config();
+ public static void refresh() throws KrbException {
+ synchronized (Config.class) {
+ singleton = new Config();
+ }
KdcComm.initStatic();
EType.initStatic();
Checksum.initStatic();
--
2.19.0

View File

@ -1,106 +0,0 @@
From f73bb08c6d1578eae9c5f47253a81dd06e51beba Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 11:39:09 +0800
Subject: Backport of JDK-8129626
summary: G1: set_in_progress() and clear_started() needs a barrier on non-TSO platforms
LLT:
Bug url: https://bugs.openjdk.java.net/browse/JDK-8129626
---
.../g1/concurrentMarkThread.cpp | 4 +--
.../g1/concurrentMarkThread.hpp | 29 +++++++++++--------
.../gc_implementation/g1/g1CollectedHeap.cpp | 2 +-
3 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
index b56e30923..53fe0837b 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp
@@ -43,8 +43,7 @@ SurrogateLockerThread*
ConcurrentMarkThread::ConcurrentMarkThread(ConcurrentMark* cm) :
ConcurrentGCThread(),
_cm(cm),
- _started(false),
- _in_progress(false),
+ _state(Idle),
_vtime_accum(0.0),
_vtime_mark_accum(0.0) {
create_and_start();
@@ -341,7 +340,6 @@ void ConcurrentMarkThread::sleepBeforeNextCycle() {
if (started()) {
set_in_progress();
- clear_started();
}
}
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp
index caa7f429c..5f5f70ac4 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp
@@ -46,8 +46,14 @@ class ConcurrentMarkThread: public ConcurrentGCThread {
private:
ConcurrentMark* _cm;
- volatile bool _started;
- volatile bool _in_progress;
+
+ enum State {
+ Idle,
+ Started,
+ InProgress
+ };
+
+ volatile State _state;
void sleepBeforeNextCycle();
@@ -71,23 +77,22 @@ class ConcurrentMarkThread: public ConcurrentGCThread {
ConcurrentMark* cm() { return _cm; }
- void set_started() { assert(!_in_progress, "cycle in progress"); _started = true; }
- void clear_started() { assert(_in_progress, "must be starting a cycle"); _started = false; }
- bool started() { return _started; }
-
- void set_in_progress() { assert(_started, "must be starting a cycle"); _in_progress = true; }
- void clear_in_progress() { assert(!_started, "must not be starting a new cycle"); _in_progress = false; }
- bool in_progress() { return _in_progress; }
+ void set_idle() { assert(_state != Started, "must not be starting a new cycle"); _state = Idle; }
+ bool idle() { return _state == Idle; }
+ void set_started() { assert(_state == Idle, "cycle in progress"); _state = Started; }
+ bool started() { return _state == Started; }
+ void set_in_progress() { assert(_state == Started, "must be starting a cycle"); _state = InProgress; }
+ bool in_progress() { return _state == InProgress; }
- // This flag returns true from the moment a marking cycle is
+ // Returns true from the moment a marking cycle is
// initiated (during the initial-mark pause when started() is set)
// to the moment when the cycle completes (just after the next
// marking bitmap has been cleared and in_progress() is
- // cleared). While this flag is true we will not start another cycle
+ // cleared). While during_cycle() is true we will not start another cycle
// so that cycles do not overlap. We cannot use just in_progress()
// as the CM thread might take some time to wake up before noticing
// that started() is set and set in_progress().
- bool during_cycle() { return started() || in_progress(); }
+ bool during_cycle() { return !idle(); }
// shutdown
void stop();
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
index 4eccf9805..97643e792 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
@@ -2409,7 +2409,7 @@ void G1CollectedHeap::increment_old_marking_cycles_completed(bool concurrent) {
// is set) so that if a waiter requests another System.gc() it doesn't
// incorrectly see that a marking cycle is still in progress.
if (concurrent) {
- _cmThread->clear_in_progress();
+ _cmThread->set_idle();
}
// This notify_all() will ensure that a thread that called
--
2.19.0

View File

@ -82,7 +82,7 @@ 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
@@ -1402,11 +1402,20 @@ void PhaseMacroExpand::expand_allocate_common(
@@ -1402,14 +1402,23 @@ void PhaseMacroExpand::expand_allocate_common(
// If initialization is performed by an array copy, any required
// MemBarStoreStore was already added. If the object does not
@ -102,11 +102,14 @@ 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.
if ( AARCH64_ONLY ( !alloc->does_not_escape_thread() &&
+ !alloc->is_allocation_MemBar_redundant() &&
(init == NULL ||
!init->is_complete_with_arraycopy()) )
NOT_AARCH64 ( init == NULL ||
#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) {
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

View File

@ -6,50 +6,12 @@ Summary:<GC>:[Backport of JDK-8160369 and it's subtasks] Memory fences needed ar
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.cpp | 25 +---
.../vm/gc_implementation/g1/heapRegion.hpp | 2 +
.../gc_implementation/g1/heapRegionType.hpp | 3 +
.../parNew/parNewGeneration.cpp | 21 ++-
7 files changed, 173 insertions(+), 100 deletions(-)
4 files changed, 82 insertions(+), 49 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
@ -188,57 +150,6 @@ diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegion.cpp b/hotspot/
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);
@ -249,7 +160,7 @@ index 794911ef6..7c48501f3 100644
cur += block_size(cur);
}
return NULL;
@@ -411,30 +452,14 @@ bool HeapRegion::oops_on_card_seq_iterate_careful(MemRegion mr,
@@ -454,29 +495,9 @@ bool HeapRegion::oops_on_card_seq_iterate_careful(MemRegion mr,
FilterOutOfRegionClosure* cl,
jbyte* card_ptr) {
assert(card_ptr != NULL, "pre-condition");
@ -267,7 +178,6 @@ index 794911ef6..7c48501f3 100644
- 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
@ -277,92 +187,10 @@ index 794911ef6..7c48501f3 100644
- // 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
@ -390,55 +218,6 @@ index a9a4fbc25..007dabf19 100644
// 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

@ -1,32 +0,0 @@
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

@ -1,54 +0,0 @@
From 3665377e22f4896b5c7480ebc8c2138e9fc2fe16 Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 15:31:06 +0800
Subject: aarch64: long multiplyExact shifts by 31 instead of 63
Summary: <c2>: long multiplyExact shifts by 31 instead of 63
LLT: NA
Bug url: https://bugs.openjdk.java.net/browse/JDK-8171410
---
hotspot/src/cpu/aarch64/vm/aarch64.ad | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hotspot/src/cpu/aarch64/vm/aarch64.ad b/hotspot/src/cpu/aarch64/vm/aarch64.ad
index 48d3628e9..38de0098b 100644
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad
@@ -12582,7 +12582,7 @@ instruct overflowMulL_reg(rFlagsReg cr, iRegL op1, iRegL op2)
format %{ "mul rscratch1, $op1, $op2\t#overflow check long\n\t"
"smulh rscratch2, $op1, $op2\n\t"
- "cmp rscratch2, rscratch1, ASR #31\n\t"
+ "cmp rscratch2, rscratch1, ASR #63\n\t"
"movw rscratch1, #0x80000000\n\t"
"cselw rscratch1, rscratch1, zr, NE\n\t"
"cmpw rscratch1, #1" %}
@@ -12590,7 +12590,7 @@ instruct overflowMulL_reg(rFlagsReg cr, iRegL op1, iRegL op2)
ins_encode %{
__ mul(rscratch1, $op1$$Register, $op2$$Register); // Result bits 0..63
__ smulh(rscratch2, $op1$$Register, $op2$$Register); // Result bits 64..127
- __ cmp(rscratch2, rscratch1, Assembler::ASR, 31); // Top is pure sign ext
+ __ cmp(rscratch2, rscratch1, Assembler::ASR, 63); // Top is pure sign ext
__ movw(rscratch1, 0x80000000); // Develop 0 (EQ),
__ cselw(rscratch1, rscratch1, zr, Assembler::NE); // or 0x80000000 (NE)
__ cmpw(rscratch1, 1); // 0x80000000 - 1 => VS
@@ -12608,7 +12608,7 @@ instruct overflowMulL_reg_branch(cmpOp cmp, iRegL op1, iRegL op2, label labl, rF
format %{ "mul rscratch1, $op1, $op2\t#overflow check long\n\t"
"smulh rscratch2, $op1, $op2\n\t"
- "cmp rscratch2, rscratch1, ASR #31\n\t"
+ "cmp rscratch2, rscratch1, ASR #63\n\t"
"b$cmp $labl" %}
ins_cost(4 * INSN_COST); // Branch is rare so treat as INSN_COST
ins_encode %{
@@ -12616,7 +12616,7 @@ instruct overflowMulL_reg_branch(cmpOp cmp, iRegL op1, iRegL op2, label labl, rF
Assembler::Condition cond = (Assembler::Condition)$cmp$$cmpcode;
__ mul(rscratch1, $op1$$Register, $op2$$Register); // Result bits 0..63
__ smulh(rscratch2, $op1$$Register, $op2$$Register); // Result bits 64..127
- __ cmp(rscratch2, rscratch1, Assembler::ASR, 31); // Top is pure sign ext
+ __ cmp(rscratch2, rscratch1, Assembler::ASR, 63); // Top is pure sign ext
__ br(cond == Assembler::VS ? Assembler::NE : Assembler::EQ, *L);
%}
--
2.19.0

View File

@ -8,15 +8,15 @@ index 6d0b4acbd..ecd4bd4a6 100644
if (right.is_constant()) {
- int c = right.get_jint_constant();
- if (! is_power_of_2(c) && ! is_power_of_2(c + 1) && ! is_power_of_2(c - 1)) {
- // Cannot use constant op.
- right.load_item();
- // Cannot use constant op.
- right.load_item();
+ jint c = right.get_jint_constant();
+ if (c > 0 && c < max_jint && (is_power_of_2(c) || is_power_of_2(c - 1) || is_power_of_2(c + 1))) {
+ right_arg->dont_load_item();
} else {
- right.dont_load_item();
- right.dont_load_item();
+ // Cannot use constant op.
+ right_arg->load_item();
+ right_arg->load_item();
}
} else {
right.load_item();

View File

@ -1,28 +1,33 @@
From bc0b4ef15436f98b4e7fc87342320b5b4f10ef3c Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 14:30:40 +0800
Subject: Backport of JDK-8182036
From ad7ec63def37ef080e98394f7ea76acb28e4574c Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Tue, 9 Mar 2021 17:24:33 +0800
Subject: [PATCH] [Backport]8182036: 2-Load from initializing arraycopy
uses wrong memory state
summary: Load from initializing arraycopy uses wrong memory state
LLT:
Bug url: https://bugs.openjdk.java.net/browse/JDK-8182036
Offering: Cloud Compiler JDK
Reference: https://bugs.openjdk.java.net/browse/JDK-8182036, https://bugs.openjdk.java.net/browse/JDK-8233023
Signed-off-by: He Xuejin <hexuejin2@huawei.com>
---
hotspot/src/share/vm/opto/library_call.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
hotspot/src/share/vm/opto/memnode.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp
index cd1b1e5c0..89ebabe6f 100644
--- a/hotspot/src/share/vm/opto/library_call.cpp
+++ b/hotspot/src/share/vm/opto/library_call.cpp
@@ -5703,7 +5703,8 @@ LibraryCallKit::generate_block_arraycopy(const TypePtr* adr_type,
((src_off ^ dest_off) & (BytesPerLong-1)) == 0) {
Node* sptr = basic_plus_adr(src, src_off);
Node* dptr = basic_plus_adr(dest, dest_off);
- Node* sval = make_load(control(), sptr, TypeInt::INT, T_INT, adr_type, MemNode::unordered);
+ const TypePtr* s_adr_type = _gvn.type(sptr)->is_ptr();
+ Node* sval = make_load(control(), sptr, TypeInt::INT, T_INT, s_adr_type, MemNode::unordered);
store_to_memory(control(), dptr, sval, T_INT, adr_type, MemNode::unordered);
src_off += BytesPerInt;
dest_off += BytesPerInt;
diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp
index 317c21d2d..4a8fb1074 100644
--- a/hotspot/src/share/vm/opto/memnode.cpp
+++ b/hotspot/src/share/vm/opto/memnode.cpp
@@ -2329,7 +2329,9 @@ Node *StoreNode::Ideal(PhaseGVN *phase, bool can_reshape) {
st->Opcode() == Op_StoreVector ||
Opcode() == Op_StoreVector ||
phase->C->get_alias_index(adr_type()) == Compile::AliasIdxRaw ||
- (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI), // expanded ClearArrayNode
+ (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI) || // expanded ClearArrayNode
+ (Opcode() == Op_StoreI && st->Opcode() == Op_StoreL) || // initialization by arraycopy
+ (is_mismatched_access() || mem->as_Store()->is_mismatched_access()),
err_msg_res("no mismatched stores, except on raw memory: %s %s", NodeClassNames[Opcode()], NodeClassNames[st->Opcode()]));
if (st->in(MemNode::Address)->eqv_uncast(address) &&
--
2.19.0

View File

@ -1,115 +0,0 @@
From 8591ace51cb262bc6f35b4213f2ebac8a4b9111f Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 14:29:52 +0800
Subject: Backport of JDK-8191129
summary: AARCH64: Invalid value passed to critical JNI function
LLT:
Bug url: https://bugs.openjdk.java.net/browse/JDK-8191129
---
.../cpu/aarch64/vm/sharedRuntime_aarch64.cpp | 2 +-
.../src/cpu/aarch64/vm/vm_version_aarch64.cpp | 3 +++
hotspot/src/share/vm/runtime/arguments.cpp | 22 -------------------
hotspot/src/share/vm/runtime/arguments.hpp | 22 +++++++++++++++++++
4 files changed, 26 insertions(+), 23 deletions(-)
diff --git a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
index 55c2b5d6d..7143db519 100644
--- a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
@@ -1545,7 +1545,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// critical natives they are offset down.
GrowableArray<int> arg_order(2 * total_in_args);
VMRegPair tmp_vmreg;
- tmp_vmreg.set1(r19->as_VMReg());
+ tmp_vmreg.set2(r19->as_VMReg());
if (!is_critical_native) {
for (int i = total_in_args - 1, c_arg = total_c_args - 1; i >= 0; i--, c_arg--) {
diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
index 211baa9dc..ae7265dfc 100644
--- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
@@ -30,6 +30,7 @@
#include "runtime/java.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "vm_version_aarch64.hpp"
+#include "runtime/arguments.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "os_linux.inline.hpp"
#endif
@@ -339,4 +340,6 @@ void VM_Version::initialize() {
g.generate_getPsrInfo());
get_processor_features();
+
+ UNSUPPORTED_OPTION(CriticalJNINatives, "CriticalJNINatives");
}
diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp
index bd789f637..a9eb3fb10 100644
--- a/hotspot/src/share/vm/runtime/arguments.cpp
+++ b/hotspot/src/share/vm/runtime/arguments.cpp
@@ -79,28 +79,6 @@
#endif
#define DEFAULT_JAVA_LAUNCHER "generic"
-// Disable options not supported in this release, with a warning if they
-// were explicitly requested on the command-line
-#define UNSUPPORTED_OPTION(opt, description) \
-do { \
- if (opt) { \
- if (FLAG_IS_CMDLINE(opt)) { \
- warning(description " is disabled in this release."); \
- } \
- FLAG_SET_DEFAULT(opt, false); \
- } \
-} while(0)
-
-#define UNSUPPORTED_GC_OPTION(gc) \
-do { \
- if (gc) { \
- if (FLAG_IS_CMDLINE(gc)) { \
- warning(#gc " is not supported in this VM. Using Serial GC."); \
- } \
- FLAG_SET_DEFAULT(gc, false); \
- } \
-} while(0)
-
char** Arguments::_jvm_flags_array = NULL;
int Arguments::_num_jvm_flags = 0;
char** Arguments::_jvm_args_array = NULL;
diff --git a/hotspot/src/share/vm/runtime/arguments.hpp b/hotspot/src/share/vm/runtime/arguments.hpp
index 86c415e6a..a5cd59ea6 100644
--- a/hotspot/src/share/vm/runtime/arguments.hpp
+++ b/hotspot/src/share/vm/runtime/arguments.hpp
@@ -39,6 +39,28 @@ extern "C" {
typedef jint (JNICALL *vfprintf_hook_t)(FILE *fp, const char *format, va_list args) ATTRIBUTE_PRINTF(2, 0);
}
+// Disable options not supported in this release, with a warning if they
+// were explicitly requested on the command-line
+#define UNSUPPORTED_OPTION(opt, description) \
+do { \
+ if (opt) { \
+ if (FLAG_IS_CMDLINE(opt)) { \
+ warning(description " is disabled in this release."); \
+ } \
+ FLAG_SET_DEFAULT(opt, false); \
+ } \
+} while(0)
+
+#define UNSUPPORTED_GC_OPTION(gc) \
+do { \
+ if (gc) { \
+ if (FLAG_IS_CMDLINE(gc)) { \
+ warning(#gc " is not supported in this VM. Using Serial GC."); \
+ } \
+ FLAG_SET_DEFAULT(gc, false); \
+ } \
+} while(0)
+
// Forward declarations
class SysClassPath;
--
2.19.0

View File

@ -1,161 +0,0 @@
From a1125b79426556114c36a807ccd95bd916b07dab Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 15:26:12 +0800
Subject: 8191915: java.lang.Math.multiplyExact not throw an
exception for certain values
Summary: C2: java.lang.Math.multiplyExact not throw an exception for certain values
LLT: hotspot/test/compiler/intrinsics/mathexact/LongMulOverflowTest.java
Bug url: https://bugs.openjdk.java.net/browse/JDK-8191915
---
hotspot/src/share/vm/opto/mathexactnode.cpp | 42 ++++++++-----
hotspot/src/share/vm/opto/mathexactnode.hpp | 4 +-
.../mathexact/LongMulOverflowTest.java | 61 +++++++++++++++++++
3 files changed, 90 insertions(+), 17 deletions(-)
create mode 100644 hotspot/test/compiler/intrinsics/mathexact/LongMulOverflowTest.java
diff --git a/hotspot/src/share/vm/opto/mathexactnode.cpp b/hotspot/src/share/vm/opto/mathexactnode.cpp
index 00466ad3d..661cc745b 100644
--- a/hotspot/src/share/vm/opto/mathexactnode.cpp
+++ b/hotspot/src/share/vm/opto/mathexactnode.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -117,23 +117,33 @@ bool OverflowSubLNode::will_overflow(jlong v1, jlong v2) const {
return SubHelper<OverflowSubLNode>::will_overflow(v1, v2);
}
-bool OverflowMulLNode::will_overflow(jlong val1, jlong val2) const {
- jlong result = val1 * val2;
- jlong ax = (val1 < 0 ? -val1 : val1);
- jlong ay = (val2 < 0 ? -val2 : val2);
-
- bool overflow = false;
- if ((ax | ay) & CONST64(0xFFFFFFFF00000000)) {
- // potential overflow if any bit in upper 32 bits are set
- if ((val1 == min_jlong && val2 == -1) || (val2 == min_jlong && val1 == -1)) {
- // -1 * Long.MIN_VALUE will overflow
- overflow = true;
- } else if (val2 != 0 && (result / val2 != val1)) {
- overflow = true;
- }
+bool OverflowMulLNode::is_overflow(jlong val1, jlong val2) {
+ // x * { 0, 1 } will never overflow. Even for x = min_jlong
+ if (val1 == 0 || val2 == 0 || val1 == 1 || val2 == 1) {
+ return false;
+ }
+
+ // x * min_jlong for x not in { 0, 1 } overflows
+ // even -1 as -1 * min_jlong is an overflow
+ if (val1 == min_jlong || val2 == min_jlong) {
+ return true;
}
- return overflow;
+ // if (x * y) / y == x there is no overflow
+ //
+ // the multiplication here is done as unsigned to avoid undefined behaviour which
+ // can be used by the compiler to assume that the check further down (result / val2 != val1)
+ // is always false and breaks the overflow check
+ julong v1 = (julong) val1;
+ julong v2 = (julong) val2;
+ julong tmp = v1 * v2;
+ jlong result = (jlong) tmp;
+
+ if (result / val2 != val1) {
+ return true;
+ }
+
+ return false;
}
bool OverflowAddINode::can_overflow(const Type* t1, const Type* t2) const {
diff --git a/hotspot/src/share/vm/opto/mathexactnode.hpp b/hotspot/src/share/vm/opto/mathexactnode.hpp
index 3e037cf56..0a59ebd96 100644
--- a/hotspot/src/share/vm/opto/mathexactnode.hpp
+++ b/hotspot/src/share/vm/opto/mathexactnode.hpp
@@ -129,8 +129,10 @@ public:
OverflowMulLNode(Node* in1, Node* in2) : OverflowLNode(in1, in2) {}
virtual int Opcode() const;
- virtual bool will_overflow(jlong v1, jlong v2) const;
+ virtual bool will_overflow(jlong v1, jlong v2) const { return is_overflow(v1, v2); }
virtual bool can_overflow(const Type* t1, const Type* t2) const;
+
+ static bool is_overflow(jlong v1, jlong v2);
};
#endif
diff --git a/hotspot/test/compiler/intrinsics/mathexact/LongMulOverflowTest.java b/hotspot/test/compiler/intrinsics/mathexact/LongMulOverflowTest.java
new file mode 100644
index 000000000..69bd8f157
--- /dev/null
+++ b/hotspot/test/compiler/intrinsics/mathexact/LongMulOverflowTest.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2018, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8191915
+ * @summary Regression test for multiplyExact intrinsic
+ * @compile AddExactICondTest.java
+ * @run main/othervm -Xcomp -XX:-TieredCompilation compiler.intrinsics.mathexact.LongMulOverflowTest
+ */
+
+package compiler.intrinsics.mathexact;
+
+public class LongMulOverflowTest {
+ public static void main(String[] args) {
+ LongMulOverflowTest test = new LongMulOverflowTest();
+ for (int i = 0; i < 10; ++i) {
+ try {
+ test.runTest();
+ throw new RuntimeException("Error, runTest() did not overflow!");
+ } catch (ArithmeticException e) {
+ // success
+ }
+
+ try {
+ test.runTestOverflow();
+ throw new RuntimeException("Error, runTestOverflow() did not overflow!");
+ } catch (ArithmeticException e) {
+ // success
+ }
+ }
+ }
+
+ public void runTest() {
+ java.lang.Math.multiplyExact(Long.MIN_VALUE, 7);
+ }
+
+ public void runTestOverflow() {
+ java.lang.Math.multiplyExact((Long.MAX_VALUE / 2) + 1, 2);
+ }
+}
--
2.19.0

58
8193518.patch Normal file
View File

@ -0,0 +1,58 @@
From ffcc6a489a09be7b10e06e9bece5fe2aa06d336d Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Tue, 9 Mar 2021 16:58:48 +0800
Subject: [PATCH] [Backport]8193518: C2:Vector registers sometimes
corrupted at safepoint
Offering: Cloud Compiler JDK
Reference: https://bugs.openjdk.java.net/browse/JDK-8193518
Signed-off-by: He Xuejin <hexuejin2@huawei.com>
---
hotspot/src/share/vm/opto/compile.hpp | 6 +++---
hotspot/src/share/vm/opto/superword.cpp | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hotspot/src/share/vm/opto/compile.hpp b/hotspot/src/share/vm/opto/compile.hpp
index fd750b10e..93fa11737 100644
--- a/hotspot/src/share/vm/opto/compile.hpp
+++ b/hotspot/src/share/vm/opto/compile.hpp
@@ -316,7 +316,7 @@ class Compile : public Phase {
bool _has_unsafe_access; // True if the method _may_ produce faults in unsafe loads or stores.
bool _has_stringbuilder; // True StringBuffers or StringBuilders are allocated
bool _has_boxed_value; // True if a boxed object is allocated
- int _max_vector_size; // Maximum size of generated vectors
+ uint _max_vector_size; // Maximum size of generated vectors
uint _trap_hist[trapHistLength]; // Cumulative traps
bool _trap_can_recompile; // Have we emitted a recompiling trap?
uint _decompile_count; // Cumulative decompilation counts.
@@ -581,8 +581,8 @@ class Compile : public Phase {
void set_has_stringbuilder(bool z) { _has_stringbuilder = z; }
bool has_boxed_value() const { return _has_boxed_value; }
void set_has_boxed_value(bool z) { _has_boxed_value = z; }
- int max_vector_size() const { return _max_vector_size; }
- void set_max_vector_size(int s) { _max_vector_size = s; }
+ uint max_vector_size() const { return _max_vector_size; }
+ void set_max_vector_size(uint s) { _max_vector_size = s; }
void set_trap_count(uint r, uint c) { assert(r < trapHistLength, "oob"); _trap_hist[r] = c; }
uint trap_count(uint r) const { assert(r < trapHistLength, "oob"); return _trap_hist[r]; }
bool trap_can_recompile() const { return _trap_can_recompile; }
diff --git a/hotspot/src/share/vm/opto/superword.cpp b/hotspot/src/share/vm/opto/superword.cpp
index a14210ee2..2b7e7af21 100644
--- a/hotspot/src/share/vm/opto/superword.cpp
+++ b/hotspot/src/share/vm/opto/superword.cpp
@@ -1480,7 +1480,9 @@ void SuperWord::output() {
#endif
}
}
- C->set_max_vector_size(max_vlen_in_bytes);
+ if (max_vlen_in_bytes > C->max_vector_size()) {
+ C->set_max_vector_size(max_vlen_in_bytes);
+ }
}
//------------------------------vector_opd---------------------------
--
2.19.0

View File

@ -1,49 +0,0 @@
diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
index e25061f7d..2df587d96 100644
--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013, Red Hat Inc.
- * Copyright (c) 2000, 2019, Oracle and/or its affiliates.
+ * Copyright (c) 2000, 2020, Oracle and/or its affiliates.
* All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -434,12 +434,9 @@ int LIR_Assembler::emit_unwind_handler() {
}
if (compilation()->env()->dtrace_method_probes()) {
- __ call_Unimplemented();
-#if 0
- __ movptr(Address(rsp, 0), rax);
- __ mov_metadata(Address(rsp, sizeof(void*)), method()->constant_encoding());
- __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit)));
-#endif
+ __ mov(c_rarg0, rthread);
+ __ mov_metadata(c_rarg1, method()->constant_encoding());
+ __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), c_rarg0, c_rarg1);
}
if (method()->is_synchronized() || compilation()->env()->dtrace_method_probes()) {
diff --git a/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp
index c1e48ac97..e774f2140 100644
--- a/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp
@@ -1319,6 +1319,16 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
}
break;
+ case dtrace_object_alloc_id:
+ { // c_rarg0: object
+ StubFrame f(sasm, "dtrace_object_alloc", dont_gc_arguments);
+ save_live_registers(sasm);
+
+ __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), c_rarg0);
+
+ restore_live_registers(sasm);
+ }
+ break;
default:
{ StubFrame f(sasm, "unimplemented entry", dont_gc_arguments);

View File

@ -1,46 +0,0 @@
From 0fc0d41f2af723a0abdb3c73100137f847b1d820 Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 16:40:43 +0800
Subject: 8248336: AArch64: C2: offset overflow in
BoxLockNode::emit
Summary: <C2>: offset overflow in BoxLockNode::emit
LLT: jtreg
Bug url: https://bugs.openjdk.java.net/browse/JDK-8248336
---
hotspot/src/cpu/aarch64/vm/aarch64.ad | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/hotspot/src/cpu/aarch64/vm/aarch64.ad b/hotspot/src/cpu/aarch64/vm/aarch64.ad
index 38de0098b..accce6720 100644
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad
@@ -1828,16 +1828,20 @@ void BoxLockNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const {
int offset = ra_->reg2offset(in_RegMask(0).find_first_elem());
int reg = ra_->get_encode(this);
- if (Assembler::operand_valid_for_add_sub_immediate(offset)) {
- __ add(as_Register(reg), sp, offset);
- } else {
- ShouldNotReachHere();
- }
+ // This add will handle any 24-bit signed offset. 24 bits allows an
+ // 8 megabyte stack frame.
+ __ add(as_Register(reg), sp, offset);
}
uint BoxLockNode::size(PhaseRegAlloc *ra_) const {
// BoxLockNode is not a MachNode, so we can't just call MachNode::size(ra_).
- return 4;
+ int offset = ra_->reg2offset(in_RegMask(0).find_first_elem());
+
+ if (Assembler::operand_valid_for_add_sub_immediate(offset)) {
+ return NativeInstruction::instruction_size;
+ } else {
+ return 2 * NativeInstruction::instruction_size;
+ }
}
//=============================================================================
--
2.19.0

View File

@ -1,42 +0,0 @@
From bd26df9efb8b765bb40fcfeef3e8908e77bfb15f Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 11:14:02 +0800
Subject: AARCH64 fix itable stub code size limit
---
hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
index d8d1ec11b..645b690da 100644
--- a/hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp
@@ -130,6 +130,10 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
// returned by pd_code_size_limit!
const int code_length = VtableStub::pd_code_size_limit(false);
VtableStub* s = new(code_length) VtableStub(false, itable_index);
+ // Can be NULL if there is no free space in the code cache.
+ if (s == NULL) {
+ return NULL;
+ }
ResourceMark rm;
CodeBuffer cb(s->entry_point(), code_length);
MacroAssembler* masm = new MacroAssembler(&cb);
@@ -222,10 +226,12 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
if (CountCompiledCalls)
size += 6 * 4;
// FIXME: vtable stubs only need 36 bytes
- if (is_vtable_stub)
+ if (is_vtable_stub) {
size += 52;
- else
- size += 176;
+ } else {
+ // itable code size limit.
+ size += 192;
+ }
return size;
// In order to tune these parameters, run the JVM with VM options
--
2.19.0

View File

@ -8,12 +8,12 @@ LLT: NA
Patch Type: huawei
Bug url: NA
---
.../src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp | 6 +++---
.../src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp | 2 +-
.../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(-)
5 files changed, 11 insertions(+), 14 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
@ -28,18 +28,6 @@ index 2df587d96..60b67494c 100644
}
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

View File

@ -4,20 +4,7 @@ Subject: [PATCH 1/2] Code style fix
---
hotspot/src/share/vm/runtime/arguments.cpp | 2 +-
hotspot/test/compiler/c2/Test8202414.java | 2 +-
hotspot/test/compiler/c2/Test8217359.java | 2 +-
hotspot/test/compiler/c2/TestReplaceEquivPhis.java | 2 +-
.../criticalnatives/argumentcorruption/Test8167409.sh | 2 +-
hotspot/test/compiler/loopopts/TestBeautifyLoops.java | 2 +-
hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java | 2 +-
hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java | 2 +-
.../classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java | 2 +-
.../classes/com/huawei/management/AdaptiveHeapMXBean.java | 2 +-
jdk/src/share/classes/sun/awt/FontConfiguration.java | 7 +------
jdk/src/share/classes/sun/font/SunFontManager.java | 2 +-
.../native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c | 3 ++-
jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh | 2 +-
14 files changed, 15 insertions(+), 19 deletions(-)
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp
index 170f1fd9f..7ecb7a271 100644
@ -32,161 +19,3 @@ index 170f1fd9f..7ecb7a271 100644
char buffer[size];
jio_snprintf(buffer, size, "java.lang.Long.LongCache.high=" INTX_FORMAT, BoxTypeCachedMax);
add_property(buffer);
diff --git a/hotspot/test/compiler/c2/Test8202414.java b/hotspot/test/compiler/c2/Test8202414.java
index 1d8ef8d93..1f6ac4ed8 100644
--- a/hotspot/test/compiler/c2/Test8202414.java
+++ b/hotspot/test/compiler/c2/Test8202414.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/c2/Test8217359.java b/hotspot/test/compiler/c2/Test8217359.java
index ca0d2cc75..533bdce4b 100644
--- a/hotspot/test/compiler/c2/Test8217359.java
+++ b/hotspot/test/compiler/c2/Test8217359.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/c2/TestReplaceEquivPhis.java b/hotspot/test/compiler/c2/TestReplaceEquivPhis.java
index d4c93b390..229df93e5 100644
--- a/hotspot/test/compiler/c2/TestReplaceEquivPhis.java
+++ b/hotspot/test/compiler/c2/TestReplaceEquivPhis.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2020, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh
index 1108aaf93..62a47b6d5 100644
--- a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh
+++ b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh
@@ -2,7 +2,7 @@
#
# Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2019 Huawei Technologies Co. LTD. All Rights Reserved.
+# Copyright (c) 2019 Huawei Technologies Co., LTD. 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
diff --git a/hotspot/test/compiler/loopopts/TestBeautifyLoops.java b/hotspot/test/compiler/loopopts/TestBeautifyLoops.java
index c831430ed..8fcafc59b 100644
--- a/hotspot/test/compiler/loopopts/TestBeautifyLoops.java
+++ b/hotspot/test/compiler/loopopts/TestBeautifyLoops.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2020, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java b/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java
index c53f33ff2..90fb2242f 100644
--- a/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java
+++ b/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2020, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java b/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java
index d9828e56f..3cf657044 100644
--- a/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java
+++ b/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
index 1443fb043..223e66c50 100644
--- a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
+++ b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
index 70563b58d..69ee78d0a 100644
--- a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
+++ b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/jdk/src/share/classes/sun/awt/FontConfiguration.java b/jdk/src/share/classes/sun/awt/FontConfiguration.java
index 0657b07b3..7c6368da3 100644
--- a/jdk/src/share/classes/sun/awt/FontConfiguration.java
+++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java
@@ -309,12 +309,7 @@ public abstract class FontConfiguration {
}
}
foundOsSpecificFile = false;
-
- configFile = findImpl(baseName);
- if (configFile != null) {
- return configFile;
- }
- return null;
+ return (configFile = findImpl(baseName));
}
/* Initialize the internal data tables from binary format font
diff --git a/jdk/src/share/classes/sun/font/SunFontManager.java b/jdk/src/share/classes/sun/font/SunFontManager.java
index 9e2de3cf5..6dee8b1aa 100644
--- a/jdk/src/share/classes/sun/font/SunFontManager.java
+++ b/jdk/src/share/classes/sun/font/SunFontManager.java
@@ -447,7 +447,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
}
} catch(Exception e) {
e.printStackTrace();
- System.out.println("initialize default Font fail,start use HuaweiJDK font");
+ System.out.println("Initialize default font fail,try font in jre/lib/fonts if exists.");
FontUtilities.isOpenJDK = false;
}
diff --git a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
index 1f75e7cb1..99bfff885 100644
--- a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
+++ b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2020 Huawei Group Holding Limited. All Rights Reserved.
+ * Copyright (c) 2019 Alibaba Group Holding Limited. All Rights Reserved.
+ * Copyright (c) 2021, Huawei Technologies Co., Ltd. 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
diff --git a/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh b/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh
index de8d9b4f0..d928f8c3c 100644
--- a/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh
+++ b/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
+# Copyright (c) 2020, Huawei Technologies Co., Ltd. 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
--
2.23.0

View File

@ -3,7 +3,7 @@ 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) {
@ -172,8 +172,8 @@ index 388177589..1abc7e3b0 100644
+ 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);

View File

@ -0,0 +1,67 @@
From c5590435871f83fcca35a3ee28692e5864b8a657 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Tue, 9 Mar 2021 16:51:56 +0800
Subject: [PATCH] [Huawei]Disable ddot intrinsic on CPUs that not
support
Offering: Cloud Compiler JDK
Signed-off-by: Mou Zhuojun <mouzhuojun@huawei.com>
---
hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp | 5 +++++
hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp | 5 +++++
hotspot/src/cpu/x86/vm/vm_version_x86.cpp | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
index 3c59c96ca..b5ce1cfa9 100644
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp
@@ -236,6 +236,11 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseSHA, false);
}
+ if (UseF2jBLASIntrinsics) {
+ warning("F2jBLAS instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
+ }
+
if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) {
UseMontgomeryMultiplyIntrinsic = true;
}
diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
index d7240e876..bd893e138 100644
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
@@ -382,6 +382,11 @@ void VM_Version::initialize() {
}
}
+ if (UseF2jBLASIntrinsics) {
+ warning("F2jBLAS instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
+ }
+
if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
(cache_line_size > ContendedPaddingWidth))
ContendedPaddingWidth = cache_line_size;
diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
index 3a4246c68..46b3e32ea 100644
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
@@ -628,6 +628,11 @@ void VM_Version::get_processor_features() {
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
}
+ if (UseF2jBLASIntrinsics) {
+ warning("F2jBLAS instructions are not available on this CPU");
+ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false);
+ }
+
// Adjust RTM (Restricted Transactional Memory) flags
if (!supports_rtm() && UseRTMLocking) {
// Can't continue because UseRTMLocking affects UseBiasedLocking flag
--
2.19.0

View File

@ -0,0 +1,151 @@
From 627f09f11f68a542d5a6113dc68289460d27a563 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Sat, 17 Apr 2021 14:06:13 +0800
Subject: [PATCH] [Huawei]Fixed a copyright writing problem.
Offering: Cloud Compiler JDK
Reference: NA
Summary: <JDK> : Fixed a copyright writing problem.
LLT: NA
Signed-off-by: wangkun <wangkun49@huawei.com>
---
hotspot/test/compiler/c2/Test8202414.java | 2 +-
hotspot/test/compiler/c2/Test8217359.java | 2 +-
hotspot/test/compiler/c2/TestReplaceEquivPhis.java | 2 +-
.../test/compiler/criticalnatives/argumentcorruption/Test8167409.sh | 2 +-
hotspot/test/compiler/loopopts/TestBeautifyLoops.java | 2 +-
hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java | 2 +-
hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java | 2 +-
jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java | 2 +-
jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java | 2 +-
jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c | 3 ++-
jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh | 2 +-
11 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/hotspot/test/compiler/c2/Test8202414.java b/hotspot/test/compiler/c2/Test8202414.java
index 1d8ef8d93..1f6ac4ed8 100644
--- a/hotspot/test/compiler/c2/Test8202414.java
+++ b/hotspot/test/compiler/c2/Test8202414.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/c2/Test8217359.java b/hotspot/test/compiler/c2/Test8217359.java
index ca0d2cc75..533bdce4b 100644
--- a/hotspot/test/compiler/c2/Test8217359.java
+++ b/hotspot/test/compiler/c2/Test8217359.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/c2/TestReplaceEquivPhis.java b/hotspot/test/compiler/c2/TestReplaceEquivPhis.java
index d4c93b390..229df93e5 100644
--- a/hotspot/test/compiler/c2/TestReplaceEquivPhis.java
+++ b/hotspot/test/compiler/c2/TestReplaceEquivPhis.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2020, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh
index 1108aaf93..62a47b6d5 100644
--- a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh
+++ b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh
@@ -2,7 +2,7 @@
#
# Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2019 Huawei Technologies Co. LTD. All Rights Reserved.
+# Copyright (c) 2019 Huawei Technologies Co., LTD. 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
diff --git a/hotspot/test/compiler/loopopts/TestBeautifyLoops.java b/hotspot/test/compiler/loopopts/TestBeautifyLoops.java
index c831430ed..8fcafc59b 100644
--- a/hotspot/test/compiler/loopopts/TestBeautifyLoops.java
+++ b/hotspot/test/compiler/loopopts/TestBeautifyLoops.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2020, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java b/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java
index c53f33ff2..90fb2242f 100644
--- a/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java
+++ b/hotspot/test/compiler/loopopts/TestBeautifyLoops_2.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2020, Huawei Technologies Co., Ltd. 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
diff --git a/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java b/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java
index d9828e56f..3cf657044 100644
--- a/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java
+++ b/hotspot/test/compiler/loopopts/TestRemoveEmptyLoop.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
index 1443fb043..223e66c50 100644
--- a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
+++ b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
index 70563b58d..69ee78d0a 100644
--- a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
+++ b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved.
+ * Copyright (c) 2019, Huawei Technologies Co., Ltd. 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
diff --git a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
index 1f75e7cb1..99bfff885 100644
--- a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
+++ b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved.
+ * Copyright (c) 2019 Alibaba Group Holding Limited. All Rights Reserved.
+ * Copyright (c) 2021, Huawei Technologies Co., Ltd. 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
diff --git a/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh b/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh
index de8d9b4f0..d928f8c3c 100644
--- a/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh
+++ b/jdk/test/sun/tools/jconsole/WorkerDeadlockTest.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2020, Huawei Technologies Co. Ltd. All rights reserved.
+# Copyright (c) 2020, Huawei Technologies Co., Ltd. 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
--
2.12.3

View File

@ -13,15 +13,22 @@ diff --git a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test816740
index 81695e758..1108aaf93 100644
--- a/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh
+++ b/hotspot/test/compiler/criticalnatives/argumentcorruption/Test8167409.sh
@@ -61,13 +61,17 @@ case "$OS" in
@@ -61,19 +61,24 @@ case "$OS" in
exit 0;
;;
esac
+
+${TESTJAVA}${FS}bin${FS}java -XshowSettings 2>&1 | grep sun.arch.data.model | grep 32
+if [ 0 -eq $? ] ; then
+ M32="-m32"
+fi
# CriticalJNINatives is not supported for aarch64
if [ $VM_CPU == "aarch64" ]; then
echo "Test Passed"
exit 0;
fi
THIS_DIR=.
cp ${TESTSRC}${FS}*.java ${THIS_DIR}

View File

@ -0,0 +1,236 @@
From 085610c254b73485262cdde24ea762d0b0f9247b Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Wed, 10 Mar 2021 11:15:17 +0800
Subject: [PATCH] [Huawei]add appcds jtreg test case
UnusedCPDuringDump.java & WrongClasspath.java
Offering: Cloud Compiler JDK
Signed-off-by: Hu Bodao <hubodao@huawei.com>
---
.../test/runtime/appcds/DirClasspathTest.java | 4 +-
.../runtime/appcds/MismatchedUseAppCDS.java | 8 +--
hotspot/test/runtime/appcds/TestCommon.java | 2 +
.../runtime/appcds/UnusedCPDuringDump.java | 65 +++++++++++++++++++
.../test/runtime/appcds/WrongClasspath.java | 57 ++++++++++++++++
5 files changed, 129 insertions(+), 7 deletions(-)
create mode 100644 hotspot/test/runtime/appcds/UnusedCPDuringDump.java
create mode 100644 hotspot/test/runtime/appcds/WrongClasspath.java
diff --git a/hotspot/test/runtime/appcds/DirClasspathTest.java b/hotspot/test/runtime/appcds/DirClasspathTest.java
index e2c4e698c..70ea728a5 100644
--- a/hotspot/test/runtime/appcds/DirClasspathTest.java
+++ b/hotspot/test/runtime/appcds/DirClasspathTest.java
@@ -103,14 +103,14 @@ public class DirClasspathTest {
// Non-empty dir in -cp: should report error if a class is loaded from it
output = TestCommon.dump(classDir.toString(), appClassList2);
output.shouldNotHaveExitValue(1);
- output.shouldContain("Cannot find com/sun/tools/javac/Main");
+ output.shouldContain("Preload failed: com/sun/tools/javac/Main");
// Long path to non-empty dir in -cp: should report error if a class is loaded from it
File srcClass = new File(classDir.toFile(), "Hello.class");
File destClass = new File(longDir, "Hello.class");
Files.copy(srcClass.toPath(), destClass.toPath());
output = TestCommon.dump(longDir.getPath(), appClassList2);
output.shouldNotHaveExitValue(1);
- output.shouldContain("Cannot find Hello");
+ output.shouldContain("Rewriting and linking classes: done");
}
}
diff --git a/hotspot/test/runtime/appcds/MismatchedUseAppCDS.java b/hotspot/test/runtime/appcds/MismatchedUseAppCDS.java
index 7173d6c96..599fdc5e4 100644
--- a/hotspot/test/runtime/appcds/MismatchedUseAppCDS.java
+++ b/hotspot/test/runtime/appcds/MismatchedUseAppCDS.java
@@ -46,12 +46,12 @@ public class MismatchedUseAppCDS {
// (1): dump with -XX:+UseAppCDS, but run with -XX:-UseAppCDS
TestCommon.testDump(appJar, TestCommon.list("CheckIfShared"),
// command-line arguments ...
- "-XX:+UseAppCDS",
use_whitebox_jar);
output = TestCommon.exec(appJar,
// command-line arguments ...
use_whitebox_jar,
+ "-XX:-UseAppCDS",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
"CheckIfShared", "false");
@@ -60,17 +60,15 @@ public class MismatchedUseAppCDS {
// (2): dump with -XX:-UseAppCDS, but run with -XX:+UseAppCDS
TestCommon.testDump(appJar, TestCommon.list("CheckIfShared"),
// command-line arguments ...
- "-XX:+UseAppCDS",
+ "-XX:-UseAppCDS",
use_whitebox_jar);
output = TestCommon.exec(appJar,
// command-line arguments ...
use_whitebox_jar,
- "-XX:+UseAppCDS",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
- "CheckIfShared", "true");
+ "CheckIfShared", "false");
TestCommon.checkExec(output);
}
}
-
diff --git a/hotspot/test/runtime/appcds/TestCommon.java b/hotspot/test/runtime/appcds/TestCommon.java
index 4ed416feb..22eef4ed4 100644
--- a/hotspot/test/runtime/appcds/TestCommon.java
+++ b/hotspot/test/runtime/appcds/TestCommon.java
@@ -131,6 +131,7 @@ public class TestCommon extends CDSTestUtils {
}
cmd.add("-Xshare:dump");
+ cmd.add("-XX:+UseAppCDS");
// cmd.add("-Xlog:cds,cds+hashtables"); comment out because it will be run by jdk1.8
cmd.add("-XX:ExtraSharedClassListFile=" + classList.getPath());
@@ -156,6 +157,7 @@ public class TestCommon extends CDSTestUtils {
for (String p : opts.prefix) cmd.add(p);
cmd.add("-Xshare:" + opts.xShareMode);
+ cmd.add("-XX:+UseAppCDS");
cmd.add("-showversion");
cmd.add("-XX:SharedArchiveFile=" + getCurrentArchiveName());
cmd.add("-Dtest.timeout.factor=" + timeoutFactor);
diff --git a/hotspot/test/runtime/appcds/UnusedCPDuringDump.java b/hotspot/test/runtime/appcds/UnusedCPDuringDump.java
new file mode 100644
index 000000000..7ad923924
--- /dev/null
+++ b/hotspot/test/runtime/appcds/UnusedCPDuringDump.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test
+ * @bug 8209385
+ * @summary non-empty dir in -cp should be fine during dump time if only classes
+ * from the system modules are being loaded even though some are
+ * defined to the PlatformClassLoader and AppClassLoader.
+ * @library /testlibrary
+ * @compile test-classes/Hello.java
+ * @run main/othervm -Dtest.cds.copy.child.stdout=false UnusedCPDuringDump
+ */
+
+import java.io.File;
+import com.oracle.java.testlibrary.OutputAnalyzer;
+
+/**
+ * Test ddot UnusedCPDuringDump
+ *
+ * @since 2020
+ */
+public class UnusedCPDuringDump {
+ /*
+ * This method is the test entry
+ *
+ * @param args used.
+ * @return Nothing.
+ * @throws RuntimeException On test failed.
+ */
+ public static void main(String[] args) throws Exception {
+ File dir = new File(System.getProperty("user.dir"));
+ File emptydir = new File(dir, "emptydir");
+ emptydir.mkdir();
+ String appJar = JarBuilder.getOrCreateHelloJar();
+ OutputAnalyzer output = TestCommon.dump(dir.getPath(),
+ TestCommon.list("sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo",
+ "com/sun/tools/sjavac/client/ClientMain"));
+ TestCommon.checkDump(output);
+ String jsaOpt = "-XX:SharedArchiveFile=" + TestCommon.getCurrentArchiveName();
+ TestCommon.run("-cp", appJar, jsaOpt, "Hello")
+ .assertNormalExit("Hello World");
+ }
+}
diff --git a/hotspot/test/runtime/appcds/WrongClasspath.java b/hotspot/test/runtime/appcds/WrongClasspath.java
new file mode 100644
index 000000000..87e35adbb
--- /dev/null
+++ b/hotspot/test/runtime/appcds/WrongClasspath.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2014, 2018, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test
+ * @summary classpath mismatch between dump time and execution time
+ * @library /testlibrary
+ * @compile test-classes/Hello.java
+ * @run main WrongClasspath
+ */
+
+import com.oracle.java.testlibrary.OutputAnalyzer;
+
+/**
+ * Test WrongClasspath
+ *
+ * @since 2020
+ */
+public class WrongClasspath {
+ /*
+ * This method is the test entry
+ *
+ * @param args used.
+ * @return Nothing.
+ * @throws RuntimeException On test failed.
+ */
+ public static void main(String[] args) throws Exception {
+ String appJar = JarBuilder.getOrCreateHelloJar();
+ // Dump an archive with a specified JAR file in -classpath
+ TestCommon.testDump(appJar, TestCommon.list("Hello"));
+ // Then try to execute the archive without -classpath -- it should fail
+ TestCommon.run(
+ /* "-cp", appJar, */ // <- uncomment this and the execution should succeed
+ "Hello");
+ }
+}
--
2.19.0

View File

@ -1,27 +0,0 @@
From 5e4c07bdb41eb63e9407aedbf00bb35bacadcdc1 Mon Sep 17 00:00:00 2001
Date: Fri, 22 Jan 2021 11:15:52 +0800
Subject: add debuginfo for libsaproc on aarch64
---
hotspot/make/linux/makefiles/defs.make | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hotspot/make/linux/makefiles/defs.make b/hotspot/make/linux/makefiles/defs.make
index 9aebd998d..bb382bbd7 100644
--- a/hotspot/make/linux/makefiles/defs.make
+++ b/hotspot/make/linux/makefiles/defs.make
@@ -316,9 +316,11 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifeq ($(ZIP_DEBUGINFO_FILES),1)
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+ ADD_SA_BINARIES/aarch64 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
else
ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+ ADD_SA_BINARIES/aarch64 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
endif
endif
endif
--
2.19.0

View File

@ -3,98 +3,15 @@ Date: Fri, 16 Apr 2021 11:26:40 +0800
Subject: [PATCH 1/3] add missing test case
---
.../test/runtime/appcds/DirClasspathTest.java | 4 +-
.../runtime/appcds/MismatchedUseAppCDS.java | 8 ++--
hotspot/test/runtime/appcds/TestCommon.java | 2 +
.../java/testlibrary/OutputAnalyzer.java | 2 +-
.../lookup/TestDefenderMethodLookup.java | 2 +
.../templates/SSLSocketSSLEngineTemplate.java | 17 +++++++-
.../security/lib/cacerts/VerifyCACerts.java | 12 +-----
.../com/huawei/openjdk/TestAdaptiveHeap.java | 42 +++++++++++++++++++
version.txt | 1 +
9 files changed, 70 insertions(+), 20 deletions(-)
9 files changed, 61 insertions(+), 3 deletions(-)
create mode 100644 test/jdk/com/huawei/openjdk/TestAdaptiveHeap.java
create mode 100644 version.txt
diff --git a/hotspot/test/runtime/appcds/DirClasspathTest.java b/hotspot/test/runtime/appcds/DirClasspathTest.java
index e2c4e698..70ea728a 100644
--- a/hotspot/test/runtime/appcds/DirClasspathTest.java
+++ b/hotspot/test/runtime/appcds/DirClasspathTest.java
@@ -103,14 +103,14 @@ public class DirClasspathTest {
// Non-empty dir in -cp: should report error if a class is loaded from it
output = TestCommon.dump(classDir.toString(), appClassList2);
output.shouldNotHaveExitValue(1);
- output.shouldContain("Cannot find com/sun/tools/javac/Main");
+ output.shouldContain("Preload failed: com/sun/tools/javac/Main");
// Long path to non-empty dir in -cp: should report error if a class is loaded from it
File srcClass = new File(classDir.toFile(), "Hello.class");
File destClass = new File(longDir, "Hello.class");
Files.copy(srcClass.toPath(), destClass.toPath());
output = TestCommon.dump(longDir.getPath(), appClassList2);
output.shouldNotHaveExitValue(1);
- output.shouldContain("Cannot find Hello");
+ output.shouldContain("Rewriting and linking classes: done");
}
}
diff --git a/hotspot/test/runtime/appcds/MismatchedUseAppCDS.java b/hotspot/test/runtime/appcds/MismatchedUseAppCDS.java
index 7173d6c9..599fdc5e 100644
--- a/hotspot/test/runtime/appcds/MismatchedUseAppCDS.java
+++ b/hotspot/test/runtime/appcds/MismatchedUseAppCDS.java
@@ -46,12 +46,12 @@ public class MismatchedUseAppCDS {
// (1): dump with -XX:+UseAppCDS, but run with -XX:-UseAppCDS
TestCommon.testDump(appJar, TestCommon.list("CheckIfShared"),
// command-line arguments ...
- "-XX:+UseAppCDS",
use_whitebox_jar);
output = TestCommon.exec(appJar,
// command-line arguments ...
use_whitebox_jar,
+ "-XX:-UseAppCDS",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
"CheckIfShared", "false");
@@ -60,17 +60,15 @@ public class MismatchedUseAppCDS {
// (2): dump with -XX:-UseAppCDS, but run with -XX:+UseAppCDS
TestCommon.testDump(appJar, TestCommon.list("CheckIfShared"),
// command-line arguments ...
- "-XX:+UseAppCDS",
+ "-XX:-UseAppCDS",
use_whitebox_jar);
output = TestCommon.exec(appJar,
// command-line arguments ...
use_whitebox_jar,
- "-XX:+UseAppCDS",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
- "CheckIfShared", "true");
+ "CheckIfShared", "false");
TestCommon.checkExec(output);
}
}
-
diff --git a/hotspot/test/runtime/appcds/TestCommon.java b/hotspot/test/runtime/appcds/TestCommon.java
index 4ed416fe..22eef4ed 100644
--- a/hotspot/test/runtime/appcds/TestCommon.java
+++ b/hotspot/test/runtime/appcds/TestCommon.java
@@ -131,6 +131,7 @@ public class TestCommon extends CDSTestUtils {
}
cmd.add("-Xshare:dump");
+ cmd.add("-XX:+UseAppCDS");
// cmd.add("-Xlog:cds,cds+hashtables"); comment out because it will be run by jdk1.8
cmd.add("-XX:ExtraSharedClassListFile=" + classList.getPath());
@@ -156,6 +157,7 @@ public class TestCommon extends CDSTestUtils {
for (String p : opts.prefix) cmd.add(p);
cmd.add("-Xshare:" + opts.xShareMode);
+ cmd.add("-XX:+UseAppCDS");
cmd.add("-showversion");
cmd.add("-XX:SharedArchiveFile=" + getCurrentArchiveName());
cmd.add("-Dtest.timeout.factor=" + timeoutFactor);
diff --git a/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java b/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java
index 2132325f..2221ea4a 100644
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java
@ -154,49 +71,6 @@ index 54b4e3c6..16af82f0 100644
+ }
}
+
diff --git a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
index 29d4f0f9..7a9c4583 100644
--- a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
+++ b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
@@ -52,12 +52,12 @@ public class VerifyCACerts {
+ File.separator + "security" + File.separator + "cacerts";
// The numbers of certs now.
- private static final int COUNT = 90;
+ private static final int COUNT = 88;
// 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
- = "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";
+ = "25:2F:A9:73:74:A5:62:71:E0:12:75:FB:E7:C0:BF:BF:38:E5:B1:93:72:D4:2C:3C:2D:4D:B8:FA:05:F7:EC:3F";
// map of cert alias to SHA-256 fingerprint
@SuppressWarnings("serial")
@@ -146,10 +146,6 @@ public class VerifyCACerts {
"5D:56:49:9B:E4:D2:E0:8B:CF:CA:D0:8A:3E:38:72:3D:50:50:3B:DE:70:69:48:E4:2F:55:60:30:19:E5:28:AE");
put("letsencryptisrgx1 [jdk]",
"96:BC:EC:06:26:49:76:F3:74:60:77:9A:CF:28:C5:A7:CF:E8:A3:C0:AA:E1:1A:8F:FC:EE:05:C0:BD:DF:08:C6");
- put("luxtrustglobalrootca [jdk]",
- "A1:B2:DB:EB:64:E7:06:C6:16:9E:3C:41:18:B2:3B:AA:09:01:8A:84:27:66:6D:8B:F0:E2:88:91:EC:05:19:50");
- put("quovadisrootca [jdk]",
- "A4:5E:DE:3B:BB:F0:9C:8A:E1:5C:72:EF:C0:72:68:D6:93:A2:1C:99:6F:D5:1E:67:CA:07:94:60:FD:6D:88:73");
put("quovadisrootca1g3 [jdk]",
"8A:86:6F:D1:B2:76:B5:7E:57:8E:92:1C:65:82:8A:2B:ED:58:E9:F2:F2:88:05:41:34:B7:F1:F4:BF:C9:CC:74");
put("quovadisrootca2 [jdk]",
@@ -246,12 +242,8 @@ public class VerifyCACerts {
@SuppressWarnings("serial")
private static final HashSet<String> EXPIRY_EXC_ENTRIES = new HashSet<String>() {
{
- // Valid until: Wed Mar 17 17:51:37 HKT 2021
- add("luxtrustglobalrootca [jdk]");
// 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]");
}
};
diff --git a/test/jdk/com/huawei/openjdk/TestAdaptiveHeap.java b/test/jdk/com/huawei/openjdk/TestAdaptiveHeap.java
new file mode 100644
index 00000000..bd22ba83
@ -251,7 +125,7 @@ index 00000000..9b614024
--- /dev/null
+++ b/version.txt
@@ -0,0 +1 @@
+8.282.8.0.13
+8.292.8.0.13
--
2.23.0

View File

@ -0,0 +1,88 @@
From 77723879ed55a3d2475f0d9f831ea7c31e59a22e Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Thu, 4 Mar 2021 09:22:24 +0800
Subject: [PATCH] [Huawei]add safe compilation flags
Offering: Cloud Compiler JDK
Signed-off-by: Sun Jianye <sunjianye@huawei.com>
---
common/autoconf/flags.m4 | 2 +-
common/autoconf/generated-configure.sh | 2 +-
hotspot/make/windows/makefiles/compile.make | 2 +-
hotspot/make/windows/makefiles/sa.make | 2 +-
hotspot/make/windows/makefiles/vm.make | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4
index 838a76734..a8a938072 100644
--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -706,7 +706,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
# And since we now know that the linker is gnu, then add:
# -z defs, to forbid undefined symbols in object files
# -z noexecstack, to mark stack regions as non-executable
- LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack -Xlinker -z -Xlinker relro -Xlinker -z -Xlinker now"
if test "x$DEBUG_LEVEL" = "xrelease"; then
# When building release libraries, tell the linker optimize them.
# Should this be supplied to the OSS linker as well?
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 03872a3c9..b8ae42603 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -42174,7 +42174,7 @@ $as_echo "$supports" >&6; }
# And since we now know that the linker is gnu, then add:
# -z defs, to forbid undefined symbols in object files
# -z noexecstack, to mark stack regions as non-executable
- LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack"
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs -Xlinker -z -Xlinker noexecstack -Xlinker -z -Xlinker relro -Xlinker -z -Xlinker now"
if test "x$DEBUG_LEVEL" = "xrelease"; then
# When building release libraries, tell the linker optimize them.
# Should this be supplied to the OSS linker as well?
diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make
index f3581c163..a405eb336 100644
--- a/hotspot/make/windows/makefiles/compile.make
+++ b/hotspot/make/windows/makefiles/compile.make
@@ -53,7 +53,7 @@ CXX=cl.exe
# improving the quality of crash log stack traces involving jvm.dll.
# These are always used in all compiles
-CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX
+CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /GS
# Let's add debug information when Full Debug Symbols is enabled
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make
index 776e58e51..520d190d8 100644
--- a/hotspot/make/windows/makefiles/sa.make
+++ b/hotspot/make/windows/makefiles/sa.make
@@ -143,7 +143,7 @@ SA_LFLAGS = $(SA_LFLAGS) -map -debug
SA_LFLAGS = /SAFESEH $(SA_LFLAGS)
!endif
-SA_CFLAGS = $(SA_CFLAGS) $(MP_FLAG)
+SA_CFLAGS = $(SA_CFLAGS) $(MP_FLAG) /GS
# Note that we do not keep sawindbj.obj around as it would then
# get included in the dumpbin command in build_vm_def.sh
diff --git a/hotspot/make/windows/makefiles/vm.make b/hotspot/make/windows/makefiles/vm.make
index f26cad6e7..082232719 100644
--- a/hotspot/make/windows/makefiles/vm.make
+++ b/hotspot/make/windows/makefiles/vm.make
@@ -32,9 +32,9 @@ COMMONSRC=$(WorkSpace)\src
ALTSRC=$(WorkSpace)\src\closed
!ifdef RELEASE
-CXX_FLAGS=$(CXX_FLAGS) /D "PRODUCT"
+CXX_FLAGS=$(CXX_FLAGS) /D "PRODUCT" /GS
!else
-CXX_FLAGS=$(CXX_FLAGS) /D "ASSERT"
+CXX_FLAGS=$(CXX_FLAGS) /D "ASSERT" /GS
!endif
!if "$(Variant)" == "compiler1"
--
2.19.0

View File

@ -0,0 +1,308 @@
From b6287af7cfd2951fea495861c97f947cf1eb1e80 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Thu, 4 Mar 2021 11:09:20 +0800
Subject: [PATCH] [Huawei]downgrade symver of memcpy@GLIBC
Offering: Cloud Compiler JDK
Signed-off-by: Feng Shijie <fengshijie2@huawei.com>
---
hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp | 21 +++++++++++++++++++++
jdk/make/CompileDemos.gmk | 1 +
jdk/make/CompileLaunchers.gmk | 1 +
jdk/make/lib/Awt2dLibraries.gmk | 7 +++++++
jdk/make/lib/CoreLibraries.gmk | 6 ++++++
jdk/make/lib/NetworkingLibraries.gmk | 1 +
jdk/make/lib/NioLibraries.gmk | 1 +
jdk/make/lib/SecurityLibraries.gmk | 2 ++
jdk/make/lib/ServiceabilityLibraries.gmk | 5 +++++
jdk/make/lib/SoundLibraries.gmk | 1 +
make/common/NativeCompilation.gmk | 7 +++++++
11 files changed, 53 insertions(+)
create mode 100644 hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp
diff --git a/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp b/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp
new file mode 100644
index 000000000..0c4edeaae
--- /dev/null
+++ b/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) Huawei Technologies Co., Ltd. 2018-2020. All rights reserved.
+ */
+
+#if defined( __GNUC__ ) && \
+(__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+#include <string.h>
+
+#if (defined AMD64) || (defined amd64)
+/* some systems do not have newest memcpy@@GLIBC_2.14 - stay with old good one */
+asm (".symver memcpy, memcpy@GLIBC_2.2.5");
+
+extern "C"{
+ void *__wrap_memcpy(void *dest, const void *src, size_t n)
+ {
+ return memcpy(dest, src, n);
+ }
+}
+#endif
+#endif
+
diff --git a/jdk/make/CompileDemos.gmk b/jdk/make/CompileDemos.gmk
index 6c5eb4327..763c968e0 100644
--- a/jdk/make/CompileDemos.gmk
+++ b/jdk/make/CompileDemos.gmk
@@ -250,6 +250,7 @@ define SetupJVMTIDemo
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CXXFLAGS := $$($1_CXXFLAGS), \
LDFLAGS := $(filter-out -incremental:no -opt:ref, $$(LDFLAGS_JDKLIB)), \
LDFLAGS_macosx := $$(call SET_EXECUTABLE_ORIGIN), \
diff --git a/jdk/make/CompileLaunchers.gmk b/jdk/make/CompileLaunchers.gmk
index baaea8a99..3e5ae94ef 100644
--- a/jdk/make/CompileLaunchers.gmk
+++ b/jdk/make/CompileLaunchers.gmk
@@ -512,6 +512,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
EXCLUDE_FILES := jni.cpp, \
LANG := $(UNPACKEXE_LANG), \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) \
-DFULL, \
CFLAGS_release := -DPRODUCT, \
diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk
index 9368a9d50..71d87c378 100644
--- a/jdk/make/lib/Awt2dLibraries.gmk
+++ b/jdk/make/lib/Awt2dLibraries.gmk
@@ -52,6 +52,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBMLIB_IMAGE, \
EXCLUDE_FILES := awt_ImagingLib.c mlib_c_ImageBlendTable.c, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBMLIB_CFLAGS), \
MAPFILE := $(BUILD_LIBMLIB_IMAGE_MAPFILE), \
@@ -470,6 +471,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT, \
INCLUDE_FILES := $(LIBAWT_FILES), \
LANG := $(LIBAWT_LANG), \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
ASFLAGS := $(LIBAWT_ASFLAGS), \
MAPFILE := $(LIBAWT_MAPFILE), \
@@ -631,6 +633,7 @@ ifeq ($(findstring $(OPENJDK_TARGET_OS),windows macosx),)
INCLUDE_FILES := $(LIBAWT_XAWT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
$(X_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_xawt/mapfile-vers, \
@@ -672,6 +675,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS, \
SRC := $(JDK_TOPDIR)/src/share/native/sun/java2d/cmm/lcms, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
-DCMS_DONT_USE_FAST_FLOOR \
$(SHARED_LIBRARY_FLAGS) \
@@ -739,6 +743,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJPEG, \
$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
LANG := C, \
OPTIMIZATION := HIGHEST, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBJPEG_CLOSED_INCLUDES) \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
@@ -914,6 +919,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBFONTMANAGER, \
EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
AccelGlyphCache.c, \
LANG := C++, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(BUILD_LIBFONTMANAGER_CFLAGS_COMMON), \
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
@@ -1205,6 +1211,7 @@ ifndef BUILD_HEADLESS_ONLY
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk
index afcebcb35..0b400b345 100644
--- a/jdk/make/lib/CoreLibraries.gmk
+++ b/jdk/make/lib/CoreLibraries.gmk
@@ -113,6 +113,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
INCLUDE_FILES := $(BUILD_LIBVERIFY_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -223,6 +224,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
EXCLUDE_FILES := $(LIBJAVA_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBJAVA_CFLAGS), \
MAPFILE := $(LIBJAVA_MAPFILE), \
@@ -284,6 +286,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip, \
EXCLUDES := $(LIBZIP_EXCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) \
@@ -325,6 +328,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
EXCLUDE_FILES := main.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL, \
CFLAGS_release := -DPRODUCT, \
@@ -436,6 +440,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
INCLUDE_FILES := $(BUILD_LIBJLI_FILES), \
LANG := C, \
OPTIMIZATION := HIGH, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(LIBJLI_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
@@ -537,6 +542,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNPT, \
SRC := $(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/npt \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
diff --git a/jdk/make/lib/NetworkingLibraries.gmk b/jdk/make/lib/NetworkingLibraries.gmk
index 347c32376..f826c66d0 100644
--- a/jdk/make/lib/NetworkingLibraries.gmk
+++ b/jdk/make/lib/NetworkingLibraries.gmk
@@ -65,6 +65,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
EXCLUDE_FILES := $(LIBNET_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBNET_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnet/mapfile-vers, \
diff --git a/jdk/make/lib/NioLibraries.gmk b/jdk/make/lib/NioLibraries.gmk
index 6c9c46a3f..54c9c29e0 100644
--- a/jdk/make/lib/NioLibraries.gmk
+++ b/jdk/make/lib/NioLibraries.gmk
@@ -181,6 +181,7 @@ ifeq ($(OPENJDK_TARGET_OS_API), posix)
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch/sctp, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
diff --git a/jdk/make/lib/SecurityLibraries.gmk b/jdk/make/lib/SecurityLibraries.gmk
index a8eeceb3c..6096a00a0 100644
--- a/jdk/make/lib/SecurityLibraries.gmk
+++ b/jdk/make/lib/SecurityLibraries.gmk
@@ -194,6 +194,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
@@ -239,6 +240,7 @@ ifeq ($(ENABLE_INTREE_EC), yes)
$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
LANG := C++, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS) \
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
diff --git a/jdk/make/lib/ServiceabilityLibraries.gmk b/jdk/make/lib/ServiceabilityLibraries.gmk
index 09434f14d..02fded0dc 100644
--- a/jdk/make/lib/ServiceabilityLibraries.gmk
+++ b/jdk/make/lib/ServiceabilityLibraries.gmk
@@ -83,6 +83,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) -DUSE_MMAP \
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-I$(JDK_TOPDIR)/src/share/transport/socket \
@@ -148,6 +149,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) -DJDWP_LOGGING \
-I$(JDK_TOPDIR)/src/share/transport/export \
-I$(JDK_TOPDIR)/src/share/back/export \
@@ -252,6 +254,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(LIBINSTRUMENT_CFLAGS), \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
@@ -375,6 +378,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
SRC := $(BUILD_LIBHPROF_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(BUILD_LIBHPROF_CFLAGS), \
CFLAGS_debug := -DHPROF_LOGGING, \
@@ -403,6 +407,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \
diff --git a/jdk/make/lib/SoundLibraries.gmk b/jdk/make/lib/SoundLibraries.gmk
index b59a9462e..0ea9ba843 100644
--- a/jdk/make/lib/SoundLibraries.gmk
+++ b/jdk/make/lib/SoundLibraries.gmk
@@ -201,6 +201,7 @@ ifneq ($(filter jsoundalsa, $(EXTRA_SOUND_JNI_LIBS)), )
PLATFORM_API_LinuxOS_ALSA_Ports.c, \
LANG := C, \
OPTIMIZATION := LOW, \
+ EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/os_cpu/linux_x86/vm/memcpy.cpp, \
CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
$(LIBJSOUND_CFLAGS) \
-DUSE_DAUDIO=TRUE \
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
index 4fa9f14cf..c1747608d 100644
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -281,6 +281,13 @@ define SetupNativeCompilation
ifneq (,$$(strip $$($1_INCLUDE_FILES)))
$1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
endif
+ ifeq ($(OPENJDK_TARGET_OS), linux) # only on linux
+ ifneq ($(OPENJDK_TARGET_CPU_ARCH), aarch64) # not need on the arm arch
+ ifneq (,$$(strip $$($1_EXTRA_FILES)))
+ $1_SRCS += $$($1_EXTRA_FILES)
+ endif
+ endif
+ endif
ifeq (,$$($1_SRCS))
$$(error No sources found for $1 when looking inside the dirs $$($1_SRC))
endif
--
2.19.0

View File

@ -133,7 +133,7 @@ index 5d30f2a01..b67f01719 100644
/**
* Context during upcalls to class-defined readObject methods; holds
* object currently being deserialized and descriptor for current class.
@@ -325,6 +345,33 @@ public class ObjectInputStream
@@ -325,6 +345,38 @@ public class ObjectInputStream
*/
private ObjectInputFilter serialFilter;
@ -163,6 +163,11 @@ index 5d30f2a01..b67f01719 100644
+ private static final boolean printFastSerializer = java.security.AccessController.doPrivileged(
+ new sun.security.action.GetBooleanAction(
+ "printFastSerializer")).booleanValue();
+
+ /**
+ * Magic number that is written to the stream header when using fastserilizer.
+ */
+ private static final short STREAM_MAGIC_FAST = (short)0xdeca;
+
/**
* Creates an ObjectInputStream that reads from the specified InputStream.
@ -433,10 +438,15 @@ index 6d29e3a1f..3890efc3e 100644
/** filter stream for handling block data conversion */
private final BlockDataOutputStream bout;
/** obj -> wire handle map */
@@ -214,6 +234,22 @@ public class ObjectOutputStream
@@ -214,6 +234,27 @@ public class ObjectOutputStream
new sun.security.action.GetBooleanAction(
"sun.io.serialization.extendedDebugInfo")).booleanValue();
+ /**
+ * Magic number that is written to the stream header when using fastserilizer.
+ */
+ private static final short STREAM_MAGIC_FAST = (short)0xdeca;
+
+ private static final Unsafe UNSAFE = Unsafe.getUnsafe();
+
+ /**
@ -557,7 +567,7 @@ index 64453b25a..fce3c3475 100644
+ *
+ * @return the flags for this class described by this descriptor
+ */
+ public byte getFlags(Object serialStream) {
+ byte getFlags(Object serialStream) {
+ byte flags = 0;
+ if (externalizable) {
+ flags |= ObjectStreamConstants.SC_EXTERNALIZABLE;
@ -645,22 +655,6 @@ index 64453b25a..fce3c3475 100644
/**
* Reads non-proxy class descriptor information from given input stream.
* The resulting class descriptor is not fully functional; it can only be
diff --git a/jdk/src/share/classes/java/io/ObjectStreamConstants.java b/jdk/src/share/classes/java/io/ObjectStreamConstants.java
index 23f72b436..59179a6ec 100644
--- a/jdk/src/share/classes/java/io/ObjectStreamConstants.java
+++ b/jdk/src/share/classes/java/io/ObjectStreamConstants.java
@@ -38,6 +38,11 @@ public interface ObjectStreamConstants {
*/
final static short STREAM_MAGIC = (short)0xaced;
+ /**
+ * Magic number that is written to the stream header when using fastserilizer.
+ */
+ static final short STREAM_MAGIC_FAST = (short)0xdeca;
+
/**
* Version number that is written to the stream header.
*/
diff --git a/jdk/src/share/classes/sun/misc/Unsafe.java b/jdk/src/share/classes/sun/misc/Unsafe.java
index 99e465802..92fb01669 100644
--- a/jdk/src/share/classes/sun/misc/Unsafe.java

View File

@ -0,0 +1,29 @@
From ef2c0c0a0832a07dff7f93655d64798cfd44d1ba Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Wed, 17 Mar 2021 14:31:38 +0800
Subject: [PATCH] [Huawei]fix arguments.cpp error C2131 on windows
Offering: Cloud Compiler JDK
Signed-off-by: Lin Haibing <linhaibing@huawei.com>
---
hotspot/src/share/vm/runtime/arguments.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp
index ebb5e114c..5dad53a71 100644
--- a/hotspot/src/share/vm/runtime/arguments.cpp
+++ b/hotspot/src/share/vm/runtime/arguments.cpp
@@ -2174,7 +2174,7 @@ void Arguments::set_bytecode_flags() {
void Arguments::set_boxtype_cached_max_flags() {
if (!AggressiveOpts) {
if (!FLAG_IS_DEFAULT(BoxTypeCachedMax)) {
- int size = 1024;
+ int const size = 1024;
char buffer[size];
jio_snprintf(buffer, size, "java.lang.Long.LongCache.high=" INTX_FORMAT, BoxTypeCachedMax);
add_property(buffer);
--
2.19.0

View File

@ -0,0 +1,284 @@
From f08447dcb86c2637fc306de73572c5d8de14520f Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Tue, 16 Mar 2021 10:11:31 +0800
Subject: [PATCH] [Huawei]fix log bug && enhance aes/hmac performance
Offering: Cloud Compiler JDK
Signed-off-by: He Dongbo <hedongbo@huawei.com>
---
common/autoconf/generated-configure.sh | 44 ++++++-----
common/autoconf/toolchain_windows.m4 | 20 +++--
hotspot/make/windows/makefiles/compile.make | 24 ++++++
hotspot/make/windows/makefiles/vm.make | 2 +-
hotspot/src/share/vm/runtime/os.cpp | 3 +
hotspot/src/share/vm/runtime/vm_version.cpp | 4 +
6 files changed, 74 insertions(+), 23 deletions(-)
create mode 100644 jdk/test/micro/org/openeuler/bench/security/openssl/HMacBenchmark.java
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 60298422f..bdfdd207b 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -4288,7 +4288,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
################################################################################
# The order of these defines the priority by which we try to find them.
-VALID_VS_VERSIONS="2010 2012 2013 2015 2017"
+VALID_VS_VERSIONS="2010 2012 2013 2015 2017 2019"
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
@@ -4346,6 +4346,18 @@ VS_SDK_INSTALLDIR_2017=
VS_VS_PLATFORM_NAME_2017="v141"
VS_SDK_PLATFORM_NAME_2017=
+VS_DESCRIPTION_2019="Microsoft Visual Studio 2019 - CURRENTLY NOT WORKING"
+VS_VERSION_INTERNAL_2019=141
+VS_MSVCR_2019=vcruntime140.dll
+VS_MSVCP_2019=msvcp140.dll
+VS_ENVVAR_2019="VS150COMNTOOLS"
+VS_USE_UCRT_2019="true"
+VS_VS_INSTALLDIR_2019="Microsoft Visual Studio/2019"
+VS_EDITIONS_2019="Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2019=
+VS_VS_PLATFORM_NAME_2019="v141"
+VS_SDK_PLATFORM_NAME_2019=
+
################################################################################
@@ -25694,10 +25706,10 @@ $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -25751,10 +25763,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -25790,8 +25802,6 @@ $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
fi
fi
- VS_ENV_CMD=""
-
if test "x$VS_COMNTOOLS" != x; then
if test "x$VS_ENV_CMD" = x; then
@@ -25824,10 +25834,10 @@ $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -25883,10 +25893,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -25944,10 +25954,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -26002,10 +26012,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -26059,10 +26069,10 @@ $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio instal
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
diff --git a/common/autoconf/toolchain_windows.m4 b/common/autoconf/toolchain_windows.m4
index a78f9ac66..0b5efdad2 100644
--- a/common/autoconf/toolchain_windows.m4
+++ b/common/autoconf/toolchain_windows.m4
@@ -25,7 +25,7 @@
################################################################################
# The order of these defines the priority by which we try to find them.
-VALID_VS_VERSIONS="2010 2012 2013 2015 2017"
+VALID_VS_VERSIONS="2010 2012 2013 2015 2017 2019"
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
@@ -83,6 +83,18 @@ VS_SDK_INSTALLDIR_2017=
VS_VS_PLATFORM_NAME_2017="v141"
VS_SDK_PLATFORM_NAME_2017=
+VS_DESCRIPTION_2019="Microsoft Visual Studio 2019 - CURRENTLY NOT WORKING"
+VS_VERSION_INTERNAL_2019=141
+VS_MSVCR_2019=vcruntime140.dll
+VS_MSVCP_2019=msvcp140.dll
+VS_ENVVAR_2019="VS150COMNTOOLS"
+VS_USE_UCRT_2019="true"
+VS_VS_INSTALLDIR_2019="Microsoft Visual Studio/2019"
+VS_EDITIONS_2019="Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2019=
+VS_VS_PLATFORM_NAME_2019="v141"
+VS_SDK_PLATFORM_NAME_2019=
+
################################################################################
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
@@ -107,10 +119,10 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
if test -d "$VS_BASE"; then
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat Auxiliary/Build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -198,8 +210,6 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
fi
fi
- VS_ENV_CMD=""
-
if test "x$VS_COMNTOOLS" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
[$VS_COMNTOOLS/../..], [$VS_COMNTOOLS_VAR variable])
diff --git a/hotspot/make/windows/makefiles/compile.make b/hotspot/make/windows/makefiles/compile.make
index a405eb336..e5aed4418 100644
--- a/hotspot/make/windows/makefiles/compile.make
+++ b/hotspot/make/windows/makefiles/compile.make
@@ -54,6 +54,9 @@ CXX=cl.exe
# These are always used in all compiles
CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /WX /GS
+!if "$(MSC_VER)" > "1910"
+CXX_FLAGS=$(EXTRA_CFLAGS) /nologo /W3 /GS /arch:IA32
+!endif
# Let's add debug information when Full Debug Symbols is enabled
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
@@ -308,6 +317,21 @@ MT=mt.exe
SAFESEH_FLAG = /SAFESEH
!endif
+!if "$(COMPILER_NAME)" == "VS2019"
+PRODUCT_OPT_OPTION = /O2 /Oy-
+FASTDEBUG_OPT_OPTION = /O2 /Oy-
+DEBUG_OPT_OPTION = /Od
+GX_OPTION = /EHsc
+LD_FLAGS = /manifest $(LD_FLAGS)
+MP_FLAG = /MP
+# Manifest Tool - used in VS2005 and later to adjust manifests stored
+# as resources inside build artifacts.
+!if "x$(MT)" == "x"
+MT=mt.exe
+!endif
+SAFESEH_FLAG = /SAFESEH
+!endif
+
!if "$(BUILDARCH)" == "i486"
LD_FLAGS = $(SAFESEH_FLAG) $(LD_FLAGS)
!endif
diff --git a/hotspot/make/windows/makefiles/vm.make b/hotspot/make/windows/makefiles/vm.make
index 082232719..b46354a5e 100644
--- a/hotspot/make/windows/makefiles/vm.make
+++ b/hotspot/make/windows/makefiles/vm.make
@@ -129,7 +129,7 @@ CXX_DONT_USE_PCH=/D DONT_USE_PRECOMPILED_HEADER
!if "$(USE_PRECOMPILED_HEADER)" != "0"
CXX_USE_PCH=/Fp"vm.pch" /Yu"precompiled.hpp"
-!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017"
+!if "$(COMPILER_NAME)" == "VS2012" || "$(COMPILER_NAME)" == "VS2013" || "$(COMPILER_NAME)" == "VS2015" || "$(COMPILER_NAME)" == "VS2017" || "$(COMPILER_NAME)" == "VS2019"
# VS2012 and later require this object file to be listed:
LD_FLAGS=$(LD_FLAGS) _build_pch_file.obj
!endif
diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp
index f5182ea75..3242c6666 100644
--- a/hotspot/src/share/vm/runtime/os.cpp
+++ b/hotspot/src/share/vm/runtime/os.cpp
@@ -67,6 +67,9 @@
#ifdef TARGET_OS_FAMILY_bsd
# include "os_bsd.inline.hpp"
#endif
+#ifndef _MSC_VER
+#define _MSC_VER 1916
+#endif
# include <signal.h>
diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp
index fd37b8345..480459921 100644
--- a/hotspot/src/share/vm/runtime/vm_version.cpp
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp
@@ -231,6 +231,8 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
#define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)"
#elif _MSC_VER == 1900
#define HOTSPOT_BUILD_COMPILER "MS VC++ 14.0 (VS2015)"
+ #elif _MSC_VER == 1910
+ #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.0 (VS2017)"
#elif _MSC_VER == 1911
#define HOTSPOT_BUILD_COMPILER "MS VC++ 15.3 (VS2017)"
#elif _MSC_VER == 1912
--
2.19.0

View File

@ -1,30 +0,0 @@
diff --git a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
index 8d59c6af..29d4f0f9 100644
--- a/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
+++ b/jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
@@ -52,7 +52,7 @@ public class VerifyCACerts {
+ File.separator + "security" + File.separator + "cacerts";
// The numbers of certs now.
- private static final int COUNT = 95;
+ private static final int COUNT = 90;
// SHA-256 of cacerts, can be generated with
// shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95
@@ -126,16 +126,6 @@ public class VerifyCACerts {
"A4:31:0D:50:AF:18:A6:44:71:90:37:2A:86:AF:AF:8B:95:1F:FB:43:1D:83:7F:1E:56:88:B4:59:71:ED:15:57");
put("thawteprimaryrootcag3 [jdk]",
"4B:03:F4:58:07:AD:70:F2:1B:FC:2C:AE:71:C9:FD:E4:60:4C:06:4C:F5:FF:B6:86:BA:E5:DB:AA:D7:FD:D3:4C");
- put("thawtepremiumserverca [jdk]",
- "3F:9F:27:D5:83:20:4B:9E:09:C8:A3:D2:06:6C:4B:57:D3:A2:47:9C:36:93:65:08:80:50:56:98:10:5D:BC:E9");
- put("verisigntsaca [jdk]",
- "CB:6B:05:D9:E8:E5:7C:D8:82:B1:0B:4D:B7:0D:E4:BB:1D:E4:2B:A4:8A:7B:D0:31:8B:63:5B:F6:E7:78:1A:9D");
- put("verisignclass2g2ca [jdk]",
- "3A:43:E2:20:FE:7F:3E:A9:65:3D:1E:21:74:2E:AC:2B:75:C2:0F:D8:98:03:05:BC:50:2C:AF:8C:2D:9B:41:A1");
- put("verisignclass3ca [jdk]",
- "A4:B6:B3:99:6F:C2:F3:06:B3:FD:86:81:BD:63:41:3D:8C:50:09:CC:4F:A3:29:C2:CC:F0:E2:FA:1B:14:03:05");
- put("verisignclass3g2ca [jdk]",
- "83:CE:3C:12:29:68:8A:59:3D:48:5F:81:97:3C:0F:91:95:43:1E:DA:37:CC:5E:36:43:0E:79:C7:A8:88:63:8B");
put("verisignuniversalrootca [jdk]",
"23:99:56:11:27:A5:71:25:DE:8C:EF:EA:61:0D:DF:2F:A0:78:B5:C8:06:7F:4E:82:82:90:BF:B8:60:E8:4B:3C");
put("verisignclass3g3ca [jdk]",

View File

@ -148,7 +148,7 @@
# Define old aarch64/jdk8u tree variables for compatibility
%global project aarch64-port
%global repo jdk8u-shenandoah
%global revision aarch64-shenandoah-jdk8u282-b08
%global revision aarch64-shenandoah-jdk8u292-b10
%global full_revision %{project}-%{repo}-%{revision}
# Define IcedTea version used for SystemTap tapsets and desktop files
%global icedteaver 3.15.0
@ -976,9 +976,7 @@ Source14: TestECDSA.java
Source20: repackReproduciblePolycies.sh
Patch8: replace-vector-to-improve-performance-of-xml.validat.patch
Patch9: AARCH64-fix-itable-stub-code-size-limit.patch
Patch10: 8221658.patch
Patch12: add-debuginfo-for-libsaproc-on-aarch64.patch
Patch18: fix-vendor-info.patch
Patch21: 8202952.patch
Patch24: 8134883.patch
@ -995,10 +993,7 @@ Patch35: 8186042.patch
Patch36: 8060463.patch
Patch37: 8131600.patch
Patch38: 8138971.patch
Patch40: 8129626.patch
Patch41: 8203699.patch
Patch45: 8191129.patch
Patch46: 8182036.patch
Patch47: 8166197.patch
Patch50: 8158946.patch
Patch51: add-with-company-name-option.patch
@ -1012,11 +1007,9 @@ Patch70: 8164948.patch
Patch72: inline-optimize-for-aarch64.patch
# 8u242
Patch74: 8191915.patch
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
@ -1041,7 +1034,6 @@ Patch103: Ddot-intrinsic-implement.patch
Patch104: 8234003.patch
Patch105: 8220159.patch
Patch106: fast-serializer-jdk8.patch
Patch107: 6896810.patch
Patch108: 8231631.patch
Patch109: Test8167409.sh-fails-to-run-with-32bit-jdk-on-64bit-.patch
Patch112: 8048210-8056152.patch
@ -1058,7 +1050,6 @@ Patch125: Extend-CDS-to-support-app-class-metadata-sharing.patch
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
@ -1066,30 +1057,26 @@ 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
Patch163: fix_VerifyCerts.java_testcase_bug.patch
Patch164: src-openeuler-openjdk-1.8.0-resolve-code-inconsistencies.patch
Patch163: Fixed-a-copyright-writing-problem.patch
Patch164: fix-arguments.cpp-error-C2131-on-windows.patch
Patch165: 818172_overflow_when_strength_reducing_interger_multiply.patch
Patch166: add-missing-test-case.patch
Patch167: fix-BoxTypeCachedMax-build-failure-when-jvm-variants.patch
@ -1098,6 +1085,24 @@ Patch169: Code-style-fix.patch
Patch170: kae-phase2.patch
Patch171: add-kaeEngine-to-rsa.patch
# 8u292
Patch172: 8031818.patch
Patch173: 8193518.patch
Patch174: Disable-ddot-intrinsic-on-CPUs-that-not-suppo.patch
Patch175: add-appcds-jtreg-test-case-UnusedCPDuringDump.patch
Patch176: add-safe-compilation-flags.patch
Patch177: downgrade-symver-of-memcpy-GLIBC.patch
Patch178: fix-log-bug-enhance-aes-hmac-performance.patch
Patch179: keep-the-binary-equal.patch
Patch180: link-option-use-rpath-instead-of-runpath.patch
Patch181: remove-gnu-debuglink-when-using-enable-debug-.patch
Patch183: revert-windows-bugfix.patch
Patch184: set-vm.vendor-by-configure.patch
Patch185: update-cacerts-and-VerifyCACerts.java-test.patch
Patch186: update-to-keep-same-with-master.patch
Patch187: 8182036.patch
#############################################
#
# Upstreamable patches
@ -1433,9 +1438,7 @@ pushd %{top_level_dir_name}
# OpenJDK patches
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch12 -p1
%patch18 -p1
%patch21 -p1
%patch24 -p1
@ -1452,10 +1455,7 @@ pushd %{top_level_dir_name}
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch40 -p1
%patch41 -p1
%patch45 -p1
%patch46 -p1
%patch47 -p1
%patch50 -p1
%patch51 -p1
@ -1467,11 +1467,9 @@ pushd %{top_level_dir_name}
%patch68 -p1
%patch70 -p1
%patch72 -p1
%patch74 -p1
%patch75 -p1
%patch76 -p1
%patch77 -p1
%patch78 -p1
%patch83 -p1
%patch85 -p1
%patch86 -p1
@ -1490,7 +1488,6 @@ pushd %{top_level_dir_name}
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch112 -p1
@ -1505,7 +1502,6 @@ pushd %{top_level_dir_name}
%patch124 -p1
%patch125 -p1
%patch127 -p1
%patch129 -p1
%patch133 -p1
%patch134 -p1
%patch138 -p1
@ -1513,20 +1509,16 @@ pushd %{top_level_dir_name}
%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
@ -1542,6 +1534,21 @@ pushd %{top_level_dir_name}
%patch169 -p1
%patch170 -p1
%patch171 -p1
%patch172 -p1
%patch173 -p1
%patch174 -p1
%patch175 -p1
%patch176 -p1
%patch177 -p1
%patch178 -p1
%patch179 -p1
%patch180 -p1
%patch181 -p1
%patch183 -p1
%patch184 -p1
%patch185 -p1
%patch186 -p1
%patch187 -p1
popd
@ -2159,6 +2166,10 @@ require "copy_jdk_configs.lua"
%endif
%changelog
* Tue Apr 20 2021 eapen <zhangyipeng7@huawei.com> - 1:1.8.0.292-b10.0
- update to jdk8u292-b10
- split sync-patch to multi patches
* Wed May 19 2021 Noah <hedongbo@huawei.com> - 1:1.8.0.282-b08.19
- add add-kaeEngine-to-rsa.patch

133
keep-the-binary-equal.patch Normal file
View File

@ -0,0 +1,133 @@
From c31020cc5a6f503739cb6998ab2b8b9f8440e3c9 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Thu, 4 Mar 2021 09:16:31 +0800
Subject: [PATCH] [Huawei]keep the binary equal
Offering: Cloud Compiler JDK
Signed-off-by: Zhou Yong <zhouyong44@huawei.com>
---
common/autoconf/flags.m4 | 2 +-
common/autoconf/generated-configure.sh | 2 +-
.../com/sun/tools/corba/se/idl/toJavaPortable/Util.java | 3 ---
.../share/classes/com/sun/tools/corba/se/logutil/MC.java | 1 -
jdk/make/CompileLaunchers.gmk | 6 +++---
jdk/make/lib/CoreLibraries.gmk | 2 +-
.../build/tools/generatecharacter/GenerateCharacter.java | 3 ---
7 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4
index 077efa297..838a76734 100644
--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -686,7 +686,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
fi
# TODO: make -debug optional "--disable-full-debug-symbols"
- LDFLAGS_JDK="$LDFLAGS_JDK -debug"
+ LDFLAGS_JDK="$LDFLAGS_JDK"
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
LDFLAGS_JDKLIB_SUFFIX=""
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 93d0fbdcb..03872a3c9 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -42154,7 +42154,7 @@ $as_echo "$supports" >&6; }
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
fi
# TODO: make -debug optional "--disable-full-debug-symbols"
- LDFLAGS_JDK="$LDFLAGS_JDK -debug"
+ LDFLAGS_JDK="$LDFLAGS_JDK"
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
LDFLAGS_JDKLIB_SUFFIX=""
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
index 7e0d8373d..b5da891d6 100644
--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
+++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java
@@ -1129,7 +1129,6 @@ public class Util extends com.sun.tools.corba.se.idl.Util
Util.getMessage ("Version.product", Util.getMessage ("Version.number"))));
// <d48911> Do not introduce invalid escape characters into comment! <daz>
//stream.println ("* " + Util.getMessage ("toJavaProlog2", Compile.compiler.arguments.file));
- stream.println ("* " + Util.getMessage ("toJavaProlog2", Compile.compiler.arguments.file.replace (File.separatorChar, '/')));
///////////////
// This SHOULD work, but there's a bug in the JDK.
@@ -1146,8 +1145,6 @@ public class Util extends com.sun.tools.corba.se.idl.Util
else
formatter.setTimeZone (java.util.TimeZone.getDefault ());
- stream.println ("* " + formatter.format (new Date ()));
-
// <daz>
///////////////
diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java
index b2fd98a52..1a6f80359 100644
--- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java
+++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java
@@ -154,7 +154,6 @@ public class MC {
groupName);
pw.println("//");
pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION);
- pw.printMsg("// Generated from input file @ on @", inFile, new Date());
pw.println();
}
diff --git a/jdk/make/CompileLaunchers.gmk b/jdk/make/CompileLaunchers.gmk
index 9bd19ae91..baaea8a99 100644
--- a/jdk/make/CompileLaunchers.gmk
+++ b/jdk/make/CompileLaunchers.gmk
@@ -490,9 +490,9 @@ UNPACKEXE_DEBUG_SYMBOLS := true
# It's also linked incrementally, producing a .ilk file that needs to
# be kept away.
ifeq ($(OPENJDK_TARGET_OS), windows)
- BUILD_UNPACKEXE_LDEXE := $(CC)
+ BUILD_UNPACKEXE_LDEXE := $(LD)
EXE_OUT_OPTION_save := $(EXE_OUT_OPTION)
- EXE_OUT_OPTION := -Fe
+ EXE_OUT_OPTION := -out:
# With the current way unpack200 is built, debug symbols aren't supported
# anyway.
UNPACKEXE_DEBUG_SYMBOLS :=
@@ -520,7 +520,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
CFLAGS_macosx := -fPIC, \
MAPFILE := $(UNPACK_MAPFILE),\
LDFLAGS := $(UNPACKEXE_ZIPOBJS), \
- LDFLAGS_windows := $(CXXFLAGS_JDKEXE), \
+ LDFLAGS_windows := -incremental, \
LDFLAGS_posix := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk
index 75886a628..afcebcb35 100644
--- a/jdk/make/lib/CoreLibraries.gmk
+++ b/jdk/make/lib/CoreLibraries.gmk
@@ -331,7 +331,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
- LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
+ LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
diff --git a/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java b/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java
index 83973ef07..fc33a4ef9 100644
--- a/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java
+++ b/jdk/make/src/classes/build/tools/generatecharacter/GenerateCharacter.java
@@ -691,9 +691,6 @@ OUTER: for (int i = 0; i < n; i += m) {
throws FileNotFoundException, IOException {
BufferedReader in = new BufferedReader(new FileReader(theTemplateFileName));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(theOutputFileName)));
- out.println(commentStart +
- " This file was generated AUTOMATICALLY from a template file " +
- new java.util.Date() + commentEnd);
int marklen = commandMarker.length();
LOOP: while(true) {
try {
--
2.19.0

View File

@ -0,0 +1,43 @@
From 0fa7d25d938ba1af326ca2564c9f4498604fb190 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Thu, 4 Mar 2021 10:07:43 +0800
Subject: [PATCH] [Huawei]link option use rpath instead of runpath
Offering: Cloud Compiler JDK
Signed-off-by: Sun Jianye <sunjianye@huawei.com>
---
common/autoconf/flags.m4 | 2 +-
common/autoconf/generated-configure.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4
index a8a938072..c920ca2a2 100644
--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -170,7 +170,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
else
# Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared'
- SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1'
+ SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1 -Xlinker --disable-new-dtags'
SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1'
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1'
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index b8ae42603..3b2b51f6f 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -41288,7 +41288,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
else
# Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared'
- SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
+ SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1 -Xlinker --disable-new-dtags'
SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
--
2.19.0

View File

@ -0,0 +1,69 @@
From 39774b66e6b962a89a02504f08c20b309f9eef1f Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Thu, 4 Mar 2021 10:10:30 +0800
Subject: [PATCH] [Huawei]remove gnu debuglink when using enable debug
symbols
Offering: Cloud Compiler JDK
Signed-off-by: Sun Jianye <sunjianye@huawei.com>
---
hotspot/make/linux/makefiles/jsig.make | 1 -
hotspot/make/linux/makefiles/saproc.make | 1 -
hotspot/make/linux/makefiles/vm.make | 1 -
make/common/NativeCompilation.gmk | 2 +-
4 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/hotspot/make/linux/makefiles/jsig.make b/hotspot/make/linux/makefiles/jsig.make
index 6290db5af..9838a50aa 100644
--- a/hotspot/make/linux/makefiles/jsig.make
+++ b/hotspot/make/linux/makefiles/jsig.make
@@ -63,7 +63,6 @@ $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
- $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make
index ffc0ec5ce..dfeb254da 100644
--- a/hotspot/make/linux/makefiles/saproc.make
+++ b/hotspot/make/linux/makefiles/saproc.make
@@ -107,7 +107,6 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
- $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
diff --git a/hotspot/make/linux/makefiles/vm.make b/hotspot/make/linux/makefiles/vm.make
index 1985db071..408b0cc9d 100644
--- a/hotspot/make/linux/makefiles/vm.make
+++ b/hotspot/make/linux/makefiles/vm.make
@@ -359,7 +359,6 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
ifneq ($(STRIP_POLICY),no_strip)
$(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
- $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
endif
ifeq ($(STRIP_POLICY),all_strip)
$(QUIETLY) $(STRIP) $@
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
index 9980e8ab9..4fa9f14cf 100644
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -487,7 +487,7 @@ define SetupNativeCompilation
$$($1_DEBUGINFO_FILES): $$($1_TARGET)
$(RM) $$@
$(OBJCOPY) --only-keep-debug $$< $$@
- $(CD) $$(@D) && $(OBJCOPY) --add-gnu-debuglink=$$(@F) $$<
+ $(CD) $$(@D)
$(TOUCH) $$@
endif
endif # No MacOS X support
--
2.19.0

View File

@ -0,0 +1,62 @@
From 8ede718dfa4b52c8565eead7e360822a2759bd34 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Tue, 16 Mar 2021 09:11:27 +0800
Subject: [PATCH] [Huawei]revert windows bugfix
Offering: Cloud Compiler JDK
Signed-off-by: Lin Haibing <linhaibing@huawei.com>
---
hotspot/make/windows/create_obj_files.sh | 4 ++--
.../share/vm/gc_implementation/shared/owstTaskTerminator.cpp | 3 +--
jdk/make/lib/ServiceabilityLibraries.gmk | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hotspot/make/windows/create_obj_files.sh b/hotspot/make/windows/create_obj_files.sh
index 5449d866a..ad734bebd 100644
--- a/hotspot/make/windows/create_obj_files.sh
+++ b/hotspot/make/windows/create_obj_files.sh
@@ -113,8 +113,8 @@ case "${TYPE}" in
"shark") Src_Dirs="${BASE_PATHS}" ;;
esac
-COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp c2_* runtime_*"
-COMPILER1_SPECIFIC_FILES="c1_*"
+COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp c2_* runtime_* shenandoahBarrierSetC2.cpp shenandoahSupport.cpp"
+COMPILER1_SPECIFIC_FILES="c1_* shenandoahBarrierSetC1.cpp"
SHARK_SPECIFIC_FILES="shark"
ZERO_SPECIFIC_FILES="zero"
diff --git a/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp
index 90f490272..181628567 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp
@@ -21,10 +21,9 @@
*
*/
+#include "precompiled.hpp"
#include "owstTaskTerminator.hpp"
-#include "precompiled/precompiled.hpp"
-
bool OWSTTaskTerminator::exit_termination(size_t tasks, TerminatorTerminator* terminator) {
return tasks > 0 || (terminator != NULL && terminator->should_exit_termination());
}
diff --git a/jdk/make/lib/ServiceabilityLibraries.gmk b/jdk/make/lib/ServiceabilityLibraries.gmk
index 5a58b3a35..02fded0dc 100644
--- a/jdk/make/lib/ServiceabilityLibraries.gmk
+++ b/jdk/make/lib/ServiceabilityLibraries.gmk
@@ -299,7 +299,7 @@ endif
BUILD_LIBMANAGEMENT_EXCLUDES :=
-BUILD_LIBMANAGEMENT_CFLAGS += -I$(JDK_TOPDIR)/src/share/native/sun/management
+BUILD_LIBMANAGEMENT_CFLAGS += -I$(JDK_TOPDIR)/src/share/native/sun/management -DPSAPI_VERSION=1
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
--
2.19.0

View File

@ -0,0 +1,56 @@
From 7eaf2a172d905fb80466daea7a02265eaa58b0c8 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Thu, 4 Mar 2021 11:26:22 +0800
Subject: [PATCH] [Huawei]set vm.vendor by configure
Offering: Cloud Compiler JDK
Signed-off-by: Guo Ge <ge.guo@huawei.com>
---
hotspot/src/share/vm/runtime/vm_version.cpp | 7 ++++++-
jdk/src/share/native/java/lang/System.c | 6 +++---
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp
index c6a559521..5ee3a7942 100644
--- a/hotspot/src/share/vm/runtime/vm_version.cpp
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp
@@ -142,7 +142,12 @@ const char* Abstract_VM_Version::vm_name() {
const char* Abstract_VM_Version::vm_vendor() {
- return "Huawei Technologies Co., Ltd";
+#ifdef VENDOR
+ return VENDOR;
+#else
+ return JDK_Version::is_gte_jdk17x_version() ?
+ "Oracle Corporation" : "Sun Microsystems Inc.";
+#endif
}
diff --git a/jdk/src/share/native/java/lang/System.c b/jdk/src/share/native/java/lang/System.c
index 758cfabb3..ff80b0abd 100644
--- a/jdk/src/share/native/java/lang/System.c
+++ b/jdk/src/share/native/java/lang/System.c
@@ -110,13 +110,13 @@ Java_java_lang_System_identityHashCode(JNIEnv *env, jobject this, jobject x)
/* Third party may overwrite these values. */
#ifndef VENDOR
-#define VENDOR "Huawei Technologies Co., Ltd"
+#define VENDOR "Oracle Corporation"
#endif
#ifndef VENDOR_URL
-#define VENDOR_URL "http://jdk.rnd.huawei.com/"
+#define VENDOR_URL "http://java.oracle.com/"
#endif
#ifndef VENDOR_URL_BUG
-#define VENDOR_URL_BUG "http://jdk.rnd.huawei.com/"
+#define VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/"
#endif
#define JAVA_MAX_SUPPORTED_VERSION 52
--
2.19.0

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,32 @@
From 00a5f242451e72d32e29156bb132ceb4b78cf719 Mon Sep 17 00:00:00 2001
Date: Tue, 26 Jan 2021 16:46:28 +0800
Subject: delete untrustworthy cacert files
From 1125b6be8c484b41b46954a38b6e01861157b6d7 Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Tue, 20 Apr 2021 10:40:35 +0800
Subject: [PATCH] [Huawei]update cacerts and VerifyCACerts.java test
Summary: <JDK> : delete untrustworthy cacert files
LLT: jtreg -nr -va jdk/test/sun/security/lib/cacerts/VerifyCACerts.java
Bug url: NA
Offering: Cloud Compiler JDK
Signed-off-by: Wang Kun <wangkun49@huawei.com>
---
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(-)
jdk/make/data/cacerts/addtrustexternalca | 32 -----------------
jdk/make/data/cacerts/addtrustqualifiedca | 32 -----------------
jdk/make/data/cacerts/luxtrustglobalrootca | 28 ---------------
jdk/make/data/cacerts/quovadisrootca | 41 ----------------------
jdk/make/data/cacerts/thawtepremiumserverca | 27 --------------
jdk/make/data/cacerts/utnuserfirstobjectca | 33 -----------------
jdk/make/data/cacerts/verisigntsaca | 24 -------------
.../sun/security/lib/cacerts/VerifyCACerts.java | 40 ++-------------------
8 files changed, 3 insertions(+), 254 deletions(-)
delete mode 100644 jdk/make/data/cacerts/addtrustexternalca
delete mode 100644 jdk/make/data/cacerts/addtrustqualifiedca
delete mode 100644 jdk/make/data/cacerts/luxtrustglobalrootca
delete mode 100644 jdk/make/data/cacerts/quovadisrootca
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
index ad84cad..0000000
--- a/jdk/make/data/cacerts/addtrustexternalca
+++ /dev/null
@@ -1,32 +0,0 @@
@ -60,7 +64,7 @@ index ad84cad96..000000000
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/addtrustqualifiedca b/jdk/make/data/cacerts/addtrustqualifiedca
deleted file mode 100644
index 0c62d44c7..000000000
index 0c62d44..0000000
--- a/jdk/make/data/cacerts/addtrustqualifiedca
+++ /dev/null
@@ -1,32 +0,0 @@
@ -96,9 +100,90 @@ index 0c62d44c7..000000000
-iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
-xqE=
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/luxtrustglobalrootca b/jdk/make/data/cacerts/luxtrustglobalrootca
deleted file mode 100644
index 7fb3d81..0000000
--- a/jdk/make/data/cacerts/luxtrustglobalrootca
+++ /dev/null
@@ -1,28 +0,0 @@
-Owner: CN=LuxTrust Global Root, O=LuxTrust s.a., C=LU
-Issuer: CN=LuxTrust Global Root, O=LuxTrust s.a., C=LU
-Serial number: bb8
-Valid from: Thu Mar 17 09:51:37 GMT 2011 until: Wed Mar 17 09:51:37 GMT 2021
-Signature algorithm name: SHA256withRSA
-Subject Public Key Algorithm: 2048-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIDZDCCAkygAwIBAgICC7gwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCTFUx
-FjAUBgNVBAoTDUx1eFRydXN0IHMuYS4xHTAbBgNVBAMTFEx1eFRydXN0IEdsb2Jh
-bCBSb290MB4XDTExMDMxNzA5NTEzN1oXDTIxMDMxNzA5NTEzN1owRDELMAkGA1UE
-BhMCTFUxFjAUBgNVBAoTDUx1eFRydXN0IHMuYS4xHTAbBgNVBAMTFEx1eFRydXN0
-IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsn+n
-QPAiygz267Hxyw6VV0B1r6A/Ps7sqjJX5hmxZ0OYWmt8s7j6eJyqpoSyYBuAQc5j
-zR8XCJmk9e8+EsdMsFeaXHhAePxFjdqRZ9w6Ubltc+a3OY52OrQfBfVpVfmTz3iI
-Sr6qm9d7R1tGBEyCFqY19vx039a0r9jitScRdFmiwmYsaArhmIiIPIoFdRTjuK7z
-CISbasE/MRivJ6VLm6T9eTHemD0OYcqHmMH4ijCc+j4z1aXEAwfh95Z0GAAnOCfR
-K6qq4UFFi2/xJcLcopeVx0IUM115hCNq52XAV6DYXaljAeew5Ivo+MVjuOVsdJA9
-x3f8K7p56aTGEnin/wIDAQABo2AwXjAMBgNVHRMEBTADAQH/MA4GA1UdDwEB/wQE
-AwIBBjAfBgNVHSMEGDAWgBQXFYWJCS8kh28/HRvk8pZ5g0gTzjAdBgNVHQ4EFgQU
-FxWFiQkvJIdvPx0b5PKWeYNIE84wDQYJKoZIhvcNAQELBQADggEBAFrwHNDUUM9B
-fua4nX3DcNBeNv9ujnov3kgR1TQuPLdFwlQlp+HBHjeDtpSutkVIA+qVvuucarQ3
-XB8u02uCgUNbCj8RVWOs+nwIAjegPDkEM/6XMshS5dklTbDG7mgfcKpzzlcD3H0K
-DTPy0lrfCmw7zBFRlxqkIaKFNQLXgCLShLL4wKpov9XrqsMLq6F8K/f1O4fhVFfs
-BSTveUJO84ton+Ruy4KZycwq3FPCH3CDqyEPVrRI/98HIrOM+R2mBN8tAza53W/+
-MYhm/2xtRDSvCHc+JtJy9LtHVpM8mGPhM7uZI5K1g3noHZ9nrWLWidb2/CfeMifL
-hNp3hSGhEiE=
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/quovadisrootca b/jdk/make/data/cacerts/quovadisrootca
deleted file mode 100644
index 0c195ff..0000000
--- a/jdk/make/data/cacerts/quovadisrootca
+++ /dev/null
@@ -1,41 +0,0 @@
-Owner: CN=QuoVadis Root Certification Authority, OU=Root Certification Authority, O=QuoVadis Limited, C=BM
-Issuer: CN=QuoVadis Root Certification Authority, OU=Root Certification Authority, O=QuoVadis Limited, C=BM
-Serial number: 3ab6508b
-Valid from: Mon Mar 19 18:33:33 GMT 2001 until: Wed Mar 17 18:33:33 GMT 2021
-Signature algorithm name: SHA1withRSA
-Subject Public Key Algorithm: 2048-bit RSA key
-Version: 3
------BEGIN CERTIFICATE-----
-MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJC
-TTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0
-aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAzMTkxODMzMzNaFw0yMTAzMTcxODMz
-MzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUw
-IwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQDEyVR
-dW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Yp
-li4kVEAkOPcahdxYTMukJ0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2D
-rOpm2RgbaIr1VxqYuvXtdj182d6UajtLF8HVj71lODqV0D1VNk7feVcxKh7YWWVJ
-WCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeLYzcS19Dsw3sgQUSj7cug
-F+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWenAScOospU
-xbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCC
-Ak4wPQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVv
-dmFkaXNvZmZzaG9yZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREw
-ggENMIIBCQYJKwYBBAG+WAABMIH7MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNl
-IG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmljYXRlIGJ5IGFueSBwYXJ0eSBh
-c3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJsZSBzdGFuZGFy
-ZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
-Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYI
-KwYBBQUHAgEWFmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3T
-KbkGGew5Oanwl4Rqy+/fMIGuBgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rq
-y+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBMaW1p
-dGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYD
-VQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6tlCL
-MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSk
-fnIYj9lofFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf8
-7C9TqnN7Az10buYWnuulLsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1R
-cHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2xgI4JVrmcGmD+XcHXetwReNDWXcG31a0y
-mQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi5upZIof4l/UO/erMkqQW
-xFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi5nrQNiOK
-SnQ2+Q==
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/thawtepremiumserverca b/jdk/make/data/cacerts/thawtepremiumserverca
deleted file mode 100644
index 2df456ab0..000000000
index 2df456a..0000000
--- a/jdk/make/data/cacerts/thawtepremiumserverca
+++ /dev/null
@@ -1,27 +0,0 @@
@ -131,7 +216,7 @@ index 2df456ab0..000000000
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/utnuserfirstobjectca b/jdk/make/data/cacerts/utnuserfirstobjectca
deleted file mode 100644
index 80a0b5c23..000000000
index 80a0b5c..0000000
--- a/jdk/make/data/cacerts/utnuserfirstobjectca
+++ /dev/null
@@ -1,33 +0,0 @@
@ -170,7 +255,7 @@ index 80a0b5c23..000000000
------END CERTIFICATE-----
diff --git a/jdk/make/data/cacerts/verisigntsaca b/jdk/make/data/cacerts/verisigntsaca
deleted file mode 100644
index 9813ddaea..000000000
index 9813dda..0000000
--- a/jdk/make/data/cacerts/verisigntsaca
+++ /dev/null
@@ -1,24 +0,0 @@
@ -199,27 +284,25 @@ index 9813ddaea..000000000
-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
index dd107fc..791ddb6 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 {
@@ -53,12 +53,12 @@ public class VerifyCACerts {
+ File.separator + "security" + File.separator + "cacerts";
// The numbers of certs now.
- private static final int COUNT = 97;
+ private static final int COUNT = 90;
// 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";
- = "9F:6B:41:1D:05:AF:E3:C5:4F:E8:39:89:50:79:60:B1:F6:A4:02:40:0C:28:8D:73:78:08:E5:61:7C:17:EA:59";
+ = "DC:22:7E:D7:F3:46:1F:8B:A8:4E:EE:C2:A8:4B:8E:26:89:4F:95:5C:71:A3:1B:5A:6E:A6:48:FD:CB:C9:F2:95";
// map of cert alias to SHA-256 fingerprint
@SuppressWarnings("serial")
@@ -93,12 +92,6 @@ public class VerifyCACerts {
@@ -93,12 +93,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");
@ -232,7 +315,35 @@ index 1f443381c..29d4f0f97 100644
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 {
@@ -133,16 +127,6 @@ public class VerifyCACerts {
"A4:31:0D:50:AF:18:A6:44:71:90:37:2A:86:AF:AF:8B:95:1F:FB:43:1D:83:7F:1E:56:88:B4:59:71:ED:15:57");
put("thawteprimaryrootcag3 [jdk]",
"4B:03:F4:58:07:AD:70:F2:1B:FC:2C:AE:71:C9:FD:E4:60:4C:06:4C:F5:FF:B6:86:BA:E5:DB:AA:D7:FD:D3:4C");
- put("thawtepremiumserverca [jdk]",
- "3F:9F:27:D5:83:20:4B:9E:09:C8:A3:D2:06:6C:4B:57:D3:A2:47:9C:36:93:65:08:80:50:56:98:10:5D:BC:E9");
- put("verisigntsaca [jdk]",
- "CB:6B:05:D9:E8:E5:7C:D8:82:B1:0B:4D:B7:0D:E4:BB:1D:E4:2B:A4:8A:7B:D0:31:8B:63:5B:F6:E7:78:1A:9D");
- put("verisignclass2g2ca [jdk]",
- "3A:43:E2:20:FE:7F:3E:A9:65:3D:1E:21:74:2E:AC:2B:75:C2:0F:D8:98:03:05:BC:50:2C:AF:8C:2D:9B:41:A1");
- put("verisignclass3ca [jdk]",
- "A4:B6:B3:99:6F:C2:F3:06:B3:FD:86:81:BD:63:41:3D:8C:50:09:CC:4F:A3:29:C2:CC:F0:E2:FA:1B:14:03:05");
- put("verisignclass3g2ca [jdk]",
- "83:CE:3C:12:29:68:8A:59:3D:48:5F:81:97:3C:0F:91:95:43:1E:DA:37:CC:5E:36:43:0E:79:C7:A8:88:63:8B");
put("verisignuniversalrootca [jdk]",
"23:99:56:11:27:A5:71:25:DE:8C:EF:EA:61:0D:DF:2F:A0:78:B5:C8:06:7F:4E:82:82:90:BF:B8:60:E8:4B:3C");
put("verisignclass3g3ca [jdk]",
@@ -163,10 +147,6 @@ public class VerifyCACerts {
"5D:56:49:9B:E4:D2:E0:8B:CF:CA:D0:8A:3E:38:72:3D:50:50:3B:DE:70:69:48:E4:2F:55:60:30:19:E5:28:AE");
put("letsencryptisrgx1 [jdk]",
"96:BC:EC:06:26:49:76:F3:74:60:77:9A:CF:28:C5:A7:CF:E8:A3:C0:AA:E1:1A:8F:FC:EE:05:C0:BD:DF:08:C6");
- put("luxtrustglobalrootca [jdk]",
- "A1:B2:DB:EB:64:E7:06:C6:16:9E:3C:41:18:B2:3B:AA:09:01:8A:84:27:66:6D:8B:F0:E2:88:91:EC:05:19:50");
- put("quovadisrootca [jdk]",
- "A4:5E:DE:3B:BB:F0:9C:8A:E1:5C:72:EF:C0:72:68:D6:93:A2:1C:99:6F:D5:1E:67:CA:07:94:60:FD:6D:88:73");
put("quovadisrootca1g3 [jdk]",
"8A:86:6F:D1:B2:76:B5:7E:57:8E:92:1C:65:82:8A:2B:ED:58:E9:F2:F2:88:05:41:34:B7:F1:F4:BF:C9:CC:74");
put("quovadisrootca2 [jdk]",
@@ -267,21 +247,7 @@ public class VerifyCACerts {
@SuppressWarnings("serial")
private static final HashSet<String> EXPIRY_EXC_ENTRIES = new HashSet<String>() {
{
@ -247,15 +358,14 @@ index 1f443381c..29d4f0f97 100644
- // 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]");
- add("luxtrustglobalrootca [jdk]");
- // Valid until: Wed Mar 17 11:33:33 PDT 2021
- add("quovadisrootca [jdk]");
- // Valid until: Tue Apr 06 00:29:40 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]");
add("soneraclass2ca [jdk]");
}
};
--
2.19.0
1.8.3.1

View File

@ -0,0 +1,84 @@
From 0b24d78d6e226413d9e95eb13646a313dd2396ef Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Thu, 11 Mar 2021 16:31:50 +0800
Subject: [PATCH] [Huawei]update to keep same with master
Offering: Cloud Compiler JDK
Signed-off-by: Lin Haibing <linhaibing@huawei.com>
---
.../share/vm/classfile/systemDictionary.cpp | 51 +++++++++----------
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index c3dec0a30..201dd9594 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
@@ -1097,7 +1097,7 @@ static char* convert_into_package_name(char* name) {
char* index = strrchr(name, '/');
if (index == NULL) {
return NULL;
- } else {
+ } else {
*index = '\0'; // chop to just the package name
while ((index = strchr(name, '/')) != NULL) {
*index = '.'; // replace '/' with '.' in package name
@@ -1170,29 +1170,31 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
!class_loader.is_null() &&
parsed_name != NULL &&
parsed_name->utf8_length() >= (int)pkglen) {
- ResourceMark rm(THREAD);
- bool prohibited;
- const jbyte* base = parsed_name->base();
- if ((base[0] | base[1] | base[2] | base[3] | base[4]) & 0x80) {
- prohibited = is_prohibited_package_slow(parsed_name);
- } else {
- char* name = parsed_name->as_C_string();
- prohibited = (strncmp(name, pkg, pkglen) == 0);
- }
- if (prohibited) {
- // It is illegal to define classes in the "java." package from
- // JVM_DefineClass or jni_DefineClass unless you're the bootclassloader
- char* name = parsed_name->as_C_string();
- name = convert_into_package_name(name);
- assert(name != NULL, "must be");
-
- const char* fmt = "Prohibited package name: %s";
- size_t len = strlen(fmt) + strlen(name);
- char* message = NEW_RESOURCE_ARRAY(char, len);
- jio_snprintf(message, len, fmt, name);
- Exceptions::_throw_msg(THREAD_AND_LOCATION,
- vmSymbols::java_lang_SecurityException(), message);
- }
+ bool prohibited;
+ const jbyte* base = parsed_name->base();
+ if ((base[0] | base[1] | base[2] | base[3] | base[4]) & 0x80) {
+ prohibited = is_prohibited_package_slow(parsed_name);
+ } else {
+ char* name = parsed_name->as_C_string();
+ prohibited = (strncmp(name, pkg, pkglen) == 0);
+ }
+ if (prohibited) {
+ // It is illegal to define classes in the "java." package from
+ // JVM_DefineClass or jni_DefineClass unless you're the bootclassloader
+ char* name = parsed_name->as_C_string();
+ char* index = strrchr(name, '/');
+ assert(index != NULL, "must be");
+ *index = '\0'; // chop to just the package name
+ while ((index = strchr(name, '/')) != NULL) {
+ *index = '.'; // replace '/' with '.' in package name
+ }
+ const char* fmt = "Prohibited package name: %s";
+ size_t len = strlen(fmt) + strlen(name);
+ char* message = NEW_RESOURCE_ARRAY(char, len);
+ jio_snprintf(message, len, fmt, name);
+ Exceptions::_throw_msg(THREAD_AND_LOCATION,
+ vmSymbols::java_lang_SecurityException(), message);
+ }
}
if (!HAS_PENDING_EXCEPTION) {
--
2.19.0

View File

@ -31,7 +31,7 @@ if [ "x$REPO_NAME" = "x" ] ; then
REPO_NAME="jdk8u-shenandoah"
fi
if [ "x$VERSION" = "x" ] ; then
VERSION="aarch64-shenandoah-jdk8u282-b08"
VERSION="aarch64-shenandoah-jdk8u292-b10"
fi
if [ "x$COMPRESSION" = "x" ] ; then