8187402: UnknownOopException is occurred on Stack Memory window in HSDB
Reviewed-by: sspitsyn, jgeorge
This commit is contained in:
parent
195531f733
commit
858db7244e
@ -2726,8 +2726,12 @@ typedef RehashableHashtable<Symbol*, mtSymbol> RehashableSymbolHashtable;
|
||||
/* JVMCI */ \
|
||||
/****************/ \
|
||||
\
|
||||
declare_preprocessor_constant("INCLUDE_JVMCI", INCLUDE_JVMCI)
|
||||
|
||||
declare_preprocessor_constant("INCLUDE_JVMCI", INCLUDE_JVMCI) \
|
||||
\
|
||||
/****************/ \
|
||||
/* VMRegImpl */ \
|
||||
/****************/ \
|
||||
declare_constant(VMRegImpl::stack_slot_size)
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// VM_LONG_CONSTANTS
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2006, 2017, 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
|
||||
@ -37,6 +37,7 @@ public class VMRegImpl {
|
||||
private static int stack0Val;
|
||||
private static Address stack0Addr;
|
||||
private static AddressField regNameField;
|
||||
private static int stackSlotSize;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
@ -53,6 +54,7 @@ public class VMRegImpl {
|
||||
stack0Val = (int) stack0Addr.hashCode();
|
||||
stack0 = new VMReg(stack0Val);
|
||||
regNameField = type.getAddressField("regName[0]");
|
||||
stackSlotSize = db.lookupIntConstant("VMRegImpl::stack_slot_size");
|
||||
}
|
||||
|
||||
public static VMReg getStack0() {
|
||||
@ -67,4 +69,8 @@ public class VMRegImpl {
|
||||
long addrSize = VM.getVM().getAddressSize();
|
||||
return CStringUtilities.getString(regName.getAddressAt(index * addrSize));
|
||||
}
|
||||
|
||||
public static int getStackSlotSize() {
|
||||
return stackSlotSize;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
@ -430,7 +430,7 @@ public abstract class Frame implements Cloneable {
|
||||
// If it is passed in a register, it got spilled in the stub frame.
|
||||
return regMap.getLocation(reg);
|
||||
} else {
|
||||
long spOffset = VM.getVM().getAddressSize() * reg.minus(stack0);
|
||||
long spOffset = reg.reg2Stack() * VM.getVM().getVMRegImplInfo().getStackSlotSize();
|
||||
return getUnextendedSP().addOffsetTo(spOffset);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2017, 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
|
||||
@ -84,4 +84,8 @@ public class VMReg {
|
||||
public boolean greaterThanOrEqual(VMReg arg) { return value >= arg.value; }
|
||||
|
||||
public int minus(VMReg arg) { return value - arg.value; }
|
||||
|
||||
public int reg2Stack() {
|
||||
return value - VM.getVM().getVMRegImplInfo().getStack0().getValue();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user