mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
7028374: race in fix_oop_relocations for scavengeable nmethods
Reviewed-by: kvn
This commit is contained in:
parent
0317c7c485
commit
f5ef48f3b9
11 changed files with 115 additions and 13 deletions
|
@ -52,6 +52,22 @@ void NativeInstruction::set_data64_sethi(address instaddr, intptr_t x) {
|
|||
ICache::invalidate_range(instaddr, 7 * BytesPerInstWord);
|
||||
}
|
||||
|
||||
void NativeInstruction::verify_data64_sethi(address instaddr, intptr_t x) {
|
||||
ResourceMark rm;
|
||||
unsigned char buffer[10 * BytesPerInstWord];
|
||||
CodeBuffer buf(buffer, 10 * BytesPerInstWord);
|
||||
MacroAssembler masm(&buf);
|
||||
|
||||
Register destreg = inv_rd(*(unsigned int *)instaddr);
|
||||
// Generate the proper sequence into a temporary buffer and compare
|
||||
// it with the original sequence.
|
||||
masm.patchable_sethi(x, destreg);
|
||||
int len = buffer - masm.pc();
|
||||
for (int i = 0; i < len; i++) {
|
||||
assert(instaddr[i] == buffer[i], "instructions must match");
|
||||
}
|
||||
}
|
||||
|
||||
void NativeInstruction::verify() {
|
||||
// make sure code pattern is actually an instruction address
|
||||
address addr = addr_at(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue