#includeLUCY_DBG
:)
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 #include"nativeInst_s390.hpp"
i "/oopinlinehpp" # runtime. #includeinclude"/"#
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 35 #ncludeutilities/ostream. #ifdef COMPILER1 #include" #endif
#define LUCY_DBG
//------------------------------------- // N a t i v e I n s t r u c t i o n
// Define this switch to prevent identity updates. // In high-concurrency scenarios, it is beneficial to prevent // identity updates. It has a positive effect on cache line steals. // and invalidations. // Test runs of JVM98, JVM2008, and JBB2005 show a very low frequency // of identity updates. Detection is therefore disabled.
u // and invalidations.
void/ofupdates #ndefSUPPRESS_IDENTITY_UPDATE
// Do not allow: // - NULL // - any address in first page (0x0000 .. 0x0fff)
address ( specification // - any address in first page (0x0000 .. 0x0fff) MacroAssembler:()){returnaddr_atffsetMacroAssembler:();}
/ .
tty->print_cr( // - odd address (will cause a "specification exception")
( address;
}
}
// Print location and value (hex representation) of current NativeInstruction
(char)const int java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 0
if( =NULL
(len
(*)nst_addr-dump64,NativeMovConstReg site is not as); 4:tty>%:%.4 %4"p2i() len,halfword_at0 halfword_at)) break; case6fatal(not instructionaddress); :)
}
guarantee(false, "Not aguarantee(, "Not aNativeMovConstReg site");java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
break
}
{/linewithfillerblanks . switch (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 case:ttyprint_cr "len% 44%"0,,0 ) 4 -print_cr("%) 44 44 s"p2iaddr_at()) halfword_at0,halfword_at( ; caseif(java.lang.StringIndexOutOfBoundsException: Range [43, 20) out of bounds for length 43 case}if:() |
ShouldNotReachHere) break;
}
}
default void:)|
print(NULL);
ShouldNotReachHerei)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
// Hex-Dump of storage around current NativeInstruction. Also try disassembly.
NativeInstruction:( unsigned range char) {
Assembler::VM_Version::z_SIGSEGVjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}}
void return **NULL;
dump switchl)
}case: ->rint_cr( (len=%) 4"p2i 4 >I (len=) 4.x%.x s, case 4: tty->print_cr(INTPTR_FORMAT "(len=%d): %4.4x %4.4x %s", p2i()len java.lang.StringIndexOutOfBoundsException: Range [110, 109) out of bounds for length 158
void::(const
dump}
}
void
S #ifndef SUPPRESS_IDENTITY_UPDATE
**)// There are situations where we have multiple (hopefully two at most)
java.lang.NullPointerException void NativeInstruction::print() const {
*(// oop relocation, modifying the oop itself, and an internal word relocation,
} #endif
ICache/: isthencalled relocation
}
void//
:dump_code_range(, 0), range, (msg ==NULL ?"// address are on a faked, odd instruction address. The instruction can be// found on the next lower, even address. #address:
(*)addr=i #elsepatch_target_addr_pcreloc())
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 38 intjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
bool /ifndefSUPPRESS_IDENTITY_UPDATE
((i){
:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 5
/The methodtoknow situationjava.lang.StringIndexOutOfBoundsException: Range [75, 74) out of bounds for length 90
java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 78
sible /. // - z/Architecture instructions are 2, 4, or 6 bytes in length.
nstruction of opcode. void:atch_compare_immediate_narrow_klass(,(*))
:(,MacroAssembler:); // // If this method returns false, then the 2-byte instruction at *-2 is not a 0x00 opcode. ffset; true -byte at*2(*addr; if
} ifintaddr ;
// We use an illtrap for marking a method as not_entrant. // This NativeMovConstReg site does not need to be patched. It was
IC/ converteda
// (see implementation of is_illegal() for details).
#ifndef ;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
{
}
}
loc endif // is located at the verified entry point. ( // Failure should be handled in next_instruction_address().
/BE:currentjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 72
ICache:nvalidate_word()
address sig_addrendif return
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
bool int
java.lang.StringIndexOutOfBoundsException: Range [2, 0) out of bounds for length 0
:is_branch_pcrelative_long// if necessary.
}
// Also store the value into an oop_Relocation cell, if any. // N a t i v e I l l e g a l I n s t r u c t i o n //---------------------------------------------------
void NativeIllegalInstruction::insert//
NativeIllegalInstruction' requires an nmethod
backwardsjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 86
} /-(=NULL{
//----------------------- // N a t i v e C a l l //-----------------------
iveCallerify
*// instruction is of length 2.
while
}
address // If this method returns true, then the 2-byte instruction at *-2 is a 0x00 opcode.iter.=:
if(:oop_Relocation *r = iter;
return:(here;
return}cb CodeCache:(java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
// Similar to replace_mt_safe, but just changes the destination. The // important thing is that free-running threads are able to execute this // call instruction at all times. Thus, the displacement field must be // 4-byte-aligned. We enforce this on z/Architecture by inserting a nop // instruction in front of 'brasl' when needed. // // Used in the runtime linkage of calls; see class CompiledIC. void: *metadata_addr = (Metadata*java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 43
(" =(assert(metadata_addr =r-etadata_addr( must onemetadata );
return} // Ensure that patching is atomic hence mt safe.
"= relocInfo:one||
( (expected_type == re& )|
} else(expected_type =relocInforeturn:java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
set_word_atjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
= MacroAssembler
}MacroAssembleri(-et_datai);
}
//----------------------------- next_address = loc + MacroAssembler::load_addr_pcrel_size(); //-----------------------------
NativeInstructionv(
if(
:invalidate_range fatal ;
fatal"+java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 68
}
tiveFarCall::destination(assertMacroAssembleris_call_far_patchable_at(address)ctable= ;
MacroAssembler())
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:get_dest_of_call_far_patchable_at((address)this,ctable;
alse"sitefor set_pcrel_addr)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
// Handles both patterns of patchable far calls. void(:java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 86
address
// Set new destination (implementation of call may change here).passed_nm
address
croAssemblers_call_far_patchable_pcrelative_at))
address MacroAssembler} // Need distance of TOC entry from current instruction./ have this
while also nopwhich . // Call is via constant table entry.address revert loopPc alwaysjava.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 105
:=0
nop_bytes ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MacroAssembler:oad_const_from_toc_size;
.Pc areassumed nopnop
))(, ativeMovConstReg:( data a pc- ?); unsignedint ( ={ while(MacroAssembler::is_z_nop(inst_addr+nop_bytes NativeCall VM_Versionz_SIGSEGV;
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
}
+ nop_bytes ;
}
assert(// N a t i v e M o v C o n //-------------------------------------
address target = // want this when assertions are enabled.
false" relative "
java.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
call/else{
false"ot a NativeMovConstReg forset_pcrel_data (;// Failure should be handled in next_instruction_address(). unsigned nop_sz
}}
//------------------------------------- // N a t i v e M o v C o n s t R e g //-------------------------------------
// Do not use an assertion here. Let clients decide whether they only // want this when assertions are enabled.
voidNativeMovConstReg voidNativeMovRegMem:({
/Thiswhile MacroAssembler:(+nop_bytesnop_sz); // call_far_pcrelative. We need to revert this after the
nop_sz :java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 54 unsignednop_bytes= ; while(MacroAssembler:: acroAssemblers_load_narrow_oop()&
nop_bytes += nop_sz;MacroAssembleris_load_narrow_klass()& // Load narrow Klass ptr.
if ) if}
loc +endif// COMPILER1!is_pcrelative_instructionloc)
if(// N a t i v e J u m p
MacroAssembler:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MacroAssembler:()& .
!MacroAssembler::java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 15
:(loc)&
!MacroAssembler VM_Version:fatal" ativeJump' site");
!MacroAssembler::is_pcrelative_instruction(loc)) {}
endif
atch atomically with an fatal :java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 92
int #Buffer)
MacroAssembler* java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 46 #endif
address constant -.
}
acroAssembleris_load_addr_pcrel() (+load_addr_pcrel_size(;
addressjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
address
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ndef
// Load constant from TOC. if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:({ unsignedlonginst
assert:()" jumpinstruction"
ndif
if
(NativeGeneralJump:nsert_unconditionaladdress address )
if (MacroAssembler::is_pcrelative_instructionifdef LUCY_DBG
((NativeMovConstRegAssembler :z_SIGSEGV) #ifdef(*java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
:z_SIGSEGV) ##
(," java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 14 #endif
intptr_tdata {
}
} elsereturn::et_const_from_toc)
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
// Patch in a new constant. // // There are situations where we have multiple (hopefully two at most) // relocations connected to one instruction. Loading an oop from CP // using pcrelative addressing would one such example. Here we have an // oop relocation, modifying the oop itself, and an internal word relocation, // modifying the relative address. // // NativeMovConstReg::set_data is then called once for each relocation. To be // able to distinguish between the relocations, we use a rather dirty hack: // // All calls that deal with an internal word relocation to fix their relative // address are on a faked, odd instruction address. The instruction can be // found on the next lower, even address. // // All other calls are "normal", i.e. on even addresses.
address loc=(;
addressnext_address;
address loc if (MacroAssembler:is_load_addr_pcrel()) {
next_address;
if (MacroAssembler::is_load_addr_pcrel(loc)) {
MacroAssembler:patch_target_addr_pcrel(,(src)
ICache::} else (MacroAssembler:is_load_const_from_toc()
next_address ::set_const_in_toc(loc, src, cb);
} nextaddress=next_instruction_address(;
MacroAssembler:set_const_in_toc(oc ,cb;
//Notmtsafe methodslikeCodeBuffer:(.
(MacroAssembler:is_load_constloc) // Not mt safe, ok in methods like CodeBuffer::copy_code().ICache:invalidate_range(,MacroAssembler:);
(,x;
ICache}
next_address = next_instruction_address();
} // cOops elseif (MacroAssembler::is_load_narrow_oop(loc)) { elseif(:is_load_narrow_oop() {
ICache MacroAssembler:patch_load_narrow_ooploc (void));
=next_instruction_address(;
}n next_instruction_address(; // compressed klass ptrs} else MacroAssembler:(loc)){
MacroAssembler::else if (MacroAssembler::is_load_narrow_klassloc){
ICache::invalidate_range(loc, MacroAssembler::load_narrow_klass_size());
next_address=next_instruction_address();
} // cOops elseif (MacroAssembler::is_compare_immediate_narrow_oop(loc)) {
MacroAssembler::patch_compare_immediate_narrow_oop(loc, cast_to_oop((void*) x)ICache:invalidate_range(loc,MacroAssembler:load_narrow_klass_size);
(, MacroAssembler:compare_immediate_narrow_oop_size());
next_address = next_instruction_address();
} // compressed klass ptrs elseif (MacroAssembler::is_compare_immediate_narrow_klass(loc)) {
MacroAssembler::patch_compare_immediate_narrow_klass(loc, (Klass*)x);
ICache::invalidate_range(loc, MacroAssembler::compare_immediate_narrow_klass_size());
next_address = next_instruction_address();
} elseif (MacroAssembler::java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 3
assert(, "minute!A - call o ShortenBranches?"); // This NativeMovConstReg site does not need to be patched. It was // patched when it was converted to a call_pcrelative site // before. The value of the src argument is not related to theICacheinvalidate_range(, MacroAssembler:compare_immediate_narrow_oop_size();
next_address = next_instruction_address
}
elseelseif(acroAssembler:(loc))
-print_cr": anunrecognized code at = p >0x%8.8x%88"
loc, *((unsignedint*)loc), *((unsignedint*next_address= next_instruction_address(); elseif(is_call_far_patchable_pcrelative_at() #ifdef LUCY_DBG
VM_Version:// This NativeMovConstReg site does not need to be patched. It was #endif
}
next_address= next_instruction_address(;
}
// Divided up in set_data_plain() which patches the instruction in the // code stream and set_data() which additionally patches the oop pool // if necessary.
voidNativeMovConstReg:set_data( ,relocInfo: ){ // Also store the value into an oop_Relocation cell, if any.
CodeBlob cb=CodeCache::find_blob();
loc,*( int)) *( *)(oc4);
/ 'RelocIterator'requiresannmethod
nmethod*ifdefLUCY_DBG if (nm != VM_Version:(;
RelocIterator (nm instruction_address(,next_address)
}
Metadatareturnnext_address; whileiternext() if
oop_Relocation *// Divided up in set_data_plain() which patches the instruction in the if (oop_addr == NULL// if necessary.
oop_addr r>();
*oop_addr = // Also store the value into an oop_Relocation cell, if any.
* CodeCache:find_blobinstruction_address()
assertaddressnext_address set_data_plain(,cb;
/''requires
::(start (lass))java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
soldTarget :l)
:(,MacroAssembler:load_addr_pcrel_size()
next_address
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
addressoldTarget :loc)
MacroAssembler address
:invalidate_range(,MacroAssembler:load_const_from_toc_size()
next_address if:(loc){ if:loc)
assert( MacroAssembler:patch_target_addr_pcrel,(address)newTarget;
next_address ::loc,MacroAssembler:load_addr_pcrel_size()
{
assertfalseNot aNativeMovConstReg forset_pcrel_addr)
next_address next_instruction_address(;// Failure should be handled in next_instruction_address().
}
}
void NativeMovConstReg::set_pcrel_data(intptr_t newData, CompiledMethod *java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 0
address next_address;next_address :load_const_from_toc_size(;
address loc=addr_at();
if(:is_load_const_from_toc(oc // Offset is +/- 2**32 -> use long.
::et_load_const_from_toc_offset()java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 falseNot NativeMovConstRegfor)
next_instruction_address(;// Failure should be handled in next_instruction_address().
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
( )target
next_address;
if (MacroAssembler::is_load_const_from_toc(loc) ) { // Load constant from TOC.
next_address = loc + // Offset is +/- 2**32 -> long. ifMacroAssembler:is_call_far_pcrelative())java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
::set_pcrel_data)hasaproblem setting a relative?); #ifdefintptr_toldData (*target
if( =newData #else
(, "Ooooops: setting data for a pc-relative call"); #endif
next_address = next_instruction_address();
} {
assert(false, "ifdefLUCY_DBG
VM_Version:()
}
#ifdef COMPILER1 //-------------------------------- // N a t i v e M o v R e g M e m //--------------------------------
if(MacroAssembler:is_load_const() {
-cr);
{
tty>()
next_address (;// Failure should be handled in next_instruction_address().
fatal("}
}
} #endif
//----------------------- // N a t i v e J u m p //-----------------------
void // N a t i v e M o v R e g M e m ifaddressl1=0;
fatalif!::java.lang.StringIndexOutOfBoundsException: Range [14, 36) out of bounds for length 14
}
// Patch atomically with an illtrap. void:patch_verified_entry
ResourceMark "is not a NativeJump'site)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
=;
CodeBuffer cb(verified_entry, code_size + ResourceMark ;
MacroAssembler*int=;
ifdef
assertdest= SharedRuntime:) expected fixed destinationof" #
-z_illtrap
ICache:,code_size;
}
#undef LUCY_DBG
//------------------------------------- // N a t i v e G e n e r a l J u m p //-------------------------------------
#ifndef
//--------------------// N a t i v e G e n e r ------------- unsigned
:(){
assertunsigned inst
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
Assemblere
Assembler::simm32 :code_pos ){
*uint64_t instr< ) // Must shift into big end, then the brcl will be written to code_pos.
ICache::invalidate_range(code_pos, instruction_size);
}
void NativeGeneralJump::Assembler::simm32(RelAddr::pcrel_off32( code_pos), 1648;
assert(ntptr_tinstr_addr BytesPerWord-));
we the Patching_lockjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
assert(Patching_lock->owned_by_self(), "must hold lock to patch instruction");
intptr_t bytes_after_jump = (*(intptr_t*)instr_addr) & 0x000000000000ffffL; // 2 bytes after jump.
intptr_t load_const_bytes = (*(intptr_t*)code_buffer) & 0xffffffffffff0000L;
*(intptr_t*)instr_addr = load_const_bytes | bytes_after_jump;
ICache::invalidate_range(instr_addr, 6);
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.25Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.