I5J14Z: upgrade to jdk11.0.16-ga

This commit is contained in:
kuenking111 2022-07-26 20:58:57 +08:00
parent 6e29479f75
commit b776e8dddd
11 changed files with 362 additions and 354 deletions

View File

@ -14,10 +14,10 @@ index e31b52935..b2cf2cde8 100644
return false;
}
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index 6ee57c1f8..df637c88c 100644
index 9c848c6b3..013c009c0 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -2989,6 +2989,19 @@ int os::numa_get_group_id() {
@@ -3025,6 +3025,19 @@ int os::numa_get_group_id() {
return 0;
}
@ -37,7 +37,7 @@ index 6ee57c1f8..df637c88c 100644
int os::Linux::get_existing_num_nodes() {
int node;
int highest_node_number = Linux::numa_max_node();
@@ -3115,11 +3128,17 @@ bool os::Linux::libnuma_init() {
@@ -3151,11 +3164,17 @@ bool os::Linux::libnuma_init() {
libnuma_dlsym(handle, "numa_distance")));
set_numa_get_membind(CAST_TO_FN_PTR(numa_get_membind_func_t,
libnuma_v2_dlsym(handle, "numa_get_membind")));
@ -55,7 +55,7 @@ index 6ee57c1f8..df637c88c 100644
// Create an index -> node mapping, since nodes are not always consecutive
_nindex_to_node = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<int>(0, true);
rebuild_nindex_to_node_map();
@@ -3246,9 +3265,14 @@ os::Linux::numa_set_bind_policy_func_t os::Linux::_numa_set_bind_policy;
@@ -3282,9 +3301,14 @@ os::Linux::numa_set_bind_policy_func_t os::Linux::_numa_set_bind_policy;
os::Linux::numa_bitmask_isbitset_func_t os::Linux::_numa_bitmask_isbitset;
os::Linux::numa_distance_func_t os::Linux::_numa_distance;
os::Linux::numa_get_membind_func_t os::Linux::_numa_get_membind;
@ -70,7 +70,7 @@ index 6ee57c1f8..df637c88c 100644
bool os::pd_uncommit_memory(char* addr, size_t size) {
uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE,
@@ -5166,6 +5190,75 @@ void os::pd_init_container_support() {
@@ -5202,6 +5226,75 @@ void os::pd_init_container_support() {
OSContainer::init();
}
@ -146,8 +146,8 @@ index 6ee57c1f8..df637c88c 100644
// this is called _after_ the global arguments have been parsed
jint os::init_2(void) {
@@ -5209,32 +5302,7 @@ jint os::init_2(void) {
Linux::glibc_version(), Linux::libpthread_version());
@@ -5245,32 +5338,7 @@ jint os::init_2(void) {
Linux::libc_version(), Linux::libpthread_version());
if (UseNUMA) {
- if (!Linux::libnuma_init()) {
@ -289,10 +289,10 @@ index 2266eedaa..c907ec9e4 100644
bool os::get_page_info(char *start, page_info* info) {
const uint_t info_types[] = { MEMINFO_VLGRP, MEMINFO_VPAGESIZE };
diff --git a/src/hotspot/os/windows/os_windows.cpp b/src/hotspot/os/windows/os_windows.cpp
index 7d82e09bc..035d77854 100644
index eaa021b7a..9101d73aa 100644
--- a/src/hotspot/os/windows/os_windows.cpp
+++ b/src/hotspot/os/windows/os_windows.cpp
@@ -3442,6 +3442,10 @@ size_t os::numa_get_leaf_groups(int *ids, size_t size) {
@@ -3440,6 +3440,10 @@ size_t os::numa_get_leaf_groups(int *ids, size_t size) {
}
}
@ -1653,7 +1653,7 @@ index 22fd0bd95..71342b4d2 100644
}
#endif // PRODUCT
diff --git a/src/hotspot/share/gc/g1/g1InCSetState.hpp b/src/hotspot/share/gc/g1/g1InCSetState.hpp
index cdba396b1..c60609617 100644
index cdba396b1..f0b8638c1 100644
--- a/src/hotspot/share/gc/g1/g1InCSetState.hpp
+++ b/src/hotspot/share/gc/g1/g1InCSetState.hpp
@@ -57,10 +57,10 @@ struct InCSetState {
@ -1671,13 +1671,12 @@ index cdba396b1..c60609617 100644
Num
};
@@ -68,6 +68,17 @@ struct InCSetState {
@@ -68,6 +68,16 @@ struct InCSetState {
assert(is_valid(), "Invalid state %d", _value);
}
+ const char* get_type_str() const {
+ switch (value()) {
+ //case Optional: return "Optional";
+ case Humongous: return "Humongous";
+ case NotInCSet: return "NotInCSet";
+ case Young: return "Young";
@ -3990,7 +3989,7 @@ index 61bd16907..0ec37b2f6 100644
LOG_TAG(obsolete) \
LOG_TAG(oldobject) \
diff --git a/src/hotspot/share/prims/whitebox.cpp b/src/hotspot/share/prims/whitebox.cpp
index b4eb9f3ed..4d3ab3d59 100644
index 637740b21..c3326bf7a 100644
--- a/src/hotspot/share/prims/whitebox.cpp
+++ b/src/hotspot/share/prims/whitebox.cpp
@@ -528,6 +528,29 @@ WB_ENTRY(jobject, WB_G1AuxiliaryMemoryUsage(JNIEnv* env))
@ -4023,7 +4022,7 @@ index b4eb9f3ed..4d3ab3d59 100644
class OldRegionsLivenessClosure: public HeapRegionClosure {
private:
@@ -2069,6 +2092,8 @@ static JNINativeMethod methods[] = {
@@ -2070,6 +2093,8 @@ static JNINativeMethod methods[] = {
{CC"g1StartConcMarkCycle", CC"()Z", (void*)&WB_G1StartMarkCycle },
{CC"g1AuxiliaryMemoryUsage", CC"()Ljava/lang/management/MemoryUsage;",
(void*)&WB_G1AuxiliaryMemoryUsage },

View File

@ -1,5 +1,5 @@
diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad
index 0625053..af3e593 100644
index 0625053d4..af3e593a9 100644
--- a/src/hotspot/cpu/aarch64/aarch64.ad
+++ b/src/hotspot/cpu/aarch64/aarch64.ad
@@ -17518,7 +17518,7 @@ instruct loadBarrierSlowReg(iRegP dst, memory mem, rFlagsReg cr,
@ -84,7 +84,7 @@ index 0625053..af3e593 100644
// These must follow all instruction definitions as they use the names
// defined in the instructions definitions.
diff --git a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
index 90b2b4c..8e169ac 100644
index 90b2b4ca7..8e169ace4 100644
--- a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
@@ -245,7 +245,6 @@ void ZBarrierSetAssembler::generate_c1_load_barrier_stub(LIR_Assembler* ce,
@ -96,22 +96,22 @@ index 90b2b4c..8e169ac 100644
ref_addr = tmp = stub->tmp()->as_pointer_register();
} else {
diff --git a/src/hotspot/cpu/x86/x86_64.ad b/src/hotspot/cpu/x86/x86_64.ad
index 3f92fdf..e256e22 100644
index 3f92fdf5a..e256e223a 100644
--- a/src/hotspot/cpu/x86/x86_64.ad
+++ b/src/hotspot/cpu/x86/x86_64.ad
@@ -539,6 +539,12 @@ reg_class int_rdi_reg(RDI);
@@ -538,6 +538,12 @@ reg_class int_rdi_reg(RDI);
%}
source_hpp %{
+source_hpp %{
+
+#include "gc/z/c2/zBarrierSetC2.hpp"
+
+%}
+
+source_hpp %{
source_hpp %{
#if INCLUDE_ZGC
#include "gc/z/zBarrierSetAssembler.hpp"
#endif
@@ -12665,7 +12671,7 @@ instruct RethrowException()
instruct loadBarrierSlowRegNoVec(rRegP dst, memory mem, rFlagsReg cr) %{
@ -233,7 +233,7 @@ index 3f92fdf..e256e22 100644
// This name is KNOWN by the ADLC and cannot be changed.
// The ADLC forces a 'TypeRawPtr::BOTTOM' output type
diff --git a/src/hotspot/share/adlc/formssel.cpp b/src/hotspot/share/adlc/formssel.cpp
index 3c02c51..ef704f4 100644
index 3c02c51aa..ef704f472 100644
--- a/src/hotspot/share/adlc/formssel.cpp
+++ b/src/hotspot/share/adlc/formssel.cpp
@@ -775,8 +775,9 @@ bool InstructForm::captures_bottom_type(FormDict &globals) const {
@ -263,7 +263,7 @@ index 3c02c51..ef704f4 100644
int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
if( strcmp(_opType,"PrefetchAllocation")==0 )
diff --git a/src/hotspot/share/compiler/compilerDirectives.hpp b/src/hotspot/share/compiler/compilerDirectives.hpp
index b4de7fa..8eba28f 100644
index b4de7faed..8eba28f94 100644
--- a/src/hotspot/share/compiler/compilerDirectives.hpp
+++ b/src/hotspot/share/compiler/compilerDirectives.hpp
@@ -67,7 +67,7 @@ NOT_PRODUCT(cflags(TraceOptoOutput, bool, TraceOptoOutput, TraceOptoOutput))
@ -276,7 +276,7 @@ index b4de7fa..8eba28f 100644
#define compilerdirectives_c2_flags(cflags)
#endif
diff --git a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
index 8baf4d9..eea7467 100644
index 8baf4d9de..eea74674f 100644
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
+++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
@@ -208,15 +208,17 @@ public:
@ -299,7 +299,7 @@ index 8baf4d9..eea7467 100644
#endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP
diff --git a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
index 221ab4c..bf0bd43 100644
index 221ab4c2f..bf0bd43af 100644
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
@@ -22,14 +22,21 @@
@ -2291,7 +2291,7 @@ index 221ab4c..bf0bd43 100644
+ return true;
+}
diff --git a/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp b/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp
index fc9dadd..bef6a70 100644
index fc9dadd67..bef6a7048 100644
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp
@@ -29,14 +29,33 @@
@ -2485,7 +2485,7 @@ index fc9dadd..bef6a70 100644
#endif // SHARE_GC_Z_C2_ZBARRIERSETC2_HPP
diff --git a/src/hotspot/share/gc/z/zHeap.cpp b/src/hotspot/share/gc/z/zHeap.cpp
index eb72707..62f97d2 100644
index eb72707e0..62f97d2a2 100644
--- a/src/hotspot/share/gc/z/zHeap.cpp
+++ b/src/hotspot/share/gc/z/zHeap.cpp
@@ -304,35 +304,9 @@ void ZHeap::mark_flush_and_free(Thread* thread) {
@ -2525,7 +2525,7 @@ index eb72707..62f97d2 100644
if (!_mark.end()) {
// Marking not completed, continue concurrent mark
diff --git a/src/hotspot/share/gc/z/z_globals.hpp b/src/hotspot/share/gc/z/z_globals.hpp
index a753293..9e0f898 100644
index a75329372..9e0f8985b 100644
--- a/src/hotspot/share/gc/z/z_globals.hpp
+++ b/src/hotspot/share/gc/z/z_globals.hpp
@@ -94,9 +94,6 @@
@ -2539,7 +2539,7 @@ index a753293..9e0f898 100644
"Verify that reference loads are followed by barriers")
diff --git a/src/hotspot/share/opto/classes.hpp b/src/hotspot/share/opto/classes.hpp
index 6b7050d..69f8a3c 100644
index 57f267f81..61b6552d3 100644
--- a/src/hotspot/share/opto/classes.hpp
+++ b/src/hotspot/share/opto/classes.hpp
@@ -196,7 +196,10 @@ macro(LoadS)
@ -2555,10 +2555,10 @@ index 6b7050d..69f8a3c 100644
macro(Loop)
macro(LoopLimit)
diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp
index 147ce88..45e2d11 100644
index a0de489fc..1f4807653 100644
--- a/src/hotspot/share/opto/compile.cpp
+++ b/src/hotspot/share/opto/compile.cpp
@@ -2213,8 +2213,8 @@ void Compile::Optimize() {
@@ -2223,8 +2223,8 @@ void Compile::Optimize() {
#endif
@ -2568,7 +2568,7 @@ index 147ce88..45e2d11 100644
bs->verify_gc_barriers(true);
#endif
@@ -2386,12 +2386,6 @@ void Compile::Optimize() {
@@ -2396,12 +2396,6 @@ void Compile::Optimize() {
return;
}
@ -2581,7 +2581,7 @@ index 147ce88..45e2d11 100644
if (failing()) return;
// Ensure that major progress is now clear
@@ -2411,7 +2405,13 @@ void Compile::Optimize() {
@@ -2421,7 +2415,13 @@ void Compile::Optimize() {
}
#ifdef ASSERT
@ -2596,7 +2596,7 @@ index 147ce88..45e2d11 100644
bs->verify_gc_barriers(false);
#endif
@@ -2980,10 +2980,6 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
@@ -2990,10 +2990,6 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
case Op_LoadL_unaligned:
case Op_LoadPLocked:
case Op_LoadP:
@ -2607,7 +2607,7 @@ index 147ce88..45e2d11 100644
case Op_LoadN:
case Op_LoadRange:
case Op_LoadS: {
@@ -3000,6 +2996,29 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
@@ -3010,6 +3006,29 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
break;
}
@ -2638,10 +2638,10 @@ index 147ce88..45e2d11 100644
Node *addp = n->in(AddPNode::Address);
assert( !addp->is_AddP() ||
diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp
index 04ced5d..320030e 100644
index 04ced5dc3..320030e19 100644
--- a/src/hotspot/share/opto/compile.hpp
+++ b/src/hotspot/share/opto/compile.hpp
@@ -52,6 +52,7 @@ class C2Compiler;
@@ -53,6 +53,7 @@ class C2Compiler;
class CallGenerator;
class CloneMap;
class ConnectionGraph;
@ -2649,7 +2649,7 @@ index 04ced5d..320030e 100644
class InlineTree;
class Int_Array;
class LoadBarrierNode;
@@ -659,6 +660,7 @@ class Compile : public Phase {
@@ -665,6 +666,7 @@ class Compile : public Phase {
void set_inlining_incrementally(bool z) { _inlining_incrementally = z; }
int inlining_incrementally() const { return _inlining_incrementally; }
void set_major_progress() { _major_progress++; }
@ -2657,30 +2657,20 @@ index 04ced5d..320030e 100644
void clear_major_progress() { _major_progress = 0; }
int num_loop_opts() const { return _num_loop_opts; }
void set_num_loop_opts(int n) { _num_loop_opts = n; }
@@ -748,7 +750,15 @@ class Compile : public Phase {
C->_latest_stage_start_counter.stamp();
@@ -772,7 +772,7 @@ class Compile : public Phase {
#endif
}
- void print_method(CompilerPhaseType cpt, int level = 1) {
+ bool should_print(int level = 1) {
+#ifndef PRODUCT
+ return (_printer && _printer->should_print(level));
+#else
+ return false;
+#endif
+ }
+
+ void print_method(CompilerPhaseType cpt, int level = 1, int idx = 0) {
EventCompilerPhase event;
if (event.should_commit()) {
event.set_starttime(C->_latest_stage_start_counter);
@@ -758,10 +768,15 @@ class Compile : public Phase {
event.commit();
}
-
@@ -784,8 +784,14 @@ class Compile : public Phase {
#ifndef PRODUCT
- if (_printer && _printer->should_print(level)) {
- if (_printer && should_print(level)) {
- _printer->print_method(CompilerPhaseTypeHelper::to_string(cpt), level);
+ if (should_print(level)) {
+ char output[1024];
@ -2689,12 +2679,12 @@ index 04ced5d..320030e 100644
+ } else {
+ sprintf(output, "%s", CompilerPhaseTypeHelper::to_string(cpt));
+ }
+ _printer->print_method(output, level);
+ _printer->print_method(output, level);
}
#endif
C->_latest_stage_start_counter.stamp();
diff --git a/src/hotspot/share/opto/escape.cpp b/src/hotspot/share/opto/escape.cpp
index b709058..cd0ef26 100644
index b70905829..cd0ef2648 100644
--- a/src/hotspot/share/opto/escape.cpp
+++ b/src/hotspot/share/opto/escape.cpp
@@ -456,10 +456,6 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
@ -2720,13 +2710,13 @@ index b709058..cd0ef26 100644
case Op_LoadPLocked: {
// Using isa_ptr() instead of isa_oopptr() for LoadP and Phi because
diff --git a/src/hotspot/share/opto/idealGraphPrinter.cpp b/src/hotspot/share/opto/idealGraphPrinter.cpp
index d90f1d6..a07a51f 100644
index d90f1d691..a07a51f3e 100644
--- a/src/hotspot/share/opto/idealGraphPrinter.cpp
+++ b/src/hotspot/share/opto/idealGraphPrinter.cpp
@@ -350,14 +350,6 @@ void IdealGraphPrinter::end_method() {
@@ -346,14 +346,6 @@ void IdealGraphPrinter::end_method() {
_xml->flush();
}
-// Print indent
-void IdealGraphPrinter::print_indent() {
- tty->print_cr("printing indent %d", _depth);
@ -2738,35 +2728,35 @@ index d90f1d6..a07a51f 100644
bool IdealGraphPrinter::traverse_outs() {
return _traverse_outs;
}
@@ -663,14 +655,16 @@ void IdealGraphPrinter::walk_nodes(Node *start, bool edges, VectorSet* temp_set)
@@ -659,14 +651,16 @@ void IdealGraphPrinter::walk_nodes(Node *start, bool edges, VectorSet* temp_set)
}
}
-void IdealGraphPrinter::print_method(const char *name, int level, bool clear_nodes) {
- print(name, (Node *)C->root(), level, clear_nodes);
+void IdealGraphPrinter::print_method(const char *name, int level) {
+ if (should_print(level)) {
+ if (C->should_print(level)) {
+ print(name, (Node *) C->root());
+ }
}
// Print current ideal graph
-void IdealGraphPrinter::print(const char *name, Node *node, int level, bool clear_nodes) {
+void IdealGraphPrinter::print(const char *name, Node *node) {
- if (!_current_method || !_should_send_method || !should_print(level)) return;
- if (!_current_method || !_should_send_method || !C->should_print(level)) return;
+ if (!_current_method || !_should_send_method) return;
// Warning, unsafe cast?
_chaitin = (PhaseChaitin *)C->regalloc();
diff --git a/src/hotspot/share/opto/idealGraphPrinter.hpp b/src/hotspot/share/opto/idealGraphPrinter.hpp
index 2f4b9fa..10dd02f 100644
index 2f4b9faf0..10dd02f9f 100644
--- a/src/hotspot/share/opto/idealGraphPrinter.hpp
+++ b/src/hotspot/share/opto/idealGraphPrinter.hpp
@@ -81,10 +81,6 @@ class IdealGraphPrinter : public CHeapObj<mtCompiler> {
static const char *METHOD_SHORT_NAME_PROPERTY;
static const char *ASSEMBLY_ELEMENT;
- elapsedTimer _walk_time;
- elapsedTimer _output_time;
- elapsedTimer _build_blocks_time;
@ -2777,7 +2767,7 @@ index 2f4b9fa..10dd02f 100644
@@ -97,10 +93,6 @@ class IdealGraphPrinter : public CHeapObj<mtCompiler> {
bool _traverse_outs;
Compile *C;
- static void pre_node(Node* node, void *env);
- static void post_node(Node* node, void *env);
-
@ -2792,7 +2782,7 @@ index 2f4b9fa..10dd02f 100644
- intptr_t get_node_id(Node *n);
IdealGraphPrinter();
~IdealGraphPrinter();
@@ -130,9 +121,8 @@ class IdealGraphPrinter : public CHeapObj<mtCompiler> {
void print_inlining();
void begin_method();
@ -2802,11 +2792,11 @@ index 2f4b9fa..10dd02f 100644
- void print_xml(const char *name);
+ void print_method(const char *name, int level = 0);
+ void print(const char *name, Node *root);
bool should_print(int level);
void set_compile(Compile* compile) {C = compile; }
};
diff --git a/src/hotspot/share/opto/lcm.cpp b/src/hotspot/share/opto/lcm.cpp
index 50c0c2d..05ec9fa 100644
index 50c0c2dd3..05ec9fa9f 100644
--- a/src/hotspot/share/opto/lcm.cpp
+++ b/src/hotspot/share/opto/lcm.cpp
@@ -170,7 +170,6 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
@ -2821,66 +2811,30 @@ diff --git a/src/hotspot/share/opto/loopnode.cpp b/src/hotspot/share/opto/loopno
index 5454d1350..d7eb3996b 100644
--- a/src/hotspot/share/opto/loopnode.cpp
+++ b/src/hotspot/share/opto/loopnode.cpp
@@ -2762,7 +2762,7 @@ bool PhaseIdealLoop::only_has_infinite_loops() {
//----------------------------build_and_optimize-------------------------------
// Create a PhaseLoop. Build the ideal Loop tree. Map each Ideal Node to
// its corresponding LoopNode. If 'optimize' is true, do some loop cleanups.
-void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode) {
+void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode, bool z_barrier_insertion) {
bool do_split_ifs = (mode == LoopOptsDefault || mode == LoopOptsLastRound);
bool skip_loop_opts = (mode == LoopOptsNone);
#if INCLUDE_SHENANDOAHGC
@@ -2840,7 +2840,8 @@ void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode) {
}
// Nothing to do, so get out
- bool stop_early = !C->has_loops() && !skip_loop_opts && !do_split_ifs && !_verify_me && !_verify_only SHENANDOAHGC_ONLY(&& !shenandoah_opts);
+ bool stop_early = !C->has_loops() && !skip_loop_opts && !do_split_ifs && !_verify_me && !_verify_only SHENANDOAHGC_ONLY(&& !shenandoah_opts) &&
+ !z_barrier_insertion;
bool do_expensive_nodes = C->should_optimize_expensive_nodes(_igvn);
if (stop_early && !do_expensive_nodes) {
_igvn.optimize(); // Cleanup NeverBranches
@@ -2932,9 +2933,7 @@ void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode) {
@@ -3017,9 +3018,7 @@ void PhaseIdealLoop::build_and_optimize() {
build_loop_late( visited, worklist, nstack );
if (_verify_only) {
- // restore major progress flag
- for (int i = 0; i < old_progress; i++)
- C->set_major_progress();
+ C->restore_major_progress(old_progress);
assert(C->unique() == unique, "verification mode made Nodes? ? ?");
assert(C->unique() == unique, "verification _mode made Nodes? ? ?");
assert(_igvn._worklist.size() == orig_worklist_size, "shouldn't push anything");
return;
@@ -2977,10 +2976,7 @@ void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode) {
@@ -3062,10 +3061,7 @@ void PhaseIdealLoop::build_and_optimize() {
#endif
if (skip_loop_opts) {
- // restore major progress flag
- for (int i = 0; i < old_progress; i++) {
- C->set_major_progress();
- }
+ C->restore_major_progress(old_progress);
// Cleanup any modified bits
_igvn.optimize();
@@ -3001,6 +2997,16 @@ void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode) {
}
#endif
+ if(z_barrier_insertion) {
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ bs->optimize_loops(this, visited, nstack, worklist);
+ _igvn.optimize();
+ if (C->log() != NULL) {
+ log_loop_tree(_ltree_root, _ltree_root, C->log());
+ }
+ return;
+ }
+
if (ReassociateInvariants) {
// Reassociate invariants and prep for split_thru_phi
for (LoopTreeIterator iter(_ltree_root); !iter.done(); iter.next()) {
@@ -3167,8 +3173,7 @@ void PhaseIdealLoop::verify() const {
@@ -3255,8 +3261,7 @@ void PhaseIdealLoop::verify() const {
_ltree_root->verify_tree(loop_verify._ltree_root, NULL);
// Reset major-progress. It was cleared by creating a verify version of
// PhaseIdealLoop.
@ -2888,9 +2842,9 @@ index 5454d1350..d7eb3996b 100644
- C->set_major_progress();
+ C->restore_major_progress(old_progress);
}
//------------------------------verify_compare---------------------------------
@@ -4296,7 +4301,6 @@ void PhaseIdealLoop::build_loop_late_post( Node *n ) {
@@ -4384,7 +4389,6 @@ void PhaseIdealLoop::build_loop_late_post( Node *n ) {
case Op_LoadS:
case Op_LoadP:
case Op_LoadBarrierSlowReg:
@ -2898,40 +2852,11 @@ index 5454d1350..d7eb3996b 100644
case Op_LoadN:
case Op_LoadRange:
case Op_LoadD_unaligned:
diff --git a/src/hotspot/share/opto/loopnode.hpp b/src/hotspot/share/opto/loopnode.hpp
index 7765ed9..53b9692 100644
--- a/src/hotspot/share/opto/loopnode.hpp
+++ b/src/hotspot/share/opto/loopnode.hpp
@@ -936,7 +936,7 @@ public:
}
// build the loop tree and perform any requested optimizations
- void build_and_optimize(LoopOptsMode mode);
+ void build_and_optimize(LoopOptsMode mode, bool z_barrier_insertion = false);
// Dominators for the sea of nodes
void Dominators();
@@ -946,13 +946,13 @@ public:
Node *dom_lca_internal( Node *n1, Node *n2 ) const;
// Compute the Ideal Node to Loop mapping
- PhaseIdealLoop(PhaseIterGVN &igvn, LoopOptsMode mode) :
+ PhaseIdealLoop(PhaseIterGVN &igvn, LoopOptsMode mode, bool z_barrier_insertion = false) :
PhaseTransform(Ideal_Loop),
_igvn(igvn),
_dom_lca_tags(arena()), // Thread::resource_area
_verify_me(NULL),
_verify_only(false) {
- build_and_optimize(mode);
+ build_and_optimize(mode, z_barrier_insertion);
}
// Verify that verify_me made the same decisions as a fresh run.
diff --git a/src/hotspot/share/opto/loopopts.cpp b/src/hotspot/share/opto/loopopts.cpp
index 5670691..5793f51 100644
index ad5277544..a32f1f5f2 100644
--- a/src/hotspot/share/opto/loopopts.cpp
+++ b/src/hotspot/share/opto/loopopts.cpp
@@ -1420,12 +1420,6 @@ void PhaseIdealLoop::split_if_with_blocks_post(Node *n, bool last_round) {
@@ -1455,12 +1455,6 @@ void PhaseIdealLoop::split_if_with_blocks_post(Node *n, bool last_round) {
get_loop(get_ctrl(n)) == get_loop(get_ctrl(n->in(1))) ) {
_igvn.replace_node( n, n->in(1) );
}
@ -2945,7 +2870,7 @@ index 5670691..5793f51 100644
//------------------------------split_if_with_blocks---------------------------
diff --git a/src/hotspot/share/opto/matcher.cpp b/src/hotspot/share/opto/matcher.cpp
index 9437d37..45d2627 100644
index 9437d379d..45d262776 100644
--- a/src/hotspot/share/opto/matcher.cpp
+++ b/src/hotspot/share/opto/matcher.cpp
@@ -2294,6 +2294,33 @@ void Matcher::find_shared( Node *n ) {
@ -2983,10 +2908,10 @@ index 9437d37..45d2627 100644
case Op_CMoveF:
case Op_CMoveI:
diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp
index 6f88074..76e950c 100644
index c57dbd9c0..651bbfcf1 100644
--- a/src/hotspot/share/opto/memnode.cpp
+++ b/src/hotspot/share/opto/memnode.cpp
@@ -930,14 +930,6 @@ static bool skip_through_membars(Compile::AliasType* atp, const TypeInstPtr* tp,
@@ -951,14 +951,6 @@ static bool skip_through_membars(Compile::AliasType* atp, const TypeInstPtr* tp,
// a load node that reads from the source array so we may be able to
// optimize out the ArrayCopy node later.
Node* LoadNode::can_see_arraycopy_value(Node* st, PhaseGVN* phase) const {
@ -3001,7 +2926,7 @@ index 6f88074..76e950c 100644
Node* ld_adr = in(MemNode::Address);
intptr_t ld_off = 0;
AllocateNode* ld_alloc = AllocateNode::Ideal_allocation(ld_adr, phase, ld_off);
@@ -2833,7 +2825,8 @@ const Type* SCMemProjNode::Value(PhaseGVN* phase) const
@@ -2859,7 +2851,8 @@ const Type* SCMemProjNode::Value(PhaseGVN* phase) const
LoadStoreNode::LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at, const Type* rt, uint required )
: Node(required),
_type(rt),
@ -3011,7 +2936,7 @@ index 6f88074..76e950c 100644
{
init_req(MemNode::Control, c );
init_req(MemNode::Memory , mem);
@@ -3127,16 +3120,6 @@ Node *MemBarNode::Ideal(PhaseGVN *phase, bool can_reshape) {
@@ -3153,16 +3146,6 @@ Node *MemBarNode::Ideal(PhaseGVN *phase, bool can_reshape) {
return NULL;
}
@ -3029,10 +2954,10 @@ index 6f88074..76e950c 100644
// Eliminate volatile MemBars for scalar replaced objects.
if (can_reshape && req() == (Precedent+1)) {
diff --git a/src/hotspot/share/opto/memnode.hpp b/src/hotspot/share/opto/memnode.hpp
index 5290757..e2bd6a6 100644
index 36e74d968..75f283ba8 100644
--- a/src/hotspot/share/opto/memnode.hpp
+++ b/src/hotspot/share/opto/memnode.hpp
@@ -182,6 +182,8 @@ private:
@@ -183,6 +183,8 @@ private:
// this field.
const MemOrd _mo;
@ -3041,7 +2966,7 @@ index 5290757..e2bd6a6 100644
protected:
virtual uint cmp(const Node &n) const;
virtual uint size_of() const; // Size is bigger
@@ -193,7 +195,7 @@ protected:
@@ -194,7 +196,7 @@ protected:
public:
LoadNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const Type *rt, MemOrd mo, ControlDependency control_dependency)
@ -3050,7 +2975,7 @@ index 5290757..e2bd6a6 100644
init_class_id(Class_Load);
}
inline bool is_unordered() const { return !is_acquire(); }
@@ -262,6 +264,10 @@ public:
@@ -263,6 +265,10 @@ public:
Node* convert_to_unsigned_load(PhaseGVN& gvn);
Node* convert_to_signed_load(PhaseGVN& gvn);
@ -3061,7 +2986,7 @@ index 5290757..e2bd6a6 100644
#ifndef PRODUCT
virtual void dump_spec(outputStream *st) const;
#endif
@@ -810,6 +816,7 @@ class LoadStoreNode : public Node {
@@ -811,6 +817,7 @@ class LoadStoreNode : public Node {
private:
const Type* const _type; // What kind of value is loaded?
const TypePtr* _adr_type; // What kind of memory is being addressed?
@ -3069,7 +2994,7 @@ index 5290757..e2bd6a6 100644
virtual uint size_of() const; // Size is bigger
public:
LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at, const Type* rt, uint required );
@@ -822,6 +829,8 @@ public:
@@ -823,6 +830,8 @@ public:
bool result_not_used() const;
MemBarNode* trailing_membar() const;
@ -3079,7 +3004,7 @@ index 5290757..e2bd6a6 100644
class LoadStoreConditionalNode : public LoadStoreNode {
diff --git a/src/hotspot/share/opto/node.cpp b/src/hotspot/share/opto/node.cpp
index 7d12e97..bb020c4 100644
index 7d12e97eb..bb020c408 100644
--- a/src/hotspot/share/opto/node.cpp
+++ b/src/hotspot/share/opto/node.cpp
@@ -546,6 +546,9 @@ Node *Node::clone() const {
@ -3111,7 +3036,7 @@ index 7d12e97..bb020c4 100644
diff --git a/src/hotspot/share/opto/node.hpp b/src/hotspot/share/opto/node.hpp
index b5c6168..a4c5fd8 100644
index 4ad213e85..15e6ef893 100644
--- a/src/hotspot/share/opto/node.hpp
+++ b/src/hotspot/share/opto/node.hpp
@@ -84,8 +84,8 @@ class JumpProjNode;
@ -3124,7 +3049,7 @@ index b5c6168..a4c5fd8 100644
class LockNode;
class LoopNode;
class MachBranchNode;
@@ -696,8 +696,7 @@ public:
@@ -697,8 +697,7 @@ public:
DEFINE_CLASS_ID(Mem, Node, 4)
DEFINE_CLASS_ID(Load, Mem, 0)
DEFINE_CLASS_ID(LoadVector, Load, 0)
@ -3134,7 +3059,7 @@ index b5c6168..a4c5fd8 100644
DEFINE_CLASS_ID(Store, Mem, 1)
DEFINE_CLASS_ID(StoreVector, Store, 0)
DEFINE_CLASS_ID(LoadStore, Mem, 2)
@@ -839,9 +838,9 @@ public:
@@ -841,9 +840,9 @@ public:
DEFINE_CLASS_QUERY(JumpProj)
DEFINE_CLASS_QUERY(Load)
DEFINE_CLASS_QUERY(LoadStore)
@ -3146,7 +3071,7 @@ index b5c6168..a4c5fd8 100644
DEFINE_CLASS_QUERY(Loop)
DEFINE_CLASS_QUERY(Mach)
diff --git a/src/hotspot/share/opto/phaseX.cpp b/src/hotspot/share/opto/phaseX.cpp
index c65121d..07b8490 100644
index c65121d72..07b849040 100644
--- a/src/hotspot/share/opto/phaseX.cpp
+++ b/src/hotspot/share/opto/phaseX.cpp
@@ -947,9 +947,6 @@ PhaseIterGVN::PhaseIterGVN( PhaseGVN *gvn ) : PhaseGVN(gvn),
@ -3160,7 +3085,7 @@ index c65121d..07b8490 100644
/**
diff --git a/src/hotspot/share/opto/phasetype.hpp b/src/hotspot/share/opto/phasetype.hpp
index 2f0b6ae..100db17 100644
index 2f0b6ae67..100db1773 100644
--- a/src/hotspot/share/opto/phasetype.hpp
+++ b/src/hotspot/share/opto/phasetype.hpp
@@ -56,6 +56,9 @@ enum CompilerPhaseType {
@ -3184,7 +3109,7 @@ index 2f0b6ae..100db17 100644
case PHASE_FAILURE: return "Failure";
default:
diff --git a/src/hotspot/share/opto/vectornode.cpp b/src/hotspot/share/opto/vectornode.cpp
index d85b57b..0258db3 100644
index d85b57bff..0258db3e6 100644
--- a/src/hotspot/share/opto/vectornode.cpp
+++ b/src/hotspot/share/opto/vectornode.cpp
@@ -265,7 +265,6 @@ void VectorNode::vector_operands(Node* n, uint* start, uint* end) {
@ -3196,24 +3121,32 @@ index d85b57b..0258db3 100644
*end = 0; // no vector operands
break;
diff --git a/src/hotspot/share/runtime/stackValue.cpp b/src/hotspot/share/runtime/stackValue.cpp
index acc8726..cab1de7 100644
index acc87265f..6a67574ad 100644
--- a/src/hotspot/share/runtime/stackValue.cpp
+++ b/src/hotspot/share/runtime/stackValue.cpp
@@ -139,11 +139,7 @@ StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMap* r
@@ -132,18 +132,13 @@ StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMap* r
val = (oop)NULL;
}
#endif
-#if INCLUDE_SHENANDOAHGC
- if (UseShenandoahGC) {
- val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val);
-#if INCLUDE_ZGC
- // Deoptimization must make sure all oop have passed load barrier
- if (UseZGC) {
- val = ZBarrier::load_barrier_on_oop_field_preloaded((oop*)value_addr, val);
- }
-#endif
-
#if INCLUDE_SHENANDOAHGC
if (UseShenandoahGC) {
val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val);
}
#endif
+
+ assert(oopDesc::is_oop_or_null(val, false), "bad oop found");
Handle h(Thread::current(), val); // Wrap a handle around the oop
return new StackValue(h);
}
diff --git a/src/hotspot/share/utilities/growableArray.hpp b/src/hotspot/share/utilities/growableArray.hpp
index f37d94a..6c84180 100644
index f37d94a05..6c84180a6 100644
--- a/src/hotspot/share/utilities/growableArray.hpp
+++ b/src/hotspot/share/utilities/growableArray.hpp
@@ -152,6 +152,12 @@ class GenericGrowableArray : public ResourceObj {

View File

@ -367,4 +367,4 @@ index 000000000..85b49171c
--- /dev/null
+++ b/version.txt
@@ -0,0 +1 @@
+11.0.15.0.13
+11.0.16.0.13

View File

@ -1,5 +1,5 @@
diff --git a/src/hotspot/cpu/aarch64/aarch64.ad b/src/hotspot/cpu/aarch64/aarch64.ad
index af3e593..05b36e2 100644
index af3e593a9..05b36e279 100644
--- a/src/hotspot/cpu/aarch64/aarch64.ad
+++ b/src/hotspot/cpu/aarch64/aarch64.ad
@@ -1131,6 +1131,7 @@ definitions %{
@ -28,10 +28,10 @@ index af3e593..05b36e2 100644
+static Address mem2address(int opcode, Register base, int index, int size, int disp)
{
Address::extend scale;
@@ -2530,16 +2521,33 @@ typedef void (MacroAssembler::* mem_vector_insn)(FloatRegister Rt,
@@ -2409,13 +2409,18 @@ typedef void (MacroAssembler::* mem_vector_insn)(FloatRegister Rt,
}
if (index == -1) {
- (masm.*insn)(reg, Address(base, disp));
+ return Address(base, disp);
@ -41,13 +41,19 @@ index af3e593..05b36e2 100644
+ return Address(base, as_Register(index), scale);
}
}
+typedef void (MacroAssembler::* mem_insn)(Register Rt, const Address &adr);
+typedef void (MacroAssembler::* mem_insn2)(Register Rt, Register adr);
+typedef void (MacroAssembler::* mem_float_insn)(FloatRegister Rt, const Address &adr);
+typedef void (MacroAssembler::* mem_vector_insn)(FloatRegister Rt,
+ MacroAssembler::SIMD_RegVariant T, const Address &adr);
+
static void loadStore(MacroAssembler masm, mem_insn insn,
Register reg, int opcode,
Register base, int index, int size, int disp,
@@ -2450,9 +2455,20 @@ typedef void (MacroAssembler::* mem_vector_insn)(FloatRegister Rt,
}
}
+ // Used for all non-volatile memory accesses. The use of
+ // $mem->opcode() to discover whether this pattern uses sign-extended
+ // offsets is something of a kludge.
@ -66,10 +72,10 @@ index af3e593..05b36e2 100644
+ Register base, int index, int size, int disp)
{
Address::extend scale;
@@ -2561,8 +2569,8 @@ typedef void (MacroAssembler::* mem_vector_insn)(FloatRegister Rt,
@@ -2474,8 +2490,8 @@ typedef void (MacroAssembler::* mem_vector_insn)(FloatRegister Rt,
}
static void loadStore(MacroAssembler masm, mem_vector_insn insn,
- FloatRegister reg, MacroAssembler::SIMD_RegVariant T,
- int opcode, Register base, int index, int size, int disp)
@ -518,7 +524,7 @@ index af3e593..05b36e2 100644
ins_pipe(pipe_serial);
%}
diff --git a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
index 8e169ac..787c0c1 100644
index 8e169ace4..787c0c1af 100644
--- a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.cpp
@@ -24,22 +24,23 @@
@ -874,7 +880,7 @@ index 8e169ac..787c0c1 100644
-}
+#endif // COMPILER2
diff --git a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp
index 7e8be01..cca8738 100644
index 7e8be01cc..cca873825 100644
--- a/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp
+++ b/src/hotspot/cpu/aarch64/gc/z/zBarrierSetAssembler_aarch64.hpp
@@ -24,6 +24,12 @@
@ -928,7 +934,7 @@ index 7e8be01..cca8738 100644
#endif // CPU_AARCH64_GC_Z_ZBARRIERSETASSEMBLER_AARCH64_HPP
diff --git a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
index 279ff79..f9b2b3b 100644
index d24ba97e1..08d39c4bd 100644
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
@@ -2096,6 +2096,65 @@ int MacroAssembler::pop(unsigned int bitset, Register stack) {
@ -1021,7 +1027,7 @@ index edcfd9ceb..60b728e94 100644
// Push and pop everything that might be clobbered by a native
diff --git a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
index c162024..6e4eb1a 100644
index c162024db..6e4eb1a7a 100644
--- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
+++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp
@@ -880,8 +880,8 @@ void TemplateInterpreterGenerator::generate_fixed_frame(bool native_call) {
@ -1036,13 +1042,13 @@ index c162024..6e4eb1a 100644
__ ldr(rcpool, Address(rmethod, Method::const_offset()));
diff --git a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp
index 381211e..d88ecf7 100644
index 381211ecc..d88ecf7b8 100644
--- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp
+++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp
@@ -27,16 +27,16 @@
#include "gc/z/zBarrierSet.hpp"
#include "gc/z/zBarrierSetAssembler.hpp"
#include "gc/z/zBarrierSetRuntime.hpp"
#include "memory/resourceArea.hpp"
-#include "runtime/stubCodeGenerator.hpp"
+#include "runtime/sharedRuntime.hpp"
#include "utilities/macros.hpp"
@ -1494,7 +1500,7 @@ index 381211e..d88ecf7 100644
+
+#endif // COMPILER2
diff --git a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.hpp b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.hpp
index 3687754..e433882 100644
index 3687754e7..e433882a4 100644
--- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.hpp
+++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.hpp
@@ -24,6 +24,14 @@
@ -1551,7 +1557,7 @@ index 3687754..e433882 100644
#endif // CPU_X86_GC_Z_ZBARRIERSETASSEMBLER_X86_HPP
diff --git a/src/hotspot/cpu/x86/x86.ad b/src/hotspot/cpu/x86/x86.ad
index 6eefe33..8fb9a3e 100644
index 0fc26e1e4..927db59c8 100644
--- a/src/hotspot/cpu/x86/x86.ad
+++ b/src/hotspot/cpu/x86/x86.ad
@@ -1097,138 +1097,6 @@ reg_class vectorz_reg_legacy(XMM0, XMM0b, XMM0c, XMM0d, XMM0e, XMM0f, XMM0
@ -1705,7 +1711,7 @@ index 6eefe33..8fb9a3e 100644
// into scratch buffer is used to get size in 64-bit VM.
LP64_ONLY( assert(!do_size, "this method calculates size only for 32-bit VM"); )
diff --git a/src/hotspot/cpu/x86/x86_64.ad b/src/hotspot/cpu/x86/x86_64.ad
index e256e22..d127732 100644
index e256e223a..d127732a1 100644
--- a/src/hotspot/cpu/x86/x86_64.ad
+++ b/src/hotspot/cpu/x86/x86_64.ad
@@ -541,6 +541,7 @@ reg_class int_rdi_reg(RDI);
@ -2330,7 +2336,7 @@ index e256e22..d127732 100644
// ============================================================================
// This name is KNOWN by the ADLC and cannot be changed.
diff --git a/src/hotspot/share/adlc/formssel.cpp b/src/hotspot/share/adlc/formssel.cpp
index ef704f4..5ba1fdc 100644
index ef704f472..5ba1fdc57 100644
--- a/src/hotspot/share/adlc/formssel.cpp
+++ b/src/hotspot/share/adlc/formssel.cpp
@@ -774,11 +774,6 @@ bool InstructForm::captures_bottom_type(FormDict &globals) const {
@ -2356,7 +2362,7 @@ index ef704f4..5ba1fdc 100644
};
int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
diff --git a/src/hotspot/share/compiler/compilerDirectives.hpp b/src/hotspot/share/compiler/compilerDirectives.hpp
index 8eba28f..b20cd73 100644
index 8eba28f94..b20cd73d9 100644
--- a/src/hotspot/share/compiler/compilerDirectives.hpp
+++ b/src/hotspot/share/compiler/compilerDirectives.hpp
@@ -66,8 +66,7 @@ NOT_PRODUCT(cflags(TraceOptoOutput, bool, TraceOptoOutput, TraceOptoOutput))
@ -2370,7 +2376,7 @@ index 8eba28f..b20cd73 100644
#define compilerdirectives_c2_flags(cflags)
#endif
diff --git a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
index eea7467..487988b 100644
index eea74674f..487988bd8 100644
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
+++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
@@ -198,7 +198,7 @@ public:
@ -2400,7 +2406,7 @@ index eea7467..487988b 100644
#endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP
diff --git a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
index bf0bd43..a129734 100644
index bf0bd43af..a12973464 100644
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp
@@ -22,443 +22,156 @@
@ -4190,7 +4196,7 @@ index bf0bd43..a129734 100644
- return true;
}
diff --git a/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp b/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp
index bef6a70..accae1f 100644
index bef6a7048..accae1f72 100644
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp
@@ -29,134 +29,38 @@
@ -4397,7 +4403,7 @@ index bef6a70..accae1f 100644
#endif // SHARE_GC_Z_C2_ZBARRIERSETC2_HPP
diff --git a/src/hotspot/share/gc/z/zBarrierSetAssembler.hpp b/src/hotspot/share/gc/z/zBarrierSetAssembler.hpp
index 52133c0..9d07f9e 100644
index 52133c073..9d07f9e8c 100644
--- a/src/hotspot/share/gc/z/zBarrierSetAssembler.hpp
+++ b/src/hotspot/share/gc/z/zBarrierSetAssembler.hpp
@@ -1,5 +1,5 @@
@ -4419,7 +4425,7 @@ index 52133c0..9d07f9e 100644
class ZBarrierSetAssemblerBase : public BarrierSetAssembler {
diff --git a/src/hotspot/share/opto/classes.cpp b/src/hotspot/share/opto/classes.cpp
index 75f070f..d1282ac 100644
index 75f070f7c..d1282ac78 100644
--- a/src/hotspot/share/opto/classes.cpp
+++ b/src/hotspot/share/opto/classes.cpp
@@ -48,9 +48,6 @@
@ -4433,7 +4439,7 @@ index 75f070f..d1282ac 100644
#include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp"
#endif
diff --git a/src/hotspot/share/opto/classes.hpp b/src/hotspot/share/opto/classes.hpp
index 69f8a3c..5ee23f7 100644
index 61b6552d3..b847caf6e 100644
--- a/src/hotspot/share/opto/classes.hpp
+++ b/src/hotspot/share/opto/classes.hpp
@@ -189,17 +189,6 @@ macro(LoadP)
@ -4496,7 +4502,7 @@ index 8c23b304d..3e45813d7 100644
_trace_opto_output(directive->TraceOptoOutputOption),
_in_dump_cnt(0),
@@ -687,9 +678,15 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr
#endif
NOT_PRODUCT(_printer(NULL) COMMA)
_congraph(NULL),
_comp_arena(mtCompiler),
+ _barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
@ -4522,16 +4528,16 @@ index 8c23b304d..3e45813d7 100644
_save_argument_registers(save_arg_registers),
_do_locks_coarsening(false),
@@ -1005,6 +999,10 @@ Compile::Compile( ciEnv* ci_env,
_printer(NULL),
_in_dump_cnt(0),
#endif
_comp_arena(mtCompiler),
NOT_PRODUCT(_printer(NULL) COMMA)
+ _barrier_set_state(BarrierSet::barrier_set()->barrier_set_c2()->create_barrier_state(comp_arena())),
+ _env(ci_env),
+ _directive(directive),
+ _log(ci_env->log()),
_comp_arena(mtCompiler),
_node_arena(mtCompiler),
_old_arena(mtCompiler),
_Compile_types(mtCompiler),
@@ -2427,13 +2425,6 @@ void Compile::Optimize() {
igvn.optimize();
}
@ -4577,7 +4583,7 @@ index 8c23b304d..3e45813d7 100644
Node *addp = n->in(AddPNode::Address);
assert( !addp->is_AddP() ||
diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp
index 320030e..1246b1b 100644
index 320030e19..1246b1b77 100644
--- a/src/hotspot/share/opto/compile.hpp
+++ b/src/hotspot/share/opto/compile.hpp
@@ -55,7 +55,6 @@ class ConnectionGraph;
@ -4634,7 +4640,7 @@ index 320030e..1246b1b 100644
// Compute the size of first NumberOfLoopInstrToAlign instructions
// at the head of a loop.
diff --git a/src/hotspot/share/opto/escape.cpp b/src/hotspot/share/opto/escape.cpp
index cd0ef26..0a22c89 100644
index cd0ef2648..0a22c89d9 100644
--- a/src/hotspot/share/opto/escape.cpp
+++ b/src/hotspot/share/opto/escape.cpp
@@ -490,13 +490,6 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
@ -4667,7 +4673,7 @@ index cd0ef26..0a22c89 100644
}
case Op_Rethrow: // Exception object escapes
diff --git a/src/hotspot/share/opto/lcm.cpp b/src/hotspot/share/opto/lcm.cpp
index 05ec9fa..16b80bf 100644
index 05ec9fa9f..16b80bfc3 100644
--- a/src/hotspot/share/opto/lcm.cpp
+++ b/src/hotspot/share/opto/lcm.cpp
@@ -169,7 +169,6 @@ void PhaseCFG::implicit_null_check(Block* block, Node *proj, Node *val, int allo
@ -4691,7 +4697,7 @@ index d7eb3996b..366d0f378 100644
case Op_LoadRange:
case Op_LoadD_unaligned:
diff --git a/src/hotspot/share/opto/loopopts.cpp b/src/hotspot/share/opto/loopopts.cpp
index 5793f51..6b85529 100644
index a32f1f5f2..ffbd84aee 100644
--- a/src/hotspot/share/opto/loopopts.cpp
+++ b/src/hotspot/share/opto/loopopts.cpp
@@ -41,9 +41,6 @@
@ -4705,7 +4711,7 @@ index 5793f51..6b85529 100644
//=============================================================================
//------------------------------split_thru_phi---------------------------------
diff --git a/src/hotspot/share/opto/machnode.hpp b/src/hotspot/share/opto/machnode.hpp
index 66adf9b..90d5b0a 100644
index 66adf9be1..90d5b0af1 100644
--- a/src/hotspot/share/opto/machnode.hpp
+++ b/src/hotspot/share/opto/machnode.hpp
@@ -197,7 +197,7 @@ public:
@ -4739,7 +4745,7 @@ index 66adf9b..90d5b0a 100644
// more leafs. Must be set by MachNode constructor to point to an
// internal array of MachOpers. The MachOper array is sized by
diff --git a/src/hotspot/share/opto/matcher.cpp b/src/hotspot/share/opto/matcher.cpp
index 45d2627..05fdab2 100644
index 45d262776..05fdab21e 100644
--- a/src/hotspot/share/opto/matcher.cpp
+++ b/src/hotspot/share/opto/matcher.cpp
@@ -1752,6 +1752,13 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) {
@ -4809,7 +4815,7 @@ index 45d2627..05fdab2 100644
case Op_CMoveF:
case Op_CMoveI:
diff --git a/src/hotspot/share/opto/memnode.cpp b/src/hotspot/share/opto/memnode.cpp
index 76e950c..028d1a9 100644
index 651bbfcf1..3a5e45401 100644
--- a/src/hotspot/share/opto/memnode.cpp
+++ b/src/hotspot/share/opto/memnode.cpp
@@ -49,9 +49,6 @@
@ -4822,7 +4828,7 @@ index 76e950c..028d1a9 100644
#if INCLUDE_SHENANDOAHGC
#include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp"
#endif
@@ -2826,7 +2823,7 @@ LoadStoreNode::LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const Ty
@@ -2852,7 +2849,7 @@ LoadStoreNode::LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const Ty
: Node(required),
_type(rt),
_adr_type(at),
@ -4832,7 +4838,7 @@ index 76e950c..028d1a9 100644
init_req(MemNode::Control, c );
init_req(MemNode::Memory , mem);
diff --git a/src/hotspot/share/opto/memnode.hpp b/src/hotspot/share/opto/memnode.hpp
index e2bd6a6..3bf3dc4 100644
index 75f283ba8..abf07a233 100644
--- a/src/hotspot/share/opto/memnode.hpp
+++ b/src/hotspot/share/opto/memnode.hpp
@@ -43,6 +43,8 @@ private:
@ -4881,7 +4887,7 @@ index e2bd6a6..3bf3dc4 100644
init_class_id(Class_Mem);
debug_only(_adr_type=at; adr_type();)
}
@@ -125,6 +139,9 @@ public:
@@ -126,6 +140,9 @@ public:
#endif
}
@ -4891,7 +4897,7 @@ index e2bd6a6..3bf3dc4 100644
// Search through memory states which precede this node (load or store).
// Look for an exact match for the address, with no intervening
// aliased stores.
@@ -182,8 +199,6 @@ private:
@@ -183,8 +200,6 @@ private:
// this field.
const MemOrd _mo;
@ -4900,7 +4906,7 @@ index e2bd6a6..3bf3dc4 100644
protected:
virtual uint cmp(const Node &n) const;
virtual uint size_of() const; // Size is bigger
@@ -195,7 +210,7 @@ protected:
@@ -196,7 +211,7 @@ protected:
public:
LoadNode(Node *c, Node *mem, Node *adr, const TypePtr* at, const Type *rt, MemOrd mo, ControlDependency control_dependency)
@ -4909,7 +4915,7 @@ index e2bd6a6..3bf3dc4 100644
init_class_id(Class_Load);
}
inline bool is_unordered() const { return !is_acquire(); }
@@ -264,10 +279,6 @@ public:
@@ -265,10 +280,6 @@ public:
Node* convert_to_unsigned_load(PhaseGVN& gvn);
Node* convert_to_signed_load(PhaseGVN& gvn);
@ -4920,7 +4926,7 @@ index e2bd6a6..3bf3dc4 100644
#ifndef PRODUCT
virtual void dump_spec(outputStream *st) const;
#endif
@@ -816,7 +827,7 @@ class LoadStoreNode : public Node {
@@ -817,7 +828,7 @@ class LoadStoreNode : public Node {
private:
const Type* const _type; // What kind of value is loaded?
const TypePtr* _adr_type; // What kind of memory is being addressed?
@ -4929,7 +4935,7 @@ index e2bd6a6..3bf3dc4 100644
virtual uint size_of() const; // Size is bigger
public:
LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at, const Type* rt, uint required );
@@ -829,8 +840,9 @@ public:
@@ -830,8 +841,9 @@ public:
bool result_not_used() const;
MemBarNode* trailing_membar() const;
@ -4941,7 +4947,7 @@ index e2bd6a6..3bf3dc4 100644
};
class LoadStoreConditionalNode : public LoadStoreNode {
@@ -882,6 +894,7 @@ public:
@@ -883,6 +895,7 @@ public:
MemNode::MemOrd order() const {
return _mem_ord;
}
@ -4949,7 +4955,7 @@ index e2bd6a6..3bf3dc4 100644
};
class CompareAndExchangeNode : public LoadStoreNode {
@@ -899,6 +912,7 @@ public:
@@ -900,6 +913,7 @@ public:
MemNode::MemOrd order() const {
return _mem_ord;
}
@ -4958,7 +4964,7 @@ index e2bd6a6..3bf3dc4 100644
//------------------------------CompareAndSwapBNode---------------------------
diff --git a/src/hotspot/share/opto/node.cpp b/src/hotspot/share/opto/node.cpp
index bb020c4..5a5e44e 100644
index bb020c408..5a5e44ecd 100644
--- a/src/hotspot/share/opto/node.cpp
+++ b/src/hotspot/share/opto/node.cpp
@@ -546,9 +546,6 @@ Node *Node::clone() const {
@ -4983,7 +4989,7 @@ index bb020c4..5a5e44e 100644
}
diff --git a/src/hotspot/share/opto/node.hpp b/src/hotspot/share/opto/node.hpp
index a4c5fd8..2a42e99 100644
index 15e6ef893..de782b880 100644
--- a/src/hotspot/share/opto/node.hpp
+++ b/src/hotspot/share/opto/node.hpp
@@ -82,8 +82,6 @@ class JVMState;
@ -4995,7 +5001,7 @@ index a4c5fd8..2a42e99 100644
class LoadStoreNode;
class LoadStoreConditionalNode;
class LockNode;
@@ -644,7 +642,6 @@ public:
@@ -645,7 +643,6 @@ public:
DEFINE_CLASS_ID(MemBar, Multi, 3)
DEFINE_CLASS_ID(Initialize, MemBar, 0)
DEFINE_CLASS_ID(MemBarStoreStore, MemBar, 1)
@ -5003,7 +5009,7 @@ index a4c5fd8..2a42e99 100644
DEFINE_CLASS_ID(Mach, Node, 1)
DEFINE_CLASS_ID(MachReturn, Mach, 0)
@@ -696,7 +693,6 @@ public:
@@ -697,7 +694,6 @@ public:
DEFINE_CLASS_ID(Mem, Node, 4)
DEFINE_CLASS_ID(Load, Mem, 0)
DEFINE_CLASS_ID(LoadVector, Load, 0)
@ -5011,7 +5017,7 @@ index a4c5fd8..2a42e99 100644
DEFINE_CLASS_ID(Store, Mem, 1)
DEFINE_CLASS_ID(StoreVector, Store, 0)
DEFINE_CLASS_ID(LoadStore, Mem, 2)
@@ -839,8 +835,6 @@ public:
@@ -841,8 +837,6 @@ public:
DEFINE_CLASS_QUERY(Load)
DEFINE_CLASS_QUERY(LoadStore)
DEFINE_CLASS_QUERY(LoadStoreConditional)
@ -5021,7 +5027,7 @@ index a4c5fd8..2a42e99 100644
DEFINE_CLASS_QUERY(Loop)
DEFINE_CLASS_QUERY(Mach)
diff --git a/src/hotspot/share/opto/output.cpp b/src/hotspot/share/opto/output.cpp
index 3c02a6f..e3933f4 100644
index 4ccf75783..f22029256 100644
--- a/src/hotspot/share/opto/output.cpp
+++ b/src/hotspot/share/opto/output.cpp
@@ -32,6 +32,8 @@
@ -5731,7 +5737,7 @@ index 3c02a6f..e3933f4 100644
}
#endif
diff --git a/src/hotspot/share/opto/output.hpp b/src/hotspot/share/opto/output.hpp
index ab3c1a3..ec3cc29 100644
index ab3c1a304..ec3cc2981 100644
--- a/src/hotspot/share/opto/output.hpp
+++ b/src/hotspot/share/opto/output.hpp
@@ -49,10 +49,7 @@ class Pipeline_Use;
@ -5747,7 +5753,7 @@ index ab3c1a3..ec3cc29 100644
//------------------------------Scheduling----------------------------------
diff --git a/src/hotspot/share/opto/phaseX.cpp b/src/hotspot/share/opto/phaseX.cpp
index 07b8490..9d5d4de 100644
index 07b849040..9d5d4deed 100644
--- a/src/hotspot/share/opto/phaseX.cpp
+++ b/src/hotspot/share/opto/phaseX.cpp
@@ -1648,14 +1648,14 @@ void PhaseIterGVN::add_users_to_worklist( Node *n ) {
@ -5785,7 +5791,7 @@ index 07b8490..9d5d4de 100644
for (DUIterator_Fast i3max, i3 = u->fast_outs(i3max); i3 < i3max; i3++) {
Node* b = u->fast_out(i3);
diff --git a/src/hotspot/share/opto/vectornode.cpp b/src/hotspot/share/opto/vectornode.cpp
index 0258db3..fae147f 100644
index 0258db3e6..fae147fa8 100644
--- a/src/hotspot/share/opto/vectornode.cpp
+++ b/src/hotspot/share/opto/vectornode.cpp
@@ -264,7 +264,6 @@ void VectorNode::vector_operands(Node* n, uint* start, uint* end) {

View File

@ -2,10 +2,10 @@ diff --git a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp b/src/hotspot
index 18f455086..785470dbe 100644
--- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp
+++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp
@@ -23,6 +23,7 @@
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/codeBlob.hpp"
+#include "code/vmreg.inline.hpp"
#include "gc/z/zBarrier.inline.hpp"
#include "gc/z/zBarrierSet.hpp"

View File

@ -86,8 +86,8 @@ diff --git a/src/java.base/share/classes/java/io/ObjectOutputStream.java b/src/j
index 044924593..8935e61dc 100644
--- a/src/java.base/share/classes/java/io/ObjectOutputStream.java
+++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java
@@ -175,6 +175,25 @@ public class ObjectOutputStream
new ReferenceQueue<>();
@@ -170,6 +170,25 @@ public class ObjectOutputStream
};
}
+ private static class Logging {
@ -112,10 +112,10 @@ index 044924593..8935e61dc 100644
/** filter stream for handling block data conversion */
private final BlockDataOutputStream bout;
/** obj -> wire handle map */
@@ -223,6 +242,14 @@ public class ObjectOutputStream
@@ -210,6 +229,13 @@ public class ObjectOutputStream
* on when it is true.
*/
private static final boolean useFastSerializer = UNSAFE.getUseFastSerializer();
+ /**
+ * value of "printFastSerializer" property,
+ * as true or false for printing FastSerializer logs.
@ -123,15 +123,14 @@ index 044924593..8935e61dc 100644
+ private static final boolean printFastSerializer = java.security.AccessController.doPrivileged(
+ new sun.security.action.GetBooleanAction(
+ "printFastSerializer")).booleanValue();
+
/**
* Creates an ObjectOutputStream that writes to the specified OutputStream.
* This constructor writes the serialization stream header to the
@@ -1301,6 +1328,12 @@ public class ObjectOutputStream
@@ -1266,6 +1292,12 @@ public class ObjectOutputStream
bout.writeByte(TC_CLASSDESC);
handles.assign(unshared ? null : desc);
+ if (Logging.fastSerLogger != null) {
+ if (Logging.fastSerLogger != null) {
+ Logging.fastSerLogger.log(System.Logger.Level.DEBUG,
+ "[Serialize] useFastSerializer:{0}, Class name:{1}, SerialVersionUID:{2}, flags:{3}, protocol:{4}",
+ useFastSerializer, desc.getName(), desc.getSerialVersionUID(), desc.getFlags(this), protocol);

View File

@ -1,3 +1,15 @@
diff --git a/src/java.base/share/classes/java/io/ObjectInputStream.java b/src/java.base/share/classes/java/io/ObjectInputStream.java
index f779af6c6..7c4539562 100644
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java
@@ -38,6 +38,7 @@ import java.security.PrivilegedExceptionAction;
import java.util.Arrays;
import java.util.Map;
import java.util.Objects;
+import java.util.concurrent.ConcurrentHashMap;
import jdk.internal.misc.SharedSecrets;
import jdk.internal.misc.Unsafe;
diff --git a/src/hotspot/share/prims/unsafe.cpp b/src/hotspot/share/prims/unsafe.cpp
index 2f14e01ce..d8f1679b4 100644
--- a/src/hotspot/share/prims/unsafe.cpp
@ -306,9 +318,9 @@ index 135e5645a..044924593 100644
--- a/src/java.base/share/classes/java/io/ObjectOutputStream.java
+++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java
@@ -36,6 +36,7 @@ import java.util.StringJoiner;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import static java.io.ObjectStreamClass.processQueue;
import java.util.Arrays;
import java.util.List;
import java.util.StringJoiner;
+import jdk.internal.misc.Unsafe;
import sun.reflect.misc.ReflectUtil;

View File

@ -0,0 +1,148 @@
diff --git a/src/hotspot/share/opto/graphKit.cpp b/src/hotspot/share/opto/graphKit.cpp
index 7b891d55..0440d4cb 100644
--- a/src/hotspot/share/opto/graphKit.cpp
+++ b/src/hotspot/share/opto/graphKit.cpp
@@ -46,7 +46,6 @@
#include "runtime/sharedRuntime.hpp"
#include "utilities/bitMap.inline.hpp"
#include "utilities/macros.hpp"
-#include "utilities/bitMap.inline.hpp"
#if INCLUDE_SHENANDOAHGC
#include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp"
#endif
diff --git a/src/java.base/unix/native/libjava/path_util.c b/src/java.base/unix/native/libjava/path_util.c
index 8a533f81..4b978206 100644
--- a/src/java.base/unix/native/libjava/path_util.c
+++ b/src/java.base/unix/native/libjava/path_util.c
@@ -116,7 +116,6 @@ collapse(char *path)
int nc;
char **ix;
int i, j;
- char *p, *q;
nc = collapsible(names);
if (nc < 2) return; /* Nothing to do */
diff --git a/src/jdk.crypto.kaeprovider/linux/classes/org/openeuler/security/openssl/KAEDHKeyPairGenerator.java b/src/jdk.crypto.kaeprovider/linux/classes/org/openeuler/security/openssl/KAEDHKeyPairGenerator.java
index 429c65fc..6094c82a 100644
--- a/src/jdk.crypto.kaeprovider/linux/classes/org/openeuler/security/openssl/KAEDHKeyPairGenerator.java
+++ b/src/jdk.crypto.kaeprovider/linux/classes/org/openeuler/security/openssl/KAEDHKeyPairGenerator.java
@@ -148,6 +148,9 @@ public class KAEDHKeyPairGenerator
throw new ProviderException("Invoke nativeGenerateKeyPair failed.", e);
}
+ // check keys
+ checkKeys(keys);
+
BigInteger pubKey = new BigInteger(keys[0]);
BigInteger priKey = new BigInteger(keys[1]);
@@ -162,5 +165,21 @@ public class KAEDHKeyPairGenerator
throw new ProviderException(ikse);
}
}
+
+ private void checkKeys(byte[][] keys) {
+ if (keys == null) {
+ throw new ProviderException("Invalid keys, keys is null.");
+ }
+ // The keys needs to contain at least 2 byte arrays, which are public and private keys.
+ if (keys.length < 2) {
+ throw new ProviderException("Invalid keys, keys length is less than 2.");
+ }
+ for (int i = 0; i < keys.length; i++) {
+ if (keys[i] == null) {
+ throw new ProviderException("Invalid keys, keys[" + i + "]" + "is null.");
+ }
+ }
+ }
+
protected native static byte[][] nativeGenerateKeyPair(byte[] p, byte[] g, int lSize);
}
diff --git a/src/jdk.crypto.kaeprovider/linux/classes/org/openeuler/security/openssl/KAEECKeyPairGenerator.java b/src/jdk.crypto.kaeprovider/linux/classes/org/openeuler/security/openssl/KAEECKeyPairGenerator.java
index 60fa8183..f563f948 100644
--- a/src/jdk.crypto.kaeprovider/linux/classes/org/openeuler/security/openssl/KAEECKeyPairGenerator.java
+++ b/src/jdk.crypto.kaeprovider/linux/classes/org/openeuler/security/openssl/KAEECKeyPairGenerator.java
@@ -68,9 +68,8 @@ public class KAEECKeyPairGenerator extends KeyPairGeneratorSpi {
private ECParameterSpec getParamsByCurve(String curveName) {
byte[][] params = nativeGenerateParam(curveName);
- if (params == null) {
- throw new InvalidParameterException("unknown curve " + curveName);
- }
+ // check params
+ checkParams(params, curveName);
BigInteger p = new BigInteger(params[0]);
BigInteger a = new BigInteger(params[1]);
BigInteger b = new BigInteger(params[2]);
@@ -85,6 +84,21 @@ public class KAEECKeyPairGenerator extends KeyPairGeneratorSpi {
return spec;
}
+ private void checkParams(byte[][] params, String curveName) {
+ if (params == null) {
+ throw new InvalidParameterException("Unknown curve " + curveName);
+ }
+ // The params needs to contain at least 7 byte arrays, which are public and private keys
+ if (params.length < 7) {
+ throw new InvalidParameterException("The params length is less than 7.");
+ }
+ for (int i = 0; i < params.length; i++) {
+ if (params[i] == null) {
+ throw new InvalidParameterException("The params[" + i + "]" + "is null.");
+ }
+ }
+ }
+
@Override
public void initialize(AlgorithmParameterSpec param, SecureRandom random) throws InvalidAlgorithmParameterException {
if (param instanceof ECParameterSpec) {
diff --git a/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_exception.c b/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_exception.c
index f684f6ee..56acbfd7 100644
--- a/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_exception.c
+++ b/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_exception.c
@@ -105,14 +105,10 @@ void KAE_ThrowFromOpenssl(JNIEnv* env, const char* msg, void (* defaultException
KAE_TRACE("OpenSSL error in %s: err=%lx, lib=%x, reason=%x, file=%s, line=%d, estring=%s, data=%s", msg, err,
lib, reason, file, line, estring, (flags & ERR_TXT_STRING) ? data : "(no data)");
- switch (lib) {
- case ERR_LIB_EVP:
- case ERR_LIB_RSA:
- KAE_ThrowEvpException(env, reason, estring, defaultException);
- break;
- default:
- defaultException(env, estring);
- break;
+ if (lib == ERR_LIB_EVP || lib == ERR_LIB_RSA) {
+ KAE_ThrowEvpException(env, reason, estring, defaultException);
+ } else {
+ defaultException(env, estring);
}
}
diff --git a/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_hmac.c b/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_hmac.c
index 7b28fa1f..554a9750 100644
--- a/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_hmac.c
+++ b/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_hmac.c
@@ -182,7 +182,7 @@ JNIEXPORT jint JNICALL Java_org_openeuler_security_openssl_KAEHMac_nativeFinal
// write back to output_array
(*env)->SetByteArrayRegion(env, output, out_offset, bytesWritten, (jbyte*) temp_result);
- KAE_TRACE("KAEHMac_nativeFinal success, output_offset = %d, bytesWritten = %d", out_offset, bytesWritten);
+ KAE_TRACE("KAEHMac_nativeFinal success, output_offset = %d, bytesWritten = %u", out_offset, bytesWritten);
cleanup:
free(temp_result);
diff --git a/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_keypairgenerator_rsa.c b/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_keypairgenerator_rsa.c
index d4c9d6ac..6785f543 100644
--- a/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_keypairgenerator_rsa.c
+++ b/src/jdk.crypto.kaeprovider/linux/native/libj2kae/org/openeuler/security/openssl/kae_keypairgenerator_rsa.c
@@ -133,7 +133,8 @@ static jobjectArray NewRSAKeyParams(JNIEnv* env, RSA* rsa) {
}
// set rsa key param
- for (RSAParamIndex paramIndex = rsaN; paramIndex <= rsaIqmp; paramIndex++) {
+ RSAParamIndex paramIndex;
+ for (paramIndex = rsaN; paramIndex <= rsaIqmp; paramIndex++) {
if (!SetRSAKeyParam(env, rsa, params, paramIndex)) {
return NULL;
}

View File

@ -114,7 +114,7 @@
# New Version-String scheme-style defines
%global majorver 11
%global securityver 15
%global securityver 16
# buildjdkver is usually same as %%{majorver},
# but in time of bootstrap of next jdk, it is majorver-1,
# and this it is better to change it here, on single place
@ -130,12 +130,12 @@
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
%global minorver 0
%global buildver 10
%global buildver 8
%global patchver 0
%global project jdk-updates
%global repo jdk11u
%global revision jdk-11.0.15-ga
%global revision jdk-11.0.16-ga
%global full_revision %{project}-%{repo}-%{revision}
# priority must be 7 digits in total
# setting to 1, so debug ones can have 0
@ -740,7 +740,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver}
Release: 1
Release: 0
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@ -873,8 +873,8 @@ Patch87: fix_macroAssembler_missing_matcher_header_file_causing_build_failure.pa
Patch88: fix-error-in-build-core-variants.patch
Patch89: downgrade-the-symver-of-memcpy-GLIBC_2.14-on-x86.patch
# 11.0.15
Patch90: fix_X509TrustManagerImpl_symantec_distrust.patch
# 11.0.16
Patch90: fix_Internal_and_external_code_inconsistency.patch
BuildRequires: autoconf
@ -1674,6 +1674,18 @@ cjc.mainProgram(arg)
%changelog
* Tue Jul 26 2022 kuenking111 <wangkun49@huawei.com> - 1:11.0.16.8-0
- modified 8224675-Late-GC-barrier-insertion-for-ZGC.patch
- modified ZGC-Redesign-C2-load-barrier-to-expand-on-th.patch
- modified fast-serializer-jdk11.patch
- modified dfx-enhancement-of-FastSerializer.patch
- modified 8210473-JEP-345-NUMA-Aware-Memory-Allocation-for-G1.patch
- modified src-openeuler-openjdk-11-resolve-code-inconsistencies.patch
- modified add-missing-inline.patch
- modified G1-iterate-region-by-bitmap-rather-than-obj-size-in.patch
- delete fix_X509TrustManagerImpl_symantec_distrust.patch
- add fix_Internal_and_external_code_inconsistency.patch
* Thu Apr 28 2022 kuenking111 <wangkun49@huawei.com> - 1:11.0.15.10-1
- add fix_X509TrustManagerImpl_symantec_distrust.patch

View File

@ -106,18 +106,6 @@ index a94a21e42..61d3cc8cc 100644
};
diff --git a/src/hotspot/share/gc/g1/g1InCSetState.hpp b/src/hotspot/share/gc/g1/g1InCSetState.hpp
index c60609617..f0b8638c1 100644
--- a/src/hotspot/share/gc/g1/g1InCSetState.hpp
+++ b/src/hotspot/share/gc/g1/g1InCSetState.hpp
@@ -70,7 +70,6 @@ struct InCSetState {
const char* get_type_str() const {
switch (value()) {
- //case Optional: return "Optional";
case Humongous: return "Humongous";
case NotInCSet: return "NotInCSet";
case Young: return "Young";
diff --git a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
index 8b4be7d11..1b9dd5ada 100644
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp
@ -169,103 +157,14 @@ diff --git a/src/hotspot/share/opto/graphKit.cpp b/src/hotspot/share/opto/graphK
index 22222efbc..5849e8f86 100644
--- a/src/hotspot/share/opto/graphKit.cpp
+++ b/src/hotspot/share/opto/graphKit.cpp
@@ -44,8 +44,8 @@
#include "opto/runtime.hpp"
#include "runtime/deoptimization.hpp"
@@ -44,6 +44,7 @@
#include "runtime/sharedRuntime.hpp"
-#include "utilities/bitMap.inline.hpp"
#include "utilities/bitMap.inline.hpp"
#include "utilities/macros.hpp"
+#include "utilities/bitMap.inline.hpp"
#if INCLUDE_SHENANDOAHGC
#include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp"
#endif
diff --git a/src/hotspot/share/opto/loopnode.cpp b/src/hotspot/share/opto/loopnode.cpp
index b32cd9580..1f9ebd3bd 100644
--- a/src/hotspot/share/opto/loopnode.cpp
+++ b/src/hotspot/share/opto/loopnode.cpp
@@ -2794,7 +2794,7 @@ bool PhaseIdealLoop::only_has_infinite_loops() {
//----------------------------build_and_optimize-------------------------------
// Create a PhaseLoop. Build the ideal Loop tree. Map each Ideal Node to
// its corresponding LoopNode. If 'optimize' is true, do some loop cleanups.
-void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode, bool z_barrier_insertion) {
+void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode) {
bool do_split_ifs = (mode == LoopOptsDefault || mode == LoopOptsLastRound);
bool skip_loop_opts = (mode == LoopOptsNone);
#if INCLUDE_SHENANDOAHGC
@@ -2872,8 +2872,7 @@ void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode, bool z_barrier_insert
}
// Nothing to do, so get out
- bool stop_early = !C->has_loops() && !skip_loop_opts && !do_split_ifs && !_verify_me && !_verify_only SHENANDOAHGC_ONLY(&& !shenandoah_opts) &&
- !z_barrier_insertion;
+ bool stop_early = !C->has_loops() && !skip_loop_opts && !do_split_ifs && !_verify_me && !_verify_only SHENANDOAHGC_ONLY(&& !shenandoah_opts);
bool do_expensive_nodes = C->should_optimize_expensive_nodes(_igvn);
if (stop_early && !do_expensive_nodes) {
_igvn.optimize(); // Cleanup NeverBranches
@@ -3029,16 +3028,6 @@ void PhaseIdealLoop::build_and_optimize(LoopOptsMode mode, bool z_barrier_insert
}
#endif
- if(z_barrier_insertion) {
- BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
- bs->optimize_loops(this, visited, nstack, worklist);
- _igvn.optimize();
- if (C->log() != NULL) {
- log_loop_tree(_ltree_root, _ltree_root, C->log());
- }
- return;
- }
-
if (ReassociateInvariants) {
// Reassociate invariants and prep for split_thru_phi
for (LoopTreeIterator iter(_ltree_root); !iter.done(); iter.next()) {
diff --git a/src/hotspot/share/opto/loopnode.hpp b/src/hotspot/share/opto/loopnode.hpp
index 74aab91f9..6cf2d2a6d 100644
--- a/src/hotspot/share/opto/loopnode.hpp
+++ b/src/hotspot/share/opto/loopnode.hpp
@@ -943,7 +943,7 @@ public:
}
// build the loop tree and perform any requested optimizations
- void build_and_optimize(LoopOptsMode mode, bool z_barrier_insertion = false);
+ void build_and_optimize(LoopOptsMode mode);
// Dominators for the sea of nodes
void Dominators();
@@ -953,13 +953,13 @@ public:
Node *dom_lca_internal( Node *n1, Node *n2 ) const;
// Compute the Ideal Node to Loop mapping
- PhaseIdealLoop(PhaseIterGVN &igvn, LoopOptsMode mode, bool z_barrier_insertion = false) :
+ PhaseIdealLoop(PhaseIterGVN &igvn, LoopOptsMode mode) :
PhaseTransform(Ideal_Loop),
_igvn(igvn),
_dom_lca_tags(arena()), // Thread::resource_area
_verify_me(NULL),
_verify_only(false) {
- build_and_optimize(mode, z_barrier_insertion);
+ build_and_optimize(mode);
}
// Verify that verify_me made the same decisions as a fresh run.
diff --git a/src/hotspot/share/runtime/stackValue.cpp b/src/hotspot/share/runtime/stackValue.cpp
index cab1de79a..6a67574ad 100644
--- a/src/hotspot/share/runtime/stackValue.cpp
+++ b/src/hotspot/share/runtime/stackValue.cpp
@@ -132,10 +132,9 @@ StackValue* StackValue::create_stack_value(const frame* fr, const RegisterMap* r
val = (oop)NULL;
}
#endif
-#if INCLUDE_ZGC
- // Deoptimization must make sure all oop have passed load barrier
- if (UseZGC) {
- val = ZBarrier::load_barrier_on_oop_field_preloaded((oop*)value_addr, val);
+#if INCLUDE_SHENANDOAHGC
+ if (UseShenandoahGC) {
+ val = ShenandoahBarrierSet::barrier_set()->load_reference_barrier(val);
}
#endif
diff --git a/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java b/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java
index 1cbbf9cfc..ef384e609 100644
--- a/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java