Merge
This commit is contained in:
commit
e714e302c3
@ -236,3 +236,4 @@ d086227bfc45d124f09b3bd72a07956b4073bf71 jdk8-b111
|
|||||||
547316ea137d83d9c63083a9b83db64198fe0c81 jdk8-b112
|
547316ea137d83d9c63083a9b83db64198fe0c81 jdk8-b112
|
||||||
6ba4c7cb623ec612031e05cf8bf279d8f407bd1e jdk8-b113
|
6ba4c7cb623ec612031e05cf8bf279d8f407bd1e jdk8-b113
|
||||||
4f2011496393a26dcfd7b1f7787a3673ddd32599 jdk8-b114
|
4f2011496393a26dcfd7b1f7787a3673ddd32599 jdk8-b114
|
||||||
|
763ada2a1d8c5962bc8c3d297e57c562d2e95338 jdk8-b115
|
||||||
|
@ -391,3 +391,5 @@ f6962730bbde82f279a0ae3a1c14bc5e58096c6e jdk8-b111
|
|||||||
82a9cdbf683e374a76f2009352de53e16bed5a91 hs25-b56
|
82a9cdbf683e374a76f2009352de53e16bed5a91 hs25-b56
|
||||||
7fd913010dbbf75260688fd2fa8964763fa49a09 jdk8-b114
|
7fd913010dbbf75260688fd2fa8964763fa49a09 jdk8-b114
|
||||||
3b32d287da89a47a45d16f6d9ba5bd3cd9bf4b3e hs25-b57
|
3b32d287da89a47a45d16f6d9ba5bd3cd9bf4b3e hs25-b57
|
||||||
|
9ebaac78a8a0061fb9597e07f806498cb626cdeb jdk8-b115
|
||||||
|
e510dfdec6dd701410f3398ed86ebcdff0cca63a hs25-b58
|
||||||
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013
|
|||||||
|
|
||||||
HS_MAJOR_VER=25
|
HS_MAJOR_VER=25
|
||||||
HS_MINOR_VER=0
|
HS_MINOR_VER=0
|
||||||
HS_BUILD_NUMBER=57
|
HS_BUILD_NUMBER=58
|
||||||
|
|
||||||
JDK_MAJOR_VER=1
|
JDK_MAJOR_VER=1
|
||||||
JDK_MINOR_VER=8
|
JDK_MINOR_VER=8
|
||||||
|
@ -3526,8 +3526,12 @@ void MacroAssembler::bang_stack_size(Register Rsize, Register Rtsp,
|
|||||||
delayed()->sub(Rtsp, Roffset, Rtsp);
|
delayed()->sub(Rtsp, Roffset, Rtsp);
|
||||||
|
|
||||||
// Bang down shadow pages too.
|
// Bang down shadow pages too.
|
||||||
// The -1 because we already subtracted 1 page.
|
// At this point, (tmp-0) is the last address touched, so don't
|
||||||
for (int i = 0; i< StackShadowPages-1; i++) {
|
// touch it again. (It was touched as (tmp-pagesize) but then tmp
|
||||||
|
// was post-decremented.) Skip this address by starting at i=1, and
|
||||||
|
// touch a few more pages below. N.B. It is important to touch all
|
||||||
|
// the way down to and including i=StackShadowPages.
|
||||||
|
for (int i = 1; i <= StackShadowPages; i++) {
|
||||||
set((-i*offset)+STACK_BIAS, Rscratch);
|
set((-i*offset)+STACK_BIAS, Rscratch);
|
||||||
st(G0, Rtsp, Rscratch);
|
st(G0, Rtsp, Rscratch);
|
||||||
}
|
}
|
||||||
|
@ -2916,6 +2916,9 @@ enc_class Fast_Unlock(iRegP oop, iRegP box, o7RegP scratch, iRegP scratch2) %{
|
|||||||
__ bind(LSkip2);
|
__ bind(LSkip2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We have no guarantee that on 64 bit the higher half of limit_reg is 0
|
||||||
|
__ signx(limit_reg);
|
||||||
|
|
||||||
__ subcc(limit_reg, 1 * sizeof(jchar), chr1_reg);
|
__ subcc(limit_reg, 1 * sizeof(jchar), chr1_reg);
|
||||||
__ br(Assembler::equal, true, Assembler::pn, Ldone);
|
__ br(Assembler::equal, true, Assembler::pn, Ldone);
|
||||||
__ delayed()->mov(O7, result_reg); // result is difference in lengths
|
__ delayed()->mov(O7, result_reg); // result is difference in lengths
|
||||||
@ -2973,6 +2976,9 @@ enc_class enc_String_Equals(o0RegP str1, o1RegP str2, g3RegI cnt, notemp_iRegI r
|
|||||||
Register chr1_reg = result_reg;
|
Register chr1_reg = result_reg;
|
||||||
Register chr2_reg = tmp1_reg;
|
Register chr2_reg = tmp1_reg;
|
||||||
|
|
||||||
|
// We have no guarantee that on 64 bit the higher half of limit_reg is 0
|
||||||
|
__ signx(limit_reg);
|
||||||
|
|
||||||
//check for alignment and position the pointers to the ends
|
//check for alignment and position the pointers to the ends
|
||||||
__ or3(str1_reg, str2_reg, chr1_reg);
|
__ or3(str1_reg, str2_reg, chr1_reg);
|
||||||
__ andcc(chr1_reg, 0x3, chr1_reg);
|
__ andcc(chr1_reg, 0x3, chr1_reg);
|
||||||
|
@ -196,7 +196,7 @@ void InterpreterMacroAssembler::check_and_handle_earlyret(Register java_thread)
|
|||||||
|
|
||||||
void InterpreterMacroAssembler::get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset) {
|
void InterpreterMacroAssembler::get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset) {
|
||||||
assert(bcp_offset >= 0, "bcp is still pointing to start of bytecode");
|
assert(bcp_offset >= 0, "bcp is still pointing to start of bytecode");
|
||||||
movl(reg, Address(rsi, bcp_offset));
|
load_unsigned_short(reg, Address(rsi, bcp_offset));
|
||||||
bswapl(reg);
|
bswapl(reg);
|
||||||
shrl(reg, 16);
|
shrl(reg, 16);
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ void InterpreterMacroAssembler::get_unsigned_2_byte_index_at_bcp(
|
|||||||
Register reg,
|
Register reg,
|
||||||
int bcp_offset) {
|
int bcp_offset) {
|
||||||
assert(bcp_offset >= 0, "bcp is still pointing to start of bytecode");
|
assert(bcp_offset >= 0, "bcp is still pointing to start of bytecode");
|
||||||
movl(reg, Address(r13, bcp_offset));
|
load_unsigned_short(reg, Address(r13, bcp_offset));
|
||||||
bswapl(reg);
|
bswapl(reg);
|
||||||
shrl(reg, 16);
|
shrl(reg, 16);
|
||||||
}
|
}
|
||||||
|
@ -1381,8 +1381,12 @@ void MacroAssembler::bang_stack_size(Register size, Register tmp) {
|
|||||||
jcc(Assembler::greater, loop);
|
jcc(Assembler::greater, loop);
|
||||||
|
|
||||||
// Bang down shadow pages too.
|
// Bang down shadow pages too.
|
||||||
// The -1 because we already subtracted 1 page.
|
// At this point, (tmp-0) is the last address touched, so don't
|
||||||
for (int i = 0; i< StackShadowPages-1; i++) {
|
// touch it again. (It was touched as (tmp-pagesize) but then tmp
|
||||||
|
// was post-decremented.) Skip this address by starting at i=1, and
|
||||||
|
// touch a few more pages below. N.B. It is important to touch all
|
||||||
|
// the way down to and including i=StackShadowPages.
|
||||||
|
for (int i = 1; i <= StackShadowPages; i++) {
|
||||||
// this could be any sized move but this is can be a debugging crumb
|
// this could be any sized move but this is can be a debugging crumb
|
||||||
// so the bigger the better.
|
// so the bigger the better.
|
||||||
movptr(Address(tmp, (-i*os::vm_page_size())), size );
|
movptr(Address(tmp, (-i*os::vm_page_size())), size );
|
||||||
|
@ -558,7 +558,7 @@ void TemplateTable::aload() {
|
|||||||
|
|
||||||
|
|
||||||
void TemplateTable::locals_index_wide(Register reg) {
|
void TemplateTable::locals_index_wide(Register reg) {
|
||||||
__ movl(reg, at_bcp(2));
|
__ load_unsigned_short(reg, at_bcp(2));
|
||||||
__ bswapl(reg);
|
__ bswapl(reg);
|
||||||
__ shrl(reg, 16);
|
__ shrl(reg, 16);
|
||||||
__ negptr(reg);
|
__ negptr(reg);
|
||||||
@ -1552,7 +1552,11 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
|
|||||||
InvocationCounter::counter_offset();
|
InvocationCounter::counter_offset();
|
||||||
|
|
||||||
// Load up EDX with the branch displacement
|
// Load up EDX with the branch displacement
|
||||||
__ movl(rdx, at_bcp(1));
|
if (is_wide) {
|
||||||
|
__ movl(rdx, at_bcp(1));
|
||||||
|
} else {
|
||||||
|
__ load_signed_short(rdx, at_bcp(1));
|
||||||
|
}
|
||||||
__ bswapl(rdx);
|
__ bswapl(rdx);
|
||||||
if (!is_wide) __ sarl(rdx, 16);
|
if (!is_wide) __ sarl(rdx, 16);
|
||||||
LP64_ONLY(__ movslq(rdx, rdx));
|
LP64_ONLY(__ movslq(rdx, rdx));
|
||||||
|
@ -568,7 +568,7 @@ void TemplateTable::aload() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TemplateTable::locals_index_wide(Register reg) {
|
void TemplateTable::locals_index_wide(Register reg) {
|
||||||
__ movl(reg, at_bcp(2));
|
__ load_unsigned_short(reg, at_bcp(2));
|
||||||
__ bswapl(reg);
|
__ bswapl(reg);
|
||||||
__ shrl(reg, 16);
|
__ shrl(reg, 16);
|
||||||
__ negptr(reg);
|
__ negptr(reg);
|
||||||
@ -1575,7 +1575,11 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
|
|||||||
InvocationCounter::counter_offset();
|
InvocationCounter::counter_offset();
|
||||||
|
|
||||||
// Load up edx with the branch displacement
|
// Load up edx with the branch displacement
|
||||||
__ movl(rdx, at_bcp(1));
|
if (is_wide) {
|
||||||
|
__ movl(rdx, at_bcp(1));
|
||||||
|
} else {
|
||||||
|
__ load_signed_short(rdx, at_bcp(1));
|
||||||
|
}
|
||||||
__ bswapl(rdx);
|
__ bswapl(rdx);
|
||||||
|
|
||||||
if (!is_wide) {
|
if (!is_wide) {
|
||||||
|
@ -122,7 +122,7 @@ void AbstractAssembler::bind(Label& L) {
|
|||||||
void AbstractAssembler::generate_stack_overflow_check( int frame_size_in_bytes) {
|
void AbstractAssembler::generate_stack_overflow_check( int frame_size_in_bytes) {
|
||||||
if (UseStackBanging) {
|
if (UseStackBanging) {
|
||||||
// Each code entry causes one stack bang n pages down the stack where n
|
// Each code entry causes one stack bang n pages down the stack where n
|
||||||
// is configurable by StackBangPages. The setting depends on the maximum
|
// is configurable by StackShadowPages. The setting depends on the maximum
|
||||||
// depth of VM call stack or native before going back into java code,
|
// depth of VM call stack or native before going back into java code,
|
||||||
// since only java code can raise a stack overflow exception using the
|
// since only java code can raise a stack overflow exception using the
|
||||||
// stack banging mechanism. The VM and native code does not detect stack
|
// stack banging mechanism. The VM and native code does not detect stack
|
||||||
|
@ -1138,8 +1138,10 @@ IntervalUseKind LinearScan::use_kind_of_input_operand(LIR_Op* op, LIR_Opr opr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// We want to sometimes use logical operations on pointers, in particular in GC barriers.
|
||||||
} else if (opr_type != T_LONG) {
|
// Since 64bit logical operations do not current support operands on stack, we have to make sure
|
||||||
|
// T_OBJECT doesn't get spilled along with T_LONG.
|
||||||
|
} else if (opr_type != T_LONG LP64_ONLY(&& opr_type != T_OBJECT)) {
|
||||||
// integer instruction (note: long operands must always be in register)
|
// integer instruction (note: long operands must always be in register)
|
||||||
switch (op->code()) {
|
switch (op->code()) {
|
||||||
case lir_cmp:
|
case lir_cmp:
|
||||||
|
@ -392,10 +392,16 @@ class MethodFamily : public ResourceObj {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GrowableArray<Method*> qualified_methods;
|
GrowableArray<Method*> qualified_methods;
|
||||||
|
int num_defaults = 0;
|
||||||
|
int default_index = -1;
|
||||||
for (int i = 0; i < _members.length(); ++i) {
|
for (int i = 0; i < _members.length(); ++i) {
|
||||||
Pair<Method*,QualifiedState> entry = _members.at(i);
|
Pair<Method*,QualifiedState> entry = _members.at(i);
|
||||||
if (entry.second == QUALIFIED) {
|
if (entry.second == QUALIFIED) {
|
||||||
qualified_methods.append(entry.first);
|
qualified_methods.append(entry.first);
|
||||||
|
default_index++;
|
||||||
|
if (entry.first->is_default_method()) {
|
||||||
|
num_defaults++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,6 +414,9 @@ class MethodFamily : public ResourceObj {
|
|||||||
if (!method->is_abstract()) {
|
if (!method->is_abstract()) {
|
||||||
_selected_target = qualified_methods.at(0);
|
_selected_target = qualified_methods.at(0);
|
||||||
}
|
}
|
||||||
|
// If only one qualified method is default, select that
|
||||||
|
} else if (num_defaults == 1) {
|
||||||
|
_selected_target = qualified_methods.at(default_index);
|
||||||
} else {
|
} else {
|
||||||
_exception_message = generate_conflicts_message(&qualified_methods,CHECK);
|
_exception_message = generate_conflicts_message(&qualified_methods,CHECK);
|
||||||
_exception_name = vmSymbols::java_lang_IncompatibleClassChangeError();
|
_exception_name = vmSymbols::java_lang_IncompatibleClassChangeError();
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "code/codeCache.hpp"
|
#include "code/codeCache.hpp"
|
||||||
#include "compiler/compileBroker.hpp"
|
#include "compiler/compileBroker.hpp"
|
||||||
#include "oops/metadata.hpp"
|
#include "oops/metadata.hpp"
|
||||||
|
#include "prims/jvmtiImpl.hpp"
|
||||||
#include "runtime/synchronizer.hpp"
|
#include "runtime/synchronizer.hpp"
|
||||||
#include "runtime/thread.hpp"
|
#include "runtime/thread.hpp"
|
||||||
#include "utilities/growableArray.hpp"
|
#include "utilities/growableArray.hpp"
|
||||||
@ -48,6 +49,7 @@ MetadataOnStackMark::MetadataOnStackMark() {
|
|||||||
Threads::metadata_do(Metadata::mark_on_stack);
|
Threads::metadata_do(Metadata::mark_on_stack);
|
||||||
CodeCache::alive_nmethods_do(nmethod::mark_on_stack);
|
CodeCache::alive_nmethods_do(nmethod::mark_on_stack);
|
||||||
CompileBroker::mark_on_stack();
|
CompileBroker::mark_on_stack();
|
||||||
|
JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
MetadataOnStackMark::~MetadataOnStackMark() {
|
MetadataOnStackMark::~MetadataOnStackMark() {
|
||||||
|
@ -2869,7 +2869,7 @@ void Metaspace::set_narrow_klass_base_and_shift(address metaspace_base, address
|
|||||||
|
|
||||||
Universe::set_narrow_klass_base(lower_base);
|
Universe::set_narrow_klass_base(lower_base);
|
||||||
|
|
||||||
if ((uint64_t)(higher_address - lower_base) < UnscaledClassSpaceMax) {
|
if ((uint64_t)(higher_address - lower_base) <= UnscaledClassSpaceMax) {
|
||||||
Universe::set_narrow_klass_shift(0);
|
Universe::set_narrow_klass_shift(0);
|
||||||
} else {
|
} else {
|
||||||
assert(!UseSharedSpaces, "Cannot shift with UseSharedSpaces");
|
assert(!UseSharedSpaces, "Cannot shift with UseSharedSpaces");
|
||||||
@ -2885,7 +2885,7 @@ bool Metaspace::can_use_cds_with_metaspace_addr(char* metaspace_base, address cd
|
|||||||
address lower_base = MIN2((address)metaspace_base, cds_base);
|
address lower_base = MIN2((address)metaspace_base, cds_base);
|
||||||
address higher_address = MAX2((address)(cds_base + FileMapInfo::shared_spaces_size()),
|
address higher_address = MAX2((address)(cds_base + FileMapInfo::shared_spaces_size()),
|
||||||
(address)(metaspace_base + compressed_class_space_size()));
|
(address)(metaspace_base + compressed_class_space_size()));
|
||||||
return ((uint64_t)(higher_address - lower_base) < UnscaledClassSpaceMax);
|
return ((uint64_t)(higher_address - lower_base) <= UnscaledClassSpaceMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to allocate the metaspace at the requested addr.
|
// Try to allocate the metaspace at the requested addr.
|
||||||
|
@ -848,6 +848,7 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
NOT_PRODUCT( verify_barriers(); )
|
||||||
// Now that we know the size of all the monitors we can add a fixed slot
|
// Now that we know the size of all the monitors we can add a fixed slot
|
||||||
// for the original deopt pc.
|
// for the original deopt pc.
|
||||||
|
|
||||||
@ -3018,12 +3019,17 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
|
|||||||
// Phi nodes shouldn't be moved. They would only match below if they
|
// Phi nodes shouldn't be moved. They would only match below if they
|
||||||
// had the same control as the MathExactNode. The only time that
|
// had the same control as the MathExactNode. The only time that
|
||||||
// would happen is if the Phi is also an input to the MathExact
|
// would happen is if the Phi is also an input to the MathExact
|
||||||
if (!out->is_Phi()) {
|
//
|
||||||
if (out->in(0) == NULL) {
|
// Cmp nodes shouldn't have control set at all.
|
||||||
out->set_req(0, non_throwing);
|
if (out->is_Phi() ||
|
||||||
} else if (out->in(0) == ctrl) {
|
out->is_Cmp()) {
|
||||||
out->set_req(0, non_throwing);
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (out->in(0) == NULL) {
|
||||||
|
out->set_req(0, non_throwing);
|
||||||
|
} else if (out->in(0) == ctrl) {
|
||||||
|
out->set_req(0, non_throwing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3368,6 +3374,72 @@ void Compile::verify_graph_edges(bool no_dead_code) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Verify GC barriers consistency
|
||||||
|
// Currently supported:
|
||||||
|
// - G1 pre-barriers (see GraphKit::g1_write_barrier_pre())
|
||||||
|
void Compile::verify_barriers() {
|
||||||
|
if (UseG1GC) {
|
||||||
|
// Verify G1 pre-barriers
|
||||||
|
const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() + PtrQueue::byte_offset_of_active());
|
||||||
|
|
||||||
|
ResourceArea *area = Thread::current()->resource_area();
|
||||||
|
Unique_Node_List visited(area);
|
||||||
|
Node_List worklist(area);
|
||||||
|
// We're going to walk control flow backwards starting from the Root
|
||||||
|
worklist.push(_root);
|
||||||
|
while (worklist.size() > 0) {
|
||||||
|
Node* x = worklist.pop();
|
||||||
|
if (x == NULL || x == top()) continue;
|
||||||
|
if (visited.member(x)) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
visited.push(x);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x->is_Region()) {
|
||||||
|
for (uint i = 1; i < x->req(); i++) {
|
||||||
|
worklist.push(x->in(i));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
worklist.push(x->in(0));
|
||||||
|
// We are looking for the pattern:
|
||||||
|
// /->ThreadLocal
|
||||||
|
// If->Bool->CmpI->LoadB->AddP->ConL(marking_offset)
|
||||||
|
// \->ConI(0)
|
||||||
|
// We want to verify that the If and the LoadB have the same control
|
||||||
|
// See GraphKit::g1_write_barrier_pre()
|
||||||
|
if (x->is_If()) {
|
||||||
|
IfNode *iff = x->as_If();
|
||||||
|
if (iff->in(1)->is_Bool() && iff->in(1)->in(1)->is_Cmp()) {
|
||||||
|
CmpNode *cmp = iff->in(1)->in(1)->as_Cmp();
|
||||||
|
if (cmp->Opcode() == Op_CmpI && cmp->in(2)->is_Con() && cmp->in(2)->bottom_type()->is_int()->get_con() == 0
|
||||||
|
&& cmp->in(1)->is_Load()) {
|
||||||
|
LoadNode* load = cmp->in(1)->as_Load();
|
||||||
|
if (load->Opcode() == Op_LoadB && load->in(2)->is_AddP() && load->in(2)->in(2)->Opcode() == Op_ThreadLocal
|
||||||
|
&& load->in(2)->in(3)->is_Con()
|
||||||
|
&& load->in(2)->in(3)->bottom_type()->is_intptr_t()->get_con() == marking_offset) {
|
||||||
|
|
||||||
|
Node* if_ctrl = iff->in(0);
|
||||||
|
Node* load_ctrl = load->in(0);
|
||||||
|
|
||||||
|
if (if_ctrl != load_ctrl) {
|
||||||
|
// Skip possible CProj->NeverBranch in infinite loops
|
||||||
|
if ((if_ctrl->is_Proj() && if_ctrl->Opcode() == Op_CProj)
|
||||||
|
&& (if_ctrl->in(0)->is_MultiBranch() && if_ctrl->in(0)->Opcode() == Op_NeverBranch)) {
|
||||||
|
if_ctrl = if_ctrl->in(0)->in(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assert(load_ctrl != NULL && if_ctrl == load_ctrl, "controls must match");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The Compile object keeps track of failure reasons separately from the ciEnv.
|
// The Compile object keeps track of failure reasons separately from the ciEnv.
|
||||||
|
@ -1148,6 +1148,9 @@ class Compile : public Phase {
|
|||||||
// graph is strongly connected from root in both directions.
|
// graph is strongly connected from root in both directions.
|
||||||
void verify_graph_edges(bool no_dead_code = false) PRODUCT_RETURN;
|
void verify_graph_edges(bool no_dead_code = false) PRODUCT_RETURN;
|
||||||
|
|
||||||
|
// Verify GC barrier patterns
|
||||||
|
void verify_barriers() PRODUCT_RETURN;
|
||||||
|
|
||||||
// End-of-run dumps.
|
// End-of-run dumps.
|
||||||
static void print_statistics() PRODUCT_RETURN;
|
static void print_statistics() PRODUCT_RETURN;
|
||||||
|
|
||||||
|
@ -1964,7 +1964,7 @@ void PhaseIdealLoop::do_range_check( IdealLoopTree *loop, Node_List &old_new ) {
|
|||||||
// Find loads off the surviving projection; remove their control edge
|
// Find loads off the surviving projection; remove their control edge
|
||||||
for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
|
for (DUIterator_Fast imax, i = dp->fast_outs(imax); i < imax; i++) {
|
||||||
Node* cd = dp->fast_out(i); // Control-dependent node
|
Node* cd = dp->fast_out(i); // Control-dependent node
|
||||||
if( cd->is_Load() ) { // Loads can now float around in the loop
|
if (cd->is_Load() && cd->depends_only_on_test()) { // Loads can now float around in the loop
|
||||||
// Allow the load to float around in the loop, or before it
|
// Allow the load to float around in the loop, or before it
|
||||||
// but NOT before the pre-loop.
|
// but NOT before the pre-loop.
|
||||||
_igvn.replace_input_of(cd, 0, ctrl); // ctrl, not NULL
|
_igvn.replace_input_of(cd, 0, ctrl); // ctrl, not NULL
|
||||||
|
@ -204,6 +204,17 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
const Type* load_array_final_field(const TypeKlassPtr *tkls,
|
const Type* load_array_final_field(const TypeKlassPtr *tkls,
|
||||||
ciKlass* klass) const;
|
ciKlass* klass) const;
|
||||||
|
// depends_only_on_test is almost always true, and needs to be almost always
|
||||||
|
// true to enable key hoisting & commoning optimizations. However, for the
|
||||||
|
// special case of RawPtr loads from TLS top & end, and other loads performed by
|
||||||
|
// GC barriers, the control edge carries the dependence preventing hoisting past
|
||||||
|
// a Safepoint instead of the memory edge. (An unfortunate consequence of having
|
||||||
|
// Safepoints not set Raw Memory; itself an unfortunate consequence of having Nodes
|
||||||
|
// which produce results (new raw memory state) inside of loops preventing all
|
||||||
|
// manner of other optimizations). Basically, it's ugly but so is the alternative.
|
||||||
|
// See comment in macro.cpp, around line 125 expand_allocate_common().
|
||||||
|
virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------LoadBNode--------------------------------------
|
//------------------------------LoadBNode--------------------------------------
|
||||||
@ -370,16 +381,6 @@ public:
|
|||||||
virtual uint ideal_reg() const { return Op_RegP; }
|
virtual uint ideal_reg() const { return Op_RegP; }
|
||||||
virtual int store_Opcode() const { return Op_StoreP; }
|
virtual int store_Opcode() const { return Op_StoreP; }
|
||||||
virtual BasicType memory_type() const { return T_ADDRESS; }
|
virtual BasicType memory_type() const { return T_ADDRESS; }
|
||||||
// depends_only_on_test is almost always true, and needs to be almost always
|
|
||||||
// true to enable key hoisting & commoning optimizations. However, for the
|
|
||||||
// special case of RawPtr loads from TLS top & end, the control edge carries
|
|
||||||
// the dependence preventing hoisting past a Safepoint instead of the memory
|
|
||||||
// edge. (An unfortunate consequence of having Safepoints not set Raw
|
|
||||||
// Memory; itself an unfortunate consequence of having Nodes which produce
|
|
||||||
// results (new raw memory state) inside of loops preventing all manner of
|
|
||||||
// other optimizations). Basically, it's ugly but so is the alternative.
|
|
||||||
// See comment in macro.cpp, around line 125 expand_allocate_common().
|
|
||||||
virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -393,16 +394,6 @@ public:
|
|||||||
virtual uint ideal_reg() const { return Op_RegN; }
|
virtual uint ideal_reg() const { return Op_RegN; }
|
||||||
virtual int store_Opcode() const { return Op_StoreN; }
|
virtual int store_Opcode() const { return Op_StoreN; }
|
||||||
virtual BasicType memory_type() const { return T_NARROWOOP; }
|
virtual BasicType memory_type() const { return T_NARROWOOP; }
|
||||||
// depends_only_on_test is almost always true, and needs to be almost always
|
|
||||||
// true to enable key hoisting & commoning optimizations. However, for the
|
|
||||||
// special case of RawPtr loads from TLS top & end, the control edge carries
|
|
||||||
// the dependence preventing hoisting past a Safepoint instead of the memory
|
|
||||||
// edge. (An unfortunate consequence of having Safepoints not set Raw
|
|
||||||
// Memory; itself an unfortunate consequence of having Nodes which produce
|
|
||||||
// results (new raw memory state) inside of loops preventing all manner of
|
|
||||||
// other optimizations). Basically, it's ugly but so is the alternative.
|
|
||||||
// See comment in macro.cpp, around line 125 expand_allocate_common().
|
|
||||||
virtual bool depends_only_on_test() const { return adr_type() != TypeRawPtr::BOTTOM; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------LoadKlassNode----------------------------------
|
//------------------------------LoadKlassNode----------------------------------
|
||||||
|
@ -210,6 +210,14 @@ void GrowableCache::oops_do(OopClosure* f) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GrowableCache::metadata_do(void f(Metadata*)) {
|
||||||
|
int len = _elements->length();
|
||||||
|
for (int i=0; i<len; i++) {
|
||||||
|
GrowableElement *e = _elements->at(i);
|
||||||
|
e->metadata_do(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GrowableCache::gc_epilogue() {
|
void GrowableCache::gc_epilogue() {
|
||||||
int len = _elements->length();
|
int len = _elements->length();
|
||||||
for (int i=0; i<len; i++) {
|
for (int i=0; i<len; i++) {
|
||||||
@ -224,20 +232,20 @@ void GrowableCache::gc_epilogue() {
|
|||||||
JvmtiBreakpoint::JvmtiBreakpoint() {
|
JvmtiBreakpoint::JvmtiBreakpoint() {
|
||||||
_method = NULL;
|
_method = NULL;
|
||||||
_bci = 0;
|
_bci = 0;
|
||||||
_class_loader = NULL;
|
_class_holder = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
JvmtiBreakpoint::JvmtiBreakpoint(Method* m_method, jlocation location) {
|
JvmtiBreakpoint::JvmtiBreakpoint(Method* m_method, jlocation location) {
|
||||||
_method = m_method;
|
_method = m_method;
|
||||||
_class_loader = _method->method_holder()->class_loader_data()->class_loader();
|
_class_holder = _method->method_holder()->klass_holder();
|
||||||
#ifdef CHECK_UNHANDLED_OOPS
|
#ifdef CHECK_UNHANDLED_OOPS
|
||||||
// _class_loader can't be wrapped in a Handle, because JvmtiBreakpoint:s are
|
// _class_holder can't be wrapped in a Handle, because JvmtiBreakpoints are
|
||||||
// eventually allocated on the heap.
|
// sometimes allocated on the heap.
|
||||||
//
|
//
|
||||||
// The code handling JvmtiBreakpoint:s allocated on the stack can't be
|
// The code handling JvmtiBreakpoints allocated on the stack can't be
|
||||||
// interrupted by a GC until _class_loader is reachable by the GC via the
|
// interrupted by a GC until _class_holder is reachable by the GC via the
|
||||||
// oops_do method.
|
// oops_do method.
|
||||||
Thread::current()->allow_unhandled_oop(&_class_loader);
|
Thread::current()->allow_unhandled_oop(&_class_holder);
|
||||||
#endif // CHECK_UNHANDLED_OOPS
|
#endif // CHECK_UNHANDLED_OOPS
|
||||||
assert(_method != NULL, "_method != NULL");
|
assert(_method != NULL, "_method != NULL");
|
||||||
_bci = (int) location;
|
_bci = (int) location;
|
||||||
@ -247,7 +255,7 @@ JvmtiBreakpoint::JvmtiBreakpoint(Method* m_method, jlocation location) {
|
|||||||
void JvmtiBreakpoint::copy(JvmtiBreakpoint& bp) {
|
void JvmtiBreakpoint::copy(JvmtiBreakpoint& bp) {
|
||||||
_method = bp._method;
|
_method = bp._method;
|
||||||
_bci = bp._bci;
|
_bci = bp._bci;
|
||||||
_class_loader = bp._class_loader;
|
_class_holder = bp._class_holder;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JvmtiBreakpoint::lessThan(JvmtiBreakpoint& bp) {
|
bool JvmtiBreakpoint::lessThan(JvmtiBreakpoint& bp) {
|
||||||
@ -365,6 +373,13 @@ void VM_ChangeBreakpoints::oops_do(OopClosure* f) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VM_ChangeBreakpoints::metadata_do(void f(Metadata*)) {
|
||||||
|
// Walk metadata in breakpoints to keep from being deallocated with RedefineClasses
|
||||||
|
if (_bp != NULL) {
|
||||||
|
_bp->metadata_do(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// class JvmtiBreakpoints
|
// class JvmtiBreakpoints
|
||||||
//
|
//
|
||||||
@ -381,6 +396,10 @@ void JvmtiBreakpoints::oops_do(OopClosure* f) {
|
|||||||
_bps.oops_do(f);
|
_bps.oops_do(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JvmtiBreakpoints::metadata_do(void f(Metadata*)) {
|
||||||
|
_bps.metadata_do(f);
|
||||||
|
}
|
||||||
|
|
||||||
void JvmtiBreakpoints::gc_epilogue() {
|
void JvmtiBreakpoints::gc_epilogue() {
|
||||||
_bps.gc_epilogue();
|
_bps.gc_epilogue();
|
||||||
}
|
}
|
||||||
@ -499,6 +518,12 @@ void JvmtiCurrentBreakpoints::oops_do(OopClosure* f) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JvmtiCurrentBreakpoints::metadata_do(void f(Metadata*)) {
|
||||||
|
if (_jvmti_breakpoints != NULL) {
|
||||||
|
_jvmti_breakpoints->metadata_do(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void JvmtiCurrentBreakpoints::gc_epilogue() {
|
void JvmtiCurrentBreakpoints::gc_epilogue() {
|
||||||
if (_jvmti_breakpoints != NULL) {
|
if (_jvmti_breakpoints != NULL) {
|
||||||
_jvmti_breakpoints->gc_epilogue();
|
_jvmti_breakpoints->gc_epilogue();
|
||||||
|
@ -69,6 +69,7 @@ public:
|
|||||||
virtual bool lessThan(GrowableElement *e)=0;
|
virtual bool lessThan(GrowableElement *e)=0;
|
||||||
virtual GrowableElement *clone() =0;
|
virtual GrowableElement *clone() =0;
|
||||||
virtual void oops_do(OopClosure* f) =0;
|
virtual void oops_do(OopClosure* f) =0;
|
||||||
|
virtual void metadata_do(void f(Metadata*)) =0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GrowableCache VALUE_OBJ_CLASS_SPEC {
|
class GrowableCache VALUE_OBJ_CLASS_SPEC {
|
||||||
@ -115,6 +116,8 @@ public:
|
|||||||
void clear();
|
void clear();
|
||||||
// apply f to every element and update the cache
|
// apply f to every element and update the cache
|
||||||
void oops_do(OopClosure* f);
|
void oops_do(OopClosure* f);
|
||||||
|
// walk metadata to preserve for RedefineClasses
|
||||||
|
void metadata_do(void f(Metadata*));
|
||||||
// update the cache after a full gc
|
// update the cache after a full gc
|
||||||
void gc_epilogue();
|
void gc_epilogue();
|
||||||
};
|
};
|
||||||
@ -148,6 +151,7 @@ public:
|
|||||||
void remove (int index) { _cache.remove(index); }
|
void remove (int index) { _cache.remove(index); }
|
||||||
void clear() { _cache.clear(); }
|
void clear() { _cache.clear(); }
|
||||||
void oops_do(OopClosure* f) { _cache.oops_do(f); }
|
void oops_do(OopClosure* f) { _cache.oops_do(f); }
|
||||||
|
void metadata_do(void f(Metadata*)) { _cache.metadata_do(f); }
|
||||||
void gc_epilogue() { _cache.gc_epilogue(); }
|
void gc_epilogue() { _cache.gc_epilogue(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -169,7 +173,7 @@ private:
|
|||||||
Method* _method;
|
Method* _method;
|
||||||
int _bci;
|
int _bci;
|
||||||
Bytecodes::Code _orig_bytecode;
|
Bytecodes::Code _orig_bytecode;
|
||||||
oop _class_loader;
|
oop _class_holder; // keeps _method memory from being deallocated
|
||||||
|
|
||||||
public:
|
public:
|
||||||
JvmtiBreakpoint();
|
JvmtiBreakpoint();
|
||||||
@ -191,9 +195,15 @@ public:
|
|||||||
bool lessThan(GrowableElement* e) { Unimplemented(); return false; }
|
bool lessThan(GrowableElement* e) { Unimplemented(); return false; }
|
||||||
bool equals(GrowableElement* e) { return equals((JvmtiBreakpoint&) *e); }
|
bool equals(GrowableElement* e) { return equals((JvmtiBreakpoint&) *e); }
|
||||||
void oops_do(OopClosure* f) {
|
void oops_do(OopClosure* f) {
|
||||||
// Mark the method loader as live
|
// Mark the method loader as live so the Method* class loader doesn't get
|
||||||
f->do_oop(&_class_loader);
|
// unloaded and Method* memory reclaimed.
|
||||||
|
f->do_oop(&_class_holder);
|
||||||
}
|
}
|
||||||
|
void metadata_do(void f(Metadata*)) {
|
||||||
|
// walk metadata to preserve for RedefineClasses
|
||||||
|
f(_method);
|
||||||
|
}
|
||||||
|
|
||||||
GrowableElement *clone() {
|
GrowableElement *clone() {
|
||||||
JvmtiBreakpoint *bp = new JvmtiBreakpoint();
|
JvmtiBreakpoint *bp = new JvmtiBreakpoint();
|
||||||
bp->copy(*this);
|
bp->copy(*this);
|
||||||
@ -239,6 +249,7 @@ public:
|
|||||||
|
|
||||||
int length();
|
int length();
|
||||||
void oops_do(OopClosure* f);
|
void oops_do(OopClosure* f);
|
||||||
|
void metadata_do(void f(Metadata*));
|
||||||
void print();
|
void print();
|
||||||
|
|
||||||
int set(JvmtiBreakpoint& bp);
|
int set(JvmtiBreakpoint& bp);
|
||||||
@ -288,6 +299,7 @@ public:
|
|||||||
static inline bool is_breakpoint(address bcp);
|
static inline bool is_breakpoint(address bcp);
|
||||||
|
|
||||||
static void oops_do(OopClosure* f);
|
static void oops_do(OopClosure* f);
|
||||||
|
static void metadata_do(void f(Metadata*));
|
||||||
static void gc_epilogue();
|
static void gc_epilogue();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -332,6 +344,7 @@ public:
|
|||||||
VMOp_Type type() const { return VMOp_ChangeBreakpoints; }
|
VMOp_Type type() const { return VMOp_ChangeBreakpoints; }
|
||||||
void doit();
|
void doit();
|
||||||
void oops_do(OopClosure* f);
|
void oops_do(OopClosure* f);
|
||||||
|
void metadata_do(void f(Metadata*));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
61
hotspot/test/compiler/intrinsics/mathexact/CompareTest.java
Normal file
61
hotspot/test/compiler/intrinsics/mathexact/CompareTest.java
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013, 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 8026722
|
||||||
|
* @summary Verify that the compare after addExact is a signed compare
|
||||||
|
* @compile CompareTest.java
|
||||||
|
* @run main CompareTest
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class CompareTest {
|
||||||
|
public static long store = 0;
|
||||||
|
public static long addValue = 1231;
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
for (int i = 0; i < 20000; ++i) {
|
||||||
|
runTest(i, i);
|
||||||
|
runTest(i-1, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static long create(long value, int v) {
|
||||||
|
if ((value | v) == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// C2 turned this test into unsigned test when a control edge was set on the Cmp
|
||||||
|
if (value < -31557014167219200L || value > 31556889864403199L) {
|
||||||
|
throw new RuntimeException("error");
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void runTest(long value, int value2) {
|
||||||
|
long res = Math.addExact(value, addValue);
|
||||||
|
store = create(res, Math.floorMod(value2, 100000));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013, 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 8027445
|
||||||
|
* @summary String.equals() may be called with a length whose upper bits are not cleared
|
||||||
|
* @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation TestStringEqualsBadLength
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
public class TestStringEqualsBadLength {
|
||||||
|
|
||||||
|
int v1;
|
||||||
|
int v2;
|
||||||
|
|
||||||
|
boolean m(String s1) {
|
||||||
|
int l = v2 - v1; // 0 - (-1) = 1. On 64 bit: 0xffffffff00000001
|
||||||
|
char[] arr = new char[l];
|
||||||
|
arr[0] = 'a';
|
||||||
|
String s2 = new String(arr);
|
||||||
|
// The string length is not reloaded but the value computed is
|
||||||
|
// reused so pointer computation must not use
|
||||||
|
// 0xffffffff00000001
|
||||||
|
return s2.equals(s1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Same thing with String.compareTo()
|
||||||
|
int m2(String s1) {
|
||||||
|
int l = v2 - v1;
|
||||||
|
char[] arr = new char[l+1];
|
||||||
|
arr[0] = 'a';
|
||||||
|
arr[1] = 'b';
|
||||||
|
String s2 = new String(arr);
|
||||||
|
return s2.compareTo(s1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Same thing with equals() for arrays
|
||||||
|
boolean m3(char[] arr1) {
|
||||||
|
int l = v2 - v1; // 0 - (-1) = 1. On 64 bit: 0xffffffff00000001
|
||||||
|
char[] arr2 = new char[l];
|
||||||
|
arr2[0] = 'a';
|
||||||
|
return Arrays.equals(arr2, arr1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static public void main(String[] args) {
|
||||||
|
TestStringEqualsBadLength tse = new TestStringEqualsBadLength();
|
||||||
|
tse.v1 = -1;
|
||||||
|
tse.v2 = 0;
|
||||||
|
char[] arr = new char[1];
|
||||||
|
arr[0] = 'a';
|
||||||
|
for (int i = 0; i < 20000; i++) {
|
||||||
|
tse.m("a");
|
||||||
|
tse.m2("ab");
|
||||||
|
tse.m3(arr);
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("TEST PASSED");
|
||||||
|
}
|
||||||
|
}
|
45
hotspot/test/compiler/regalloc/C1ObjectSpillInLogicOp.java
Normal file
45
hotspot/test/compiler/regalloc/C1ObjectSpillInLogicOp.java
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2013, 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 8027751
|
||||||
|
* @summary C1 crashes generating G1 post-barrier in Unsafe.getAndSetObject() intrinsic because of the new value spill
|
||||||
|
* @run main/othervm -XX:+UseG1GC C1ObjectSpillInLogicOp
|
||||||
|
*
|
||||||
|
* G1 barriers use logical operators (xor) on T_OBJECT mixed with T_LONG or T_INT.
|
||||||
|
* The current implementation of logical operations on x86 in C1 doesn't allow for long operands to be on stack.
|
||||||
|
* There is a special code in the register allocator that forces long arguments in registers on x86. However T_OBJECT
|
||||||
|
* can be spilled just fine, and in that case the xor emission will fail.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.util.concurrent.atomic.*;
|
||||||
|
class C1ObjectSpillInLogicOp {
|
||||||
|
static public void main(String[] args) {
|
||||||
|
AtomicReferenceArray<Integer> x = new AtomicReferenceArray(128);
|
||||||
|
Integer y = new Integer(0);
|
||||||
|
for (int i = 0; i < 50000; i++) {
|
||||||
|
x.getAndSet(i % x.length(), y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10908
hotspot/test/compiler/uncommontrap/UncommonTrapStackBang.java
Normal file
10908
hotspot/test/compiler/uncommontrap/UncommonTrapStackBang.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -27,7 +27,7 @@
|
|||||||
# Documentation is available via 'webrev -h'.
|
# Documentation is available via 'webrev -h'.
|
||||||
#
|
#
|
||||||
|
|
||||||
WEBREV_UPDATED=25.0-hg+openjdk.java.net
|
WEBREV_UPDATED=25.1-hg+openjdk.java.net
|
||||||
|
|
||||||
HTML='<?xml version="1.0"?>
|
HTML='<?xml version="1.0"?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
@ -1686,19 +1686,20 @@ function build_old_new_mercurial
|
|||||||
# It's a rename (or a move), or a copy, so let's make sure we move
|
# It's a rename (or a move), or a copy, so let's make sure we move
|
||||||
# to the right directory first, then restore it once done
|
# to the right directory first, then restore it once done
|
||||||
current_dir=`pwd`
|
current_dir=`pwd`
|
||||||
cd $CWS/$PDIR
|
hg_root=`hg root`
|
||||||
|
cd $CWS
|
||||||
if [ -n "$rflag" ]; then
|
if [ -n "$rflag" ]; then
|
||||||
parentrev=$PARENT_REV
|
parentrev=$PARENT_REV
|
||||||
elif [ "$HG_LIST_FROM_COMMIT" -eq 1 ]; then
|
elif [ "$HG_LIST_FROM_COMMIT" -eq 1 ]; then
|
||||||
parentrev=$OUTREV
|
parentrev=$OUTREV
|
||||||
fi
|
fi
|
||||||
if [ -z "$parentrev" ]; then
|
if [ -z "$parentrev" ]; then
|
||||||
parentrev=`hg log -l1 $PF | $AWK -F: '/changeset/ {print $2}'`
|
parentrev=`hg log -l1 $PDIR/$PF | $AWK -F: '/changeset/ {print $2}'`
|
||||||
fi
|
fi
|
||||||
if [ -n "$parentrev" ]; then
|
if [ -n "$parentrev" ]; then
|
||||||
mkdir -p $olddir/$PDIR
|
mkdir -p $olddir/$PDIR
|
||||||
if [ -z "$parent" ]; then
|
if [ -z "$parent" ]; then
|
||||||
hg cat --rev $parentrev --output $olddir/$PDIR/$PF $PF 2>/dev/null
|
hg cat -R $hg_root --rev $parentrev --output $olddir/$PDIR/$PF $PDIR/$PF 2>/dev/null
|
||||||
else
|
else
|
||||||
$parent cat --rev $parentrev --output $olddir/$PDIR/$PF $PDIR/$PF 2>/dev/null
|
$parent cat --rev $parentrev --output $olddir/$PDIR/$PF $PDIR/$PF 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user