Merge
This commit is contained in:
commit
8ae1b404ed
@ -1,2 +1,3 @@
|
||||
cfeea66a3fa8ca3686a7cfa2d0ce8ab0169f168d jdk7-b24
|
||||
cbc8ad9dd0e085a607427ea35411990982f19a36 jdk7-b25
|
||||
9410f77cc30c604d1caf7c9fe3a57fa19e1acbe8 jdk7-b26
|
||||
|
2972
README-builds.html
2972
README-builds.html
File diff suppressed because it is too large
Load Diff
@ -1,170 +1,4 @@
|
||||
^build/solaris/solaris_sparc_compiler1/
|
||||
^build/solaris/solaris_sparc_compiler2/
|
||||
^build/solaris/solaris_sparc_core/
|
||||
^build/solaris/solaris_sparc_kernel/
|
||||
^build/solaris/solaris_sparc_docs/
|
||||
^build/solaris/jdk-solaris-sparc/
|
||||
^build/solaris/export-solaris-sparc/
|
||||
^build/solaris/solaris_sparcv9_compiler1/
|
||||
^build/solaris/solaris_sparcv9_compiler2/
|
||||
^build/solaris/solaris_sparcv9_core/
|
||||
^build/solaris/solaris_sparcv9_kernel/
|
||||
^build/solaris/solaris_sparcv9_docs/
|
||||
^build/solaris/jdk-solaris-sparcv9/
|
||||
^build/solaris/export-solaris-sparcv9/
|
||||
^build/solaris/solaris_sparc32_compiler1/
|
||||
^build/solaris/solaris_sparc32_compiler2/
|
||||
^build/solaris/solaris_sparc32_core/
|
||||
^build/solaris/solaris_sparc32_kernel/
|
||||
^build/solaris/solaris_sparc32_docs/
|
||||
^build/solaris/jdk-solaris-sparc32/
|
||||
^build/solaris/export-solaris-sparc32/
|
||||
^build/solaris/solaris_sparc64_compiler1/
|
||||
^build/solaris/solaris_sparc64_compiler2/
|
||||
^build/solaris/solaris_sparc64_core/
|
||||
^build/solaris/solaris_sparc64_kernel/
|
||||
^build/solaris/solaris_sparc64_docs/
|
||||
^build/solaris/jdk-solaris-sparc64/
|
||||
^build/solaris/export-solaris-sparc64/
|
||||
^build/solaris/solaris_i486_compiler1/
|
||||
^build/solaris/solaris_i486_compiler2/
|
||||
^build/solaris/solaris_i486_core/
|
||||
^build/solaris/solaris_i486_kernel/
|
||||
^build/solaris/solaris_i486_docs/
|
||||
^build/solaris/jdk-solaris-i486/
|
||||
^build/solaris/export-solaris-i486/
|
||||
^build/solaris/solaris_i386_compiler1/
|
||||
^build/solaris/solaris_i386_compiler2/
|
||||
^build/solaris/solaris_i386_core/
|
||||
^build/solaris/solaris_i386_kernel/
|
||||
^build/solaris/solaris_i386_docs/
|
||||
^build/solaris/jdk-solaris-i386/
|
||||
^build/solaris/export-solaris-i386/
|
||||
^build/solaris/solaris_amd64_compiler1/
|
||||
^build/solaris/solaris_amd64_compiler2/
|
||||
^build/solaris/solaris_amd64_core/
|
||||
^build/solaris/solaris_amd64_kernel/
|
||||
^build/solaris/solaris_amd64_docs/
|
||||
^build/solaris/jdk-solaris-amd64/
|
||||
^build/solaris/export-solaris-amd64/
|
||||
^build/solaris/solaris_x64_compiler1/
|
||||
^build/solaris/solaris_x64_compiler2/
|
||||
^build/solaris/solaris_x64_core/
|
||||
^build/solaris/solaris_x64_kernel/
|
||||
^build/solaris/solaris_x64_docs/
|
||||
^build/solaris/jdk-solaris-x64/
|
||||
^build/solaris/export-solaris-x64/
|
||||
^build/windows/windows_sparc_compiler1/
|
||||
^build/windows/windows_sparc_compiler2/
|
||||
^build/windows/windows_sparc_core/
|
||||
^build/windows/windows_sparc_kernel/
|
||||
^build/windows/windows_sparc_docs/
|
||||
^build/windows/jdk-windows-sparc/
|
||||
^build/windows/export-windows-sparc/
|
||||
^build/windows/windows_sparcv9_compiler1/
|
||||
^build/windows/windows_sparcv9_compiler2/
|
||||
^build/windows/windows_sparcv9_core/
|
||||
^build/windows/windows_sparcv9_kernel/
|
||||
^build/windows/windows_sparcv9_docs/
|
||||
^build/windows/jdk-windows-sparcv9/
|
||||
^build/windows/export-windows-sparcv9/
|
||||
^build/windows/windows_sparc32_compiler1/
|
||||
^build/windows/windows_sparc32_compiler2/
|
||||
^build/windows/windows_sparc32_core/
|
||||
^build/windows/windows_sparc32_kernel/
|
||||
^build/windows/windows_sparc32_docs/
|
||||
^build/windows/jdk-windows-sparc32/
|
||||
^build/windows/export-windows-sparc32/
|
||||
^build/windows/windows_sparc64_compiler1/
|
||||
^build/windows/windows_sparc64_compiler2/
|
||||
^build/windows/windows_sparc64_core/
|
||||
^build/windows/windows_sparc64_kernel/
|
||||
^build/windows/windows_sparc64_docs/
|
||||
^build/windows/jdk-windows-sparc64/
|
||||
^build/windows/export-windows-sparc64/
|
||||
^build/windows/windows_i486_compiler1/
|
||||
^build/windows/windows_i486_compiler2/
|
||||
^build/windows/windows_i486_core/
|
||||
^build/windows/windows_i486_kernel/
|
||||
^build/windows/windows_i486_docs/
|
||||
^build/windows/jdk-windows-i486/
|
||||
^build/windows/export-windows-i486/
|
||||
^build/windows/windows_i386_compiler1/
|
||||
^build/windows/windows_i386_compiler2/
|
||||
^build/windows/windows_i386_core/
|
||||
^build/windows/windows_i386_kernel/
|
||||
^build/windows/windows_i386_docs/
|
||||
^build/windows/jdk-windows-i386/
|
||||
^build/windows/export-windows-i386/
|
||||
^build/windows/windows_amd64_compiler1/
|
||||
^build/windows/windows_amd64_compiler2/
|
||||
^build/windows/windows_amd64_core/
|
||||
^build/windows/windows_amd64_kernel/
|
||||
^build/windows/windows_amd64_docs/
|
||||
^build/windows/jdk-windows-amd64/
|
||||
^build/windows/export-windows-amd64/
|
||||
^build/windows/windows_x64_compiler1/
|
||||
^build/windows/windows_x64_compiler2/
|
||||
^build/windows/windows_x64_core/
|
||||
^build/windows/windows_x64_kernel/
|
||||
^build/windows/windows_x64_docs/
|
||||
^build/windows/jdk-windows-x64/
|
||||
^build/windows/export-windows-x64/
|
||||
^build/linux/linux_sparc_compiler1/
|
||||
^build/linux/linux_sparc_compiler2/
|
||||
^build/linux/linux_sparc_core/
|
||||
^build/linux/linux_sparc_kernel/
|
||||
^build/linux/linux_sparc_docs/
|
||||
^build/linux/jdk-linux-sparc/
|
||||
^build/linux/export-linux-sparc/
|
||||
^build/linux/linux_sparcv9_compiler1/
|
||||
^build/linux/linux_sparcv9_compiler2/
|
||||
^build/linux/linux_sparcv9_core/
|
||||
^build/linux/linux_sparcv9_kernel/
|
||||
^build/linux/linux_sparcv9_docs/
|
||||
^build/linux/jdk-linux-sparcv9/
|
||||
^build/linux/export-linux-sparcv9/
|
||||
^build/linux/linux_sparc32_compiler1/
|
||||
^build/linux/linux_sparc32_compiler2/
|
||||
^build/linux/linux_sparc32_core/
|
||||
^build/linux/linux_sparc32_kernel/
|
||||
^build/linux/linux_sparc32_docs/
|
||||
^build/linux/jdk-linux-sparc32/
|
||||
^build/linux/export-linux-sparc32/
|
||||
^build/linux/linux_sparc64_compiler1/
|
||||
^build/linux/linux_sparc64_compiler2/
|
||||
^build/linux/linux_sparc64_core/
|
||||
^build/linux/linux_sparc64_kernel/
|
||||
^build/linux/linux_sparc64_docs/
|
||||
^build/linux/jdk-linux-sparc64/
|
||||
^build/linux/export-linux-sparc64/
|
||||
^build/linux/linux_i486_compiler1/
|
||||
^build/linux/linux_i486_compiler2/
|
||||
^build/linux/linux_i486_core/
|
||||
^build/linux/linux_i486_kernel/
|
||||
^build/linux/linux_i486_docs/
|
||||
^build/linux/jdk-linux-i486/
|
||||
^build/linux/export-linux-i486/
|
||||
^build/linux/linux_i386_compiler1/
|
||||
^build/linux/linux_i386_compiler2/
|
||||
^build/linux/linux_i386_core/
|
||||
^build/linux/linux_i386_kernel/
|
||||
^build/linux/linux_i386_docs/
|
||||
^build/linux/jdk-linux-i386/
|
||||
^build/linux/export-linux-i386/
|
||||
^build/linux/linux_amd64_compiler1/
|
||||
^build/linux/linux_amd64_compiler2/
|
||||
^build/linux/linux_amd64_core/
|
||||
^build/linux/linux_amd64_kernel/
|
||||
^build/linux/linux_amd64_docs/
|
||||
^build/linux/jdk-linux-amd64/
|
||||
^build/linux/export-linux-amd64/
|
||||
^build/linux/linux_x64_compiler1/
|
||||
^build/linux/linux_x64_compiler2/
|
||||
^build/linux/linux_x64_core/
|
||||
^build/linux/linux_x64_kernel/
|
||||
^build/linux/linux_x64_docs/
|
||||
^build/linux/jdk-linux-x64/
|
||||
^build/linux/export-linux-x64/
|
||||
^build/
|
||||
^dist/
|
||||
^nbproject/private/
|
||||
^src/share/tools/hsdis/bin/
|
||||
|
@ -1,2 +1,3 @@
|
||||
a61af66fc99eb5ec9d50c05b0c599757b1289ceb jdk7-b24
|
||||
7836be3e92d0a4f9ee7566f602c91f5609534e66 jdk7-b25
|
||||
ad0b851458ff9d1d490ed2d79bb84f75a9fdb753 jdk7-b26
|
||||
|
@ -885,7 +885,12 @@ public class CommandProcessor {
|
||||
out.println("found at " + addr);
|
||||
}
|
||||
}
|
||||
|
||||
public void visitCompOopAddress(Address addr) {
|
||||
Address val = addr.getCompOopAddressAt(0);
|
||||
if (AddressOps.equal(val, value)) {
|
||||
out.println("found at " + addr);
|
||||
}
|
||||
}
|
||||
public void epilogue() {
|
||||
}
|
||||
};
|
||||
|
@ -1011,8 +1011,21 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener {
|
||||
Assert.that(addr.andWithMask(VM.getVM().getAddressSize() - 1) == null,
|
||||
"Address " + addr + "should have been aligned");
|
||||
}
|
||||
// Check contents
|
||||
OopHandle handle = addr.getOopHandleAt(0);
|
||||
addAnnotation(addr, handle);
|
||||
}
|
||||
|
||||
public void visitCompOopAddress(Address addr) {
|
||||
if (Assert.ASSERTS_ENABLED) {
|
||||
Assert.that(addr.andWithMask(VM.getVM().getAddressSize() - 1) == null,
|
||||
"Address " + addr + "should have been aligned");
|
||||
}
|
||||
OopHandle handle = addr.getCompOopHandleAt(0);
|
||||
addAnnotation(addr, handle);
|
||||
}
|
||||
|
||||
public void addAnnotation(Address addr, OopHandle handle) {
|
||||
// Check contents
|
||||
String anno = "null oop";
|
||||
if (handle != null) {
|
||||
// Find location
|
||||
|
@ -306,6 +306,8 @@ public class HotSpotTypeDataBase extends BasicTypeDataBase {
|
||||
|
||||
entryAddr = entryAddr.addOffsetTo(intConstantEntryArrayStride);
|
||||
} while (nameAddr != null);
|
||||
String symbol = "heapOopSize"; // global int constant and value is initialized at runtime.
|
||||
addIntConstant(symbol, (int)lookupInProcess(symbol).getCIntegerAt(0, 4, false));
|
||||
}
|
||||
|
||||
private void readVMLongConstants() {
|
||||
|
@ -68,7 +68,8 @@ public class OopMapSet extends VMObject {
|
||||
public void visitValueLocation(Address valueAddr) {
|
||||
}
|
||||
|
||||
public void visitDeadLocation(Address deadAddr) {
|
||||
public void visitNarrowOopLocation(Address narrowOopAddr) {
|
||||
addressVisitor.visitCompOopAddress(narrowOopAddr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,9 +198,9 @@ public class OopMapSet extends VMObject {
|
||||
}
|
||||
}
|
||||
|
||||
// We want dead, value and oop oop_types
|
||||
// We want narow oop, value and oop oop_types
|
||||
OopMapValue.OopTypes[] values = new OopMapValue.OopTypes[] {
|
||||
OopMapValue.OopTypes.OOP_VALUE, OopMapValue.OopTypes.VALUE_VALUE, OopMapValue.OopTypes.DEAD_VALUE
|
||||
OopMapValue.OopTypes.OOP_VALUE, OopMapValue.OopTypes.VALUE_VALUE, OopMapValue.OopTypes.NARROWOOP_VALUE
|
||||
};
|
||||
|
||||
{
|
||||
@ -214,8 +215,8 @@ public class OopMapSet extends VMObject {
|
||||
visitor.visitOopLocation(loc);
|
||||
} else if (omv.getType() == OopMapValue.OopTypes.VALUE_VALUE) {
|
||||
visitor.visitValueLocation(loc);
|
||||
} else if (omv.getType() == OopMapValue.OopTypes.DEAD_VALUE) {
|
||||
visitor.visitDeadLocation(loc);
|
||||
} else if (omv.getType() == OopMapValue.OopTypes.NARROWOOP_VALUE) {
|
||||
visitor.visitNarrowOopLocation(loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class OopMapValue {
|
||||
static int UNUSED_VALUE;
|
||||
static int OOP_VALUE;
|
||||
static int VALUE_VALUE;
|
||||
static int DEAD_VALUE;
|
||||
static int NARROWOOP_VALUE;
|
||||
static int CALLEE_SAVED_VALUE;
|
||||
static int DERIVED_OOP_VALUE;
|
||||
|
||||
@ -74,7 +74,7 @@ public class OopMapValue {
|
||||
UNUSED_VALUE = db.lookupIntConstant("OopMapValue::unused_value").intValue();
|
||||
OOP_VALUE = db.lookupIntConstant("OopMapValue::oop_value").intValue();
|
||||
VALUE_VALUE = db.lookupIntConstant("OopMapValue::value_value").intValue();
|
||||
DEAD_VALUE = db.lookupIntConstant("OopMapValue::dead_value").intValue();
|
||||
NARROWOOP_VALUE = db.lookupIntConstant("OopMapValue::narrowoop_value").intValue();
|
||||
CALLEE_SAVED_VALUE = db.lookupIntConstant("OopMapValue::callee_saved_value").intValue();
|
||||
DERIVED_OOP_VALUE = db.lookupIntConstant("OopMapValue::derived_oop_value").intValue();
|
||||
}
|
||||
@ -83,7 +83,7 @@ public class OopMapValue {
|
||||
public static final OopTypes UNUSED_VALUE = new OopTypes() { int getValue() { return OopMapValue.UNUSED_VALUE; }};
|
||||
public static final OopTypes OOP_VALUE = new OopTypes() { int getValue() { return OopMapValue.OOP_VALUE; }};
|
||||
public static final OopTypes VALUE_VALUE = new OopTypes() { int getValue() { return OopMapValue.VALUE_VALUE; }};
|
||||
public static final OopTypes DEAD_VALUE = new OopTypes() { int getValue() { return OopMapValue.DEAD_VALUE; }};
|
||||
public static final OopTypes NARROWOOP_VALUE = new OopTypes() { int getValue() { return OopMapValue.NARROWOOP_VALUE; }};
|
||||
public static final OopTypes CALLEE_SAVED_VALUE = new OopTypes() { int getValue() { return OopMapValue.CALLEE_SAVED_VALUE; }};
|
||||
public static final OopTypes DERIVED_OOP_VALUE = new OopTypes() { int getValue() { return OopMapValue.DERIVED_OOP_VALUE; }};
|
||||
|
||||
@ -106,7 +106,7 @@ public class OopMapValue {
|
||||
// Querying
|
||||
public boolean isOop() { return (getValue() & TYPE_MASK_IN_PLACE) == OOP_VALUE; }
|
||||
public boolean isValue() { return (getValue() & TYPE_MASK_IN_PLACE) == VALUE_VALUE; }
|
||||
public boolean isDead() { return (getValue() & TYPE_MASK_IN_PLACE) == DEAD_VALUE; }
|
||||
public boolean isNarrowOop() { return (getValue() & TYPE_MASK_IN_PLACE) == NARROWOOP_VALUE; }
|
||||
public boolean isCalleeSaved() { return (getValue() & TYPE_MASK_IN_PLACE) == CALLEE_SAVED_VALUE; }
|
||||
public boolean isDerivedOop() { return (getValue() & TYPE_MASK_IN_PLACE) == DERIVED_OOP_VALUE; }
|
||||
|
||||
@ -118,7 +118,7 @@ public class OopMapValue {
|
||||
if (which == UNUSED_VALUE) return OopTypes.UNUSED_VALUE;
|
||||
else if (which == OOP_VALUE) return OopTypes.OOP_VALUE;
|
||||
else if (which == VALUE_VALUE) return OopTypes.VALUE_VALUE;
|
||||
else if (which == DEAD_VALUE) return OopTypes.DEAD_VALUE;
|
||||
else if (which == NARROWOOP_VALUE) return OopTypes.NARROWOOP_VALUE;
|
||||
else if (which == CALLEE_SAVED_VALUE) return OopTypes.CALLEE_SAVED_VALUE;
|
||||
else if (which == DERIVED_OOP_VALUE) return OopTypes.DERIVED_OOP_VALUE;
|
||||
else throw new InternalError("unknown which " + which + " (TYPE_MASK_IN_PLACE = " + TYPE_MASK_IN_PLACE + ")");
|
||||
|
@ -32,5 +32,5 @@ public interface OopMapVisitor {
|
||||
public void visitOopLocation(Address oopAddr);
|
||||
public void visitDerivedOopLocation(Address baseOopAddr, Address derivedOopAddr);
|
||||
public void visitValueLocation(Address valueAddr);
|
||||
public void visitDeadLocation(Address deadAddr);
|
||||
public void visitNarrowOopLocation(Address narrowOopAddr);
|
||||
}
|
||||
|
@ -87,6 +87,8 @@ public interface Address {
|
||||
throws UnmappedAddressException, UnalignedAddressException;
|
||||
/** This returns null if the address at the given offset is NULL. */
|
||||
public Address getAddressAt (long offset) throws UnmappedAddressException, UnalignedAddressException;
|
||||
/** Returns the decoded address at the given offset */
|
||||
public Address getCompOopAddressAt (long offset) throws UnmappedAddressException, UnalignedAddressException;
|
||||
|
||||
//
|
||||
// Java-related routines
|
||||
@ -103,6 +105,8 @@ public interface Address {
|
||||
/** This returns null if the address at the given offset is NULL. */
|
||||
public OopHandle getOopHandleAt (long offset)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException;
|
||||
public OopHandle getCompOopHandleAt (long offset)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException;
|
||||
|
||||
//
|
||||
// C/C++-related mutators. These throw UnmappedAddressException if
|
||||
|
@ -118,6 +118,9 @@ public interface Debugger extends SymbolLookup, ThreadAccess {
|
||||
public long getJIntSize();
|
||||
public long getJLongSize();
|
||||
public long getJShortSize();
|
||||
public long getHeapBase();
|
||||
public long getHeapOopSize();
|
||||
public long getLogMinObjAlignmentInBytes();
|
||||
|
||||
public ReadResult readBytesFromProcess(long address, long numBytes)
|
||||
throws DebuggerException;
|
||||
|
@ -37,6 +37,7 @@ package sun.jvm.hotspot.debugger;
|
||||
DbxDebugger interfaces. </P> */
|
||||
|
||||
public abstract class DebuggerBase implements Debugger {
|
||||
|
||||
// May be set lazily, but must be set before calling any of the read
|
||||
// routines below
|
||||
protected MachineDescription machDesc;
|
||||
@ -52,6 +53,11 @@ public abstract class DebuggerBase implements Debugger {
|
||||
protected long jlongSize;
|
||||
protected long jshortSize;
|
||||
protected boolean javaPrimitiveTypesConfigured;
|
||||
// heap data.
|
||||
protected long oopSize;
|
||||
protected long heapOopSize;
|
||||
protected long heapBase; // heap base for compressed oops.
|
||||
protected long logMinObjAlignmentInBytes; // Used to decode compressed oops.
|
||||
// Should be initialized if desired by calling initCache()
|
||||
private PageCache cache;
|
||||
|
||||
@ -153,6 +159,12 @@ public abstract class DebuggerBase implements Debugger {
|
||||
javaPrimitiveTypesConfigured = true;
|
||||
}
|
||||
|
||||
public void putHeapConst(long heapBase, long heapOopSize, long logMinObjAlignmentInBytes) {
|
||||
this.heapBase = heapBase;
|
||||
this.heapOopSize = heapOopSize;
|
||||
this.logMinObjAlignmentInBytes = logMinObjAlignmentInBytes;
|
||||
}
|
||||
|
||||
/** May be called by subclasses if desired to initialize the page
|
||||
cache but may not be overridden */
|
||||
protected final void initCache(long pageSize, long maxNumPages) {
|
||||
@ -442,6 +454,16 @@ public abstract class DebuggerBase implements Debugger {
|
||||
return readCInteger(address, machDesc.getAddressSize(), true);
|
||||
}
|
||||
|
||||
protected long readCompOopAddressValue(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException {
|
||||
long value = readCInteger(address, getHeapOopSize(), true);
|
||||
if (value != 0) {
|
||||
// See oop.inline.hpp decode_heap_oop
|
||||
value = (long)(heapBase + (long)(value << logMinObjAlignmentInBytes));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
protected void writeAddressValue(long address, long value)
|
||||
throws UnmappedAddressException, UnalignedAddressException {
|
||||
writeCInteger(address, machDesc.getAddressSize(), value);
|
||||
@ -518,4 +540,15 @@ public abstract class DebuggerBase implements Debugger {
|
||||
public long getJShortSize() {
|
||||
return jshortSize;
|
||||
}
|
||||
|
||||
public long getHeapOopSize() {
|
||||
return heapOopSize;
|
||||
}
|
||||
|
||||
public long getHeapBase() {
|
||||
return heapBase;
|
||||
}
|
||||
public long getLogMinObjAlignmentInBytes() {
|
||||
return logMinObjAlignmentInBytes;
|
||||
}
|
||||
}
|
||||
|
@ -42,4 +42,5 @@ public interface JVMDebugger extends Debugger {
|
||||
long jintSize,
|
||||
long jlongSize,
|
||||
long jshortSize);
|
||||
public void putHeapConst(long heapBase, long heapOopSize, long logMinObjAlignment);
|
||||
}
|
||||
|
@ -35,13 +35,6 @@ public interface MachineDescription extends Serializable {
|
||||
able to traverse arrays of pointers or oops. */
|
||||
public long getAddressSize();
|
||||
|
||||
/** Returns the size of an address in bytes. Currently needed to be
|
||||
able to traverse arrays of pointers or oops. (FIXME: since we're
|
||||
already reading the Java primitive types' sizes from the remote
|
||||
VM, it would be nice to remove this routine, using a similar
|
||||
mechanism to how the TypeDataBase deals with primitive types.) */
|
||||
public long getOopSize();
|
||||
|
||||
/** Returns the maximum value of the C integer type with the given
|
||||
size in bytes and signedness. Throws IllegalArgumentException if
|
||||
the size in bytes is not legal for a C type (or can not be
|
||||
|
@ -29,10 +29,6 @@ public class MachineDescriptionAMD64 extends MachineDescriptionTwosComplement im
|
||||
return 8;
|
||||
}
|
||||
|
||||
public long getOopSize() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public boolean isLP64() {
|
||||
return true;
|
||||
}
|
||||
|
@ -29,10 +29,6 @@ public class MachineDescriptionIA64 extends MachineDescriptionTwosComplement imp
|
||||
return 8;
|
||||
}
|
||||
|
||||
public long getOopSize() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public boolean isLP64() {
|
||||
return true;
|
||||
}
|
||||
|
@ -29,10 +29,6 @@ public class MachineDescriptionIntelX86 extends MachineDescriptionTwosComplement
|
||||
return 4;
|
||||
}
|
||||
|
||||
public long getOopSize() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
public boolean isBigEndian() {
|
||||
return false;
|
||||
}
|
||||
|
@ -29,10 +29,6 @@ public class MachineDescriptionSPARC32Bit extends MachineDescriptionTwosCompleme
|
||||
return 4;
|
||||
}
|
||||
|
||||
public long getOopSize() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
public boolean isBigEndian() {
|
||||
return true;
|
||||
}
|
||||
|
@ -29,9 +29,6 @@ public class MachineDescriptionSPARC64Bit extends MachineDescriptionTwosCompleme
|
||||
return 8;
|
||||
}
|
||||
|
||||
public long getOopSize() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public boolean isBigEndian() {
|
||||
return true;
|
||||
|
@ -71,6 +71,9 @@ class DbxAddress implements Address {
|
||||
public Address getAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
|
||||
return debugger.readAddress(addr + offset);
|
||||
}
|
||||
public Address getCompOopAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
|
||||
return debugger.readCompOopAddress(addr + offset);
|
||||
}
|
||||
|
||||
//
|
||||
// Java-related routines
|
||||
@ -113,6 +116,11 @@ class DbxAddress implements Address {
|
||||
return debugger.readOopHandle(addr + offset);
|
||||
}
|
||||
|
||||
public OopHandle getCompOopHandleAt(long offset)
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readCompOopHandle(addr + offset);
|
||||
}
|
||||
|
||||
// Mutators -- not implemented for now (FIXME)
|
||||
public void setCIntegerAt(long offset, long numBytes, long value) {
|
||||
throw new DebuggerException("Unimplemented");
|
||||
|
@ -43,7 +43,9 @@ public interface DbxDebugger extends JVMDebugger {
|
||||
public long readCInteger(long address, long numBytes, boolean isUnsigned)
|
||||
throws DebuggerException;
|
||||
public DbxAddress readAddress(long address) throws DebuggerException;
|
||||
public DbxAddress readCompOopAddress(long address) throws DebuggerException;
|
||||
public DbxOopHandle readOopHandle(long address) throws DebuggerException;
|
||||
public DbxOopHandle readCompOopHandle(long address) throws DebuggerException;
|
||||
public long[] getThreadIntegerRegisterSet(int tid) throws DebuggerException;
|
||||
public Address newAddress(long value) throws DebuggerException;
|
||||
|
||||
|
@ -460,12 +460,23 @@ public class DbxDebuggerLocal extends DebuggerBase implements DbxDebugger {
|
||||
return (value == 0 ? null : new DbxAddress(this, value));
|
||||
}
|
||||
|
||||
public DbxAddress readCompOopAddress(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new DbxAddress(this, value));
|
||||
}
|
||||
|
||||
/** From the DbxDebugger interface */
|
||||
public DbxOopHandle readOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readAddressValue(address);
|
||||
return (value == 0 ? null : new DbxOopHandle(this, value));
|
||||
}
|
||||
public DbxOopHandle readCompOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new DbxOopHandle(this, value));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Thread context access. Can not be package private, but should
|
||||
|
@ -76,6 +76,10 @@ class DummyAddress implements Address {
|
||||
return new DummyAddress(debugger, badLong);
|
||||
}
|
||||
|
||||
public Address getCompOopAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
|
||||
return new DummyAddress(debugger, badLong);
|
||||
}
|
||||
|
||||
//
|
||||
// Java-related routines
|
||||
//
|
||||
@ -116,6 +120,10 @@ class DummyAddress implements Address {
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return new DummyOopHandle(debugger, badLong);
|
||||
}
|
||||
public OopHandle getCompOopHandleAt(long offset)
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return new DummyOopHandle(debugger, badLong);
|
||||
}
|
||||
|
||||
// Mutators -- not implemented
|
||||
public void setCIntegerAt(long offset, long numBytes, long value) {
|
||||
|
@ -74,6 +74,11 @@ class LinuxAddress implements Address {
|
||||
return debugger.readAddress(addr + offset);
|
||||
}
|
||||
|
||||
public Address getCompOopAddressAt(long offset)
|
||||
throws UnalignedAddressException, UnmappedAddressException {
|
||||
return debugger.readCompOopAddress(addr + offset);
|
||||
}
|
||||
|
||||
//
|
||||
// Java-related routines
|
||||
//
|
||||
@ -115,6 +120,11 @@ class LinuxAddress implements Address {
|
||||
return debugger.readOopHandle(addr + offset);
|
||||
}
|
||||
|
||||
public OopHandle getCompOopHandleAt(long offset)
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readCompOopHandle(addr + offset);
|
||||
}
|
||||
|
||||
// Mutators -- not implemented for now (FIXME)
|
||||
public void setCIntegerAt(long offset, long numBytes, long value) {
|
||||
throw new DebuggerException("Unimplemented");
|
||||
|
@ -45,7 +45,9 @@ public interface LinuxDebugger extends JVMDebugger {
|
||||
public long readCInteger(long address, long numBytes, boolean isUnsigned)
|
||||
throws DebuggerException;
|
||||
public LinuxAddress readAddress(long address) throws DebuggerException;
|
||||
public LinuxAddress readCompOopAddress(long address) throws DebuggerException;
|
||||
public LinuxOopHandle readOopHandle(long address) throws DebuggerException;
|
||||
public LinuxOopHandle readCompOopHandle(long address) throws DebuggerException;
|
||||
public long[] getThreadIntegerRegisterSet(int lwp_id) throws DebuggerException;
|
||||
public long getAddressValue(Address addr) throws DebuggerException;
|
||||
public Address newAddress(long value) throws DebuggerException;
|
||||
|
@ -423,6 +423,11 @@ public class LinuxDebuggerLocal extends DebuggerBase implements LinuxDebugger {
|
||||
long value = readAddressValue(address);
|
||||
return (value == 0 ? null : new LinuxAddress(this, value));
|
||||
}
|
||||
public LinuxAddress readCompOopAddress(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new LinuxAddress(this, value));
|
||||
}
|
||||
|
||||
/** From the LinuxDebugger interface */
|
||||
public LinuxOopHandle readOopHandle(long address)
|
||||
@ -431,6 +436,12 @@ public class LinuxDebuggerLocal extends DebuggerBase implements LinuxDebugger {
|
||||
long value = readAddressValue(address);
|
||||
return (value == 0 ? null : new LinuxOopHandle(this, value));
|
||||
}
|
||||
public LinuxOopHandle readCompOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException,
|
||||
NotInHeapException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new LinuxOopHandle(this, value));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Thread context access
|
||||
|
@ -72,6 +72,10 @@ class ProcAddress implements Address {
|
||||
return debugger.readAddress(addr + offset);
|
||||
}
|
||||
|
||||
public Address getCompOopAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
|
||||
return debugger.readCompOopAddress(addr + offset);
|
||||
}
|
||||
|
||||
//
|
||||
// Java-related routines
|
||||
//
|
||||
@ -112,6 +116,10 @@ class ProcAddress implements Address {
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readOopHandle(addr + offset);
|
||||
}
|
||||
public OopHandle getCompOopHandleAt(long offset)
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readCompOopHandle(addr + offset);
|
||||
}
|
||||
|
||||
// Mutators -- not implemented for now (FIXME)
|
||||
public void setCIntegerAt(long offset, long numBytes, long value) {
|
||||
|
@ -46,7 +46,9 @@ public interface ProcDebugger extends JVMDebugger {
|
||||
public long readCInteger(long address, long numBytes, boolean isUnsigned)
|
||||
throws DebuggerException;
|
||||
public ProcAddress readAddress(long address) throws DebuggerException;
|
||||
public ProcAddress readCompOopAddress(long address) throws DebuggerException;
|
||||
public ProcOopHandle readOopHandle(long address) throws DebuggerException;
|
||||
public ProcOopHandle readCompOopHandle(long address) throws DebuggerException;
|
||||
public long[] getThreadIntegerRegisterSet(int tid) throws DebuggerException;
|
||||
public long getAddressValue(Address addr) throws DebuggerException;
|
||||
public Address newAddress(long value) throws DebuggerException;
|
||||
|
@ -53,8 +53,6 @@ import sun.jvm.hotspot.utilities.*;
|
||||
*/
|
||||
|
||||
public class ProcDebuggerLocal extends DebuggerBase implements ProcDebugger {
|
||||
|
||||
|
||||
protected static final int cacheSize = 16 * 1024 * 1024; // 16 MB
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@ -337,10 +335,21 @@ public class ProcDebuggerLocal extends DebuggerBase implements ProcDebugger {
|
||||
return (value == 0 ? null : new ProcAddress(this, value));
|
||||
}
|
||||
|
||||
public ProcAddress readCompOopAddress(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new ProcAddress(this, value));
|
||||
}
|
||||
|
||||
/** From the ProcDebugger interface */
|
||||
public ProcOopHandle readOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readAddressValue(address);
|
||||
long value = readAddressValue(address);
|
||||
return (value == 0 ? null : new ProcOopHandle(this, value));
|
||||
}
|
||||
|
||||
public ProcOopHandle readCompOopHandle(long address) {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new ProcOopHandle(this, value));
|
||||
}
|
||||
|
||||
|
@ -71,6 +71,9 @@ class RemoteAddress implements Address {
|
||||
public Address getAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
|
||||
return debugger.readAddress(addr + offset);
|
||||
}
|
||||
public Address getCompOopAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
|
||||
return debugger.readCompOopAddress(addr + offset);
|
||||
}
|
||||
|
||||
//
|
||||
// Java-related routines
|
||||
@ -112,6 +115,10 @@ class RemoteAddress implements Address {
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readOopHandle(addr + offset);
|
||||
}
|
||||
public OopHandle getCompOopHandleAt(long offset)
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readCompOopHandle(addr + offset);
|
||||
}
|
||||
|
||||
// Mutators -- not implemented for now (FIXME)
|
||||
public void setCIntegerAt(long offset, long numBytes, long value) {
|
||||
|
@ -65,6 +65,9 @@ public interface RemoteDebugger extends Remote {
|
||||
public long getJIntSize() throws RemoteException;
|
||||
public long getJLongSize() throws RemoteException;
|
||||
public long getJShortSize() throws RemoteException;
|
||||
public long getHeapBase() throws RemoteException;
|
||||
public long getHeapOopSize() throws RemoteException;
|
||||
public long getLogMinObjAlignmentInBytes() throws RemoteException;
|
||||
public boolean areThreadsEqual(long addrOrId1, boolean isAddress1,
|
||||
long addrOrId2, boolean isAddress2) throws RemoteException;
|
||||
public int getThreadHashCode(long addrOrId, boolean isAddress) throws RemoteException;
|
||||
|
@ -85,6 +85,9 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
|
||||
jlongSize = remoteDebugger.getJLongSize();
|
||||
jshortSize = remoteDebugger.getJShortSize();
|
||||
javaPrimitiveTypesConfigured = true;
|
||||
heapBase = remoteDebugger.getHeapBase();
|
||||
heapOopSize = remoteDebugger.getHeapOopSize();
|
||||
logMinObjAlignmentInBytes = remoteDebugger.getLogMinObjAlignmentInBytes();
|
||||
}
|
||||
catch (RemoteException e) {
|
||||
throw new DebuggerException(e);
|
||||
@ -298,12 +301,24 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
|
||||
return (value == 0 ? null : new RemoteAddress(this, value));
|
||||
}
|
||||
|
||||
RemoteAddress readCompOopAddress(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new RemoteAddress(this, value));
|
||||
}
|
||||
|
||||
RemoteOopHandle readOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readAddressValue(address);
|
||||
return (value == 0 ? null : new RemoteOopHandle(this, value));
|
||||
}
|
||||
|
||||
RemoteOopHandle readCompOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new RemoteOopHandle(this, value));
|
||||
}
|
||||
|
||||
boolean areThreadsEqual(Address addr1, Address addr2) {
|
||||
try {
|
||||
return remoteDebugger.areThreadsEqual(getAddressValue(addr1), true,
|
||||
|
@ -114,6 +114,17 @@ public class RemoteDebuggerServer extends UnicastRemoteObject
|
||||
return debugger.getJShortSize();
|
||||
}
|
||||
|
||||
public long getHeapBase() throws RemoteException {
|
||||
return debugger.getHeapBase();
|
||||
}
|
||||
|
||||
public long getHeapOopSize() throws RemoteException {
|
||||
return debugger.getHeapOopSize();
|
||||
}
|
||||
|
||||
public long getLogMinObjAlignmentInBytes() throws RemoteException {
|
||||
return debugger.getLogMinObjAlignmentInBytes();
|
||||
}
|
||||
public boolean areThreadsEqual(long addrOrId1, boolean isAddress1,
|
||||
long addrOrId2, boolean isAddress2) throws RemoteException {
|
||||
ThreadProxy t1 = getThreadProxy(addrOrId1, isAddress1);
|
||||
|
@ -72,6 +72,10 @@ class Win32Address implements Address {
|
||||
return debugger.readAddress(addr + offset);
|
||||
}
|
||||
|
||||
public Address getCompOopAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
|
||||
return debugger.readCompOopAddress(addr + offset);
|
||||
}
|
||||
|
||||
//
|
||||
// Java-related routines
|
||||
//
|
||||
@ -112,6 +116,10 @@ class Win32Address implements Address {
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readOopHandle(addr + offset);
|
||||
}
|
||||
public OopHandle getCompOopHandleAt(long offset)
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readCompOopHandle(addr + offset);
|
||||
}
|
||||
|
||||
//
|
||||
// C/C++-related mutators
|
||||
|
@ -45,7 +45,9 @@ public interface Win32Debugger extends JVMDebugger {
|
||||
public long readCInteger(long address, long numBytes, boolean isUnsigned)
|
||||
throws DebuggerException;
|
||||
public Win32Address readAddress(long address) throws DebuggerException;
|
||||
public Win32Address readCompOopAddress(long address) throws DebuggerException;
|
||||
public Win32OopHandle readOopHandle(long address) throws DebuggerException;
|
||||
public Win32OopHandle readCompOopHandle(long address) throws DebuggerException;
|
||||
public void writeJBoolean(long address, boolean value) throws DebuggerException;
|
||||
public void writeJByte(long address, byte value) throws DebuggerException;
|
||||
public void writeJChar(long address, char value) throws DebuggerException;
|
||||
|
@ -306,12 +306,22 @@ public class Win32DebuggerLocal extends DebuggerBase implements Win32Debugger {
|
||||
return (Win32Address) newAddress(readAddressValue(address));
|
||||
}
|
||||
|
||||
public Win32Address readCompOopAddress(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException {
|
||||
return (Win32Address) newAddress(readCompOopAddressValue(address));
|
||||
}
|
||||
|
||||
/** From the Win32Debugger interface */
|
||||
public Win32OopHandle readOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readAddressValue(address);
|
||||
return (value == 0 ? null : new Win32OopHandle(this, value));
|
||||
}
|
||||
public Win32OopHandle readCompOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new Win32OopHandle(this, value));
|
||||
}
|
||||
|
||||
/** From the Win32Debugger interface */
|
||||
public void writeAddress(long address, Win32Address value) {
|
||||
|
@ -72,6 +72,10 @@ class WindbgAddress implements Address {
|
||||
return debugger.readAddress(addr + offset);
|
||||
}
|
||||
|
||||
public Address getCompOopAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
|
||||
return debugger.readCompOopAddress(addr + offset);
|
||||
}
|
||||
|
||||
//
|
||||
// Java-related routines
|
||||
//
|
||||
@ -113,6 +117,10 @@ class WindbgAddress implements Address {
|
||||
return debugger.readOopHandle(addr + offset);
|
||||
}
|
||||
|
||||
public OopHandle getCompOopHandleAt(long offset)
|
||||
throws UnalignedAddressException, UnmappedAddressException, NotInHeapException {
|
||||
return debugger.readCompOopHandle(addr + offset);
|
||||
}
|
||||
//
|
||||
// C/C++-related mutators
|
||||
//
|
||||
|
@ -45,7 +45,9 @@ public interface WindbgDebugger extends JVMDebugger {
|
||||
public long readCInteger(long address, long numBytes, boolean isUnsigned)
|
||||
throws DebuggerException;
|
||||
public WindbgAddress readAddress(long address) throws DebuggerException;
|
||||
public WindbgAddress readCompOopAddress(long address) throws DebuggerException;
|
||||
public WindbgOopHandle readOopHandle(long address) throws DebuggerException;
|
||||
public WindbgOopHandle readCompOopHandle(long address) throws DebuggerException;
|
||||
|
||||
// The returned array of register contents is guaranteed to be in
|
||||
// the same order as in the DbxDebugger for Solaris/x86 or amd64; that is,
|
||||
|
@ -39,6 +39,7 @@ import sun.jvm.hotspot.debugger.cdbg.*;
|
||||
import sun.jvm.hotspot.debugger.cdbg.basic.BasicDebugEvent;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
import sun.jvm.hotspot.utilities.memo.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
/** <P> An implementation of the JVMDebugger interface which talks to
|
||||
windbg and symbol table management is done in Java. </P>
|
||||
@ -315,12 +316,22 @@ public class WindbgDebuggerLocal extends DebuggerBase implements WindbgDebugger
|
||||
return (WindbgAddress) newAddress(readAddressValue(address));
|
||||
}
|
||||
|
||||
public WindbgAddress readCompOopAddress(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException {
|
||||
return (WindbgAddress) newAddress(readCompOopAddressValue(address));
|
||||
}
|
||||
|
||||
/** From the WindbgDebugger interface */
|
||||
public WindbgOopHandle readOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readAddressValue(address);
|
||||
return (value == 0 ? null : new WindbgOopHandle(this, value));
|
||||
}
|
||||
public WindbgOopHandle readCompOopHandle(long address)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
long value = readCompOopAddressValue(address);
|
||||
return (value == 0 ? null : new WindbgOopHandle(this, value));
|
||||
}
|
||||
|
||||
/** From the WindbgDebugger interface */
|
||||
public int getAddressSize() {
|
||||
|
@ -63,12 +63,22 @@ public class SystemDictionary {
|
||||
javaSystemLoaderField = type.getOopField("_java_system_loader");
|
||||
nofBuckets = db.lookupIntConstant("SystemDictionary::_nof_buckets").intValue();
|
||||
|
||||
objectKlassField = type.getOopField("_object_klass");
|
||||
classLoaderKlassField = type.getOopField("_classloader_klass");
|
||||
stringKlassField = type.getOopField("_string_klass");
|
||||
systemKlassField = type.getOopField("_system_klass");
|
||||
threadKlassField = type.getOopField("_thread_klass");
|
||||
threadGroupKlassField = type.getOopField("_threadGroup_klass");
|
||||
objectKlassField = type.getOopField(WK_KLASS("object_klass"));
|
||||
classLoaderKlassField = type.getOopField(WK_KLASS("classloader_klass"));
|
||||
stringKlassField = type.getOopField(WK_KLASS("string_klass"));
|
||||
systemKlassField = type.getOopField(WK_KLASS("system_klass"));
|
||||
threadKlassField = type.getOopField(WK_KLASS("thread_klass"));
|
||||
threadGroupKlassField = type.getOopField(WK_KLASS("threadGroup_klass"));
|
||||
}
|
||||
|
||||
// This WK functions must follow the definitions in systemDictionary.hpp:
|
||||
private static String WK_KLASS(String name) {
|
||||
//#define WK_KLASS(name) _well_known_klasses[SystemDictionary::WK_KLASS_ENUM_NAME(name)]
|
||||
return ("_well_known_klasses[SystemDictionary::"+WK_KLASS_ENUM_NAME(name)+"]");
|
||||
}
|
||||
private static String WK_KLASS_ENUM_NAME(String kname) {
|
||||
//#define WK_KLASS_ENUM_NAME(kname) kname##_knum
|
||||
return (kname+"_knum");
|
||||
}
|
||||
|
||||
public Dictionary dictionary() {
|
||||
|
@ -53,6 +53,8 @@ public class Universe {
|
||||
// system obj array klass object
|
||||
private static sun.jvm.hotspot.types.OopField systemObjArrayKlassObjField;
|
||||
|
||||
private static AddressField heapBaseField;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
@ -83,6 +85,8 @@ public class Universe {
|
||||
doubleArrayKlassObjField = type.getOopField("_doubleArrayKlassObj");
|
||||
|
||||
systemObjArrayKlassObjField = type.getOopField("_systemObjArrayKlassObj");
|
||||
|
||||
heapBaseField = type.getAddressField("_heap_base");
|
||||
}
|
||||
|
||||
public Universe() {
|
||||
@ -96,6 +100,14 @@ public class Universe {
|
||||
}
|
||||
}
|
||||
|
||||
public static long getHeapBase() {
|
||||
if (heapBaseField.getValue() == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return heapBaseField.getValue().minus(null);
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns "TRUE" iff "p" points into the allocated area of the heap. */
|
||||
public boolean isIn(Address p) {
|
||||
return heap().isIn(p);
|
||||
|
@ -47,18 +47,52 @@ public class Array extends Oop {
|
||||
|
||||
private static void initialize(TypeDataBase db) throws WrongTypeException {
|
||||
Type type = db.lookupType("arrayOopDesc");
|
||||
length = new CIntField(type.getCIntegerField("_length"), 0);
|
||||
headerSize = type.getSize();
|
||||
typeSize = (int)type.getSize();
|
||||
}
|
||||
|
||||
// Size of the arrayOopDesc
|
||||
private static long headerSize;
|
||||
private static long headerSize=0;
|
||||
private static long lengthOffsetInBytes=0;
|
||||
private static long typeSize;
|
||||
|
||||
// Fields
|
||||
private static CIntField length;
|
||||
private static long headerSizeInBytes() {
|
||||
if (headerSize != 0) {
|
||||
return headerSize;
|
||||
}
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
headerSize = typeSize;
|
||||
} else {
|
||||
headerSize = VM.getVM().alignUp(typeSize + VM.getVM().getIntSize(),
|
||||
VM.getVM().getHeapWordSize());
|
||||
}
|
||||
return headerSize;
|
||||
}
|
||||
|
||||
private static long headerSize(BasicType type) {
|
||||
if (Universe.elementTypeShouldBeAligned(type)) {
|
||||
return alignObjectSize(headerSizeInBytes())/VM.getVM().getHeapWordSize();
|
||||
} else {
|
||||
return headerSizeInBytes()/VM.getVM().getHeapWordSize();
|
||||
}
|
||||
}
|
||||
|
||||
private long lengthOffsetInBytes() {
|
||||
if (lengthOffsetInBytes != 0) {
|
||||
return lengthOffsetInBytes;
|
||||
}
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
lengthOffsetInBytes = typeSize - VM.getVM().getIntSize();
|
||||
} else {
|
||||
lengthOffsetInBytes = typeSize;
|
||||
}
|
||||
return lengthOffsetInBytes;
|
||||
}
|
||||
|
||||
// Accessors for declared fields
|
||||
public long getLength() { return length.getValue(this); }
|
||||
public long getLength() {
|
||||
boolean isUnsigned = true;
|
||||
return this.getHandle().getCIntegerAt(lengthOffsetInBytes(), VM.getVM().getIntSize(), isUnsigned);
|
||||
}
|
||||
|
||||
public long getObjectSize() {
|
||||
ArrayKlass klass = (ArrayKlass) getKlass();
|
||||
@ -72,20 +106,12 @@ public class Array extends Oop {
|
||||
}
|
||||
|
||||
public static long baseOffsetInBytes(BasicType type) {
|
||||
if (Universe.elementTypeShouldBeAligned(type)) {
|
||||
return (VM.getVM().isLP64()) ? alignObjectSize(headerSize)
|
||||
: VM.getVM().alignUp(headerSize, 8);
|
||||
} else {
|
||||
return headerSize;
|
||||
}
|
||||
return headerSize(type) * VM.getVM().getHeapWordSize();
|
||||
}
|
||||
|
||||
public boolean isArray() { return true; }
|
||||
|
||||
public void iterateFields(OopVisitor visitor, boolean doVMFields) {
|
||||
super.iterateFields(visitor, doVMFields);
|
||||
if (doVMFields) {
|
||||
visitor.doCInt(length, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,10 +31,10 @@ import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// A ConstantPool is an array containing class constants
|
||||
// A ConstantPool is an oop containing class constants
|
||||
// as described in the class file
|
||||
|
||||
public class ConstantPool extends Array implements ClassConstants {
|
||||
public class ConstantPool extends Oop implements ClassConstants {
|
||||
// Used for debugging this code
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
@ -55,8 +55,9 @@ public class ConstantPool extends Array implements ClassConstants {
|
||||
tags = new OopField(type.getOopField("_tags"), 0);
|
||||
cache = new OopField(type.getOopField("_cache"), 0);
|
||||
poolHolder = new OopField(type.getOopField("_pool_holder"), 0);
|
||||
length = new CIntField(type.getCIntegerField("_length"), 0);
|
||||
headerSize = type.getSize();
|
||||
elementSize = db.getOopSize();
|
||||
elementSize = 0;
|
||||
}
|
||||
|
||||
ConstantPool(OopHandle handle, ObjectHeap heap) {
|
||||
@ -68,7 +69,7 @@ public class ConstantPool extends Array implements ClassConstants {
|
||||
private static OopField tags;
|
||||
private static OopField cache;
|
||||
private static OopField poolHolder;
|
||||
|
||||
private static CIntField length; // number of elements in oop
|
||||
|
||||
private static long headerSize;
|
||||
private static long elementSize;
|
||||
@ -76,12 +77,22 @@ public class ConstantPool extends Array implements ClassConstants {
|
||||
public TypeArray getTags() { return (TypeArray) tags.getValue(this); }
|
||||
public ConstantPoolCache getCache() { return (ConstantPoolCache) cache.getValue(this); }
|
||||
public Klass getPoolHolder() { return (Klass) poolHolder.getValue(this); }
|
||||
public int getLength() { return (int)length.getValue(this); }
|
||||
|
||||
private long getElementSize() {
|
||||
if (elementSize !=0 ) {
|
||||
return elementSize;
|
||||
} else {
|
||||
elementSize = VM.getVM().getOopSize();
|
||||
}
|
||||
return elementSize;
|
||||
}
|
||||
|
||||
private long indexOffset(long index) {
|
||||
if (Assert.ASSERTS_ENABLED) {
|
||||
Assert.that(index > 0 && index < getLength(), "invalid cp index");
|
||||
Assert.that(index > 0 && index < getLength(), "invalid cp index " + index + " " + getLength());
|
||||
}
|
||||
return (index * elementSize) + headerSize;
|
||||
return (index * getElementSize()) + headerSize;
|
||||
}
|
||||
|
||||
public ConstantTag getTagAt(long index) {
|
||||
@ -464,7 +475,7 @@ public class ConstantPool extends Array implements ClassConstants {
|
||||
}
|
||||
|
||||
public long getObjectSize() {
|
||||
return alignObjectSize(headerSize + (getLength() * elementSize));
|
||||
return alignObjectSize(headerSize + (getLength() * getElementSize()));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -31,10 +31,10 @@ import sun.jvm.hotspot.runtime.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
// A ConstantPool is an array containing class constants
|
||||
// as described in the class file
|
||||
|
||||
public class ConstantPoolCache extends Array {
|
||||
// ConstantPoolCache : A constant pool cache (constantPoolCacheOopDesc).
|
||||
// See cpCacheOop.hpp for details about this class.
|
||||
//
|
||||
public class ConstantPoolCache extends Oop {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
@ -47,9 +47,9 @@ public class ConstantPoolCache extends Array {
|
||||
Type type = db.lookupType("constantPoolCacheOopDesc");
|
||||
constants = new OopField(type.getOopField("_constant_pool"), 0);
|
||||
baseOffset = type.getSize();
|
||||
|
||||
Type elType = db.lookupType("ConstantPoolCacheEntry");
|
||||
elementSize = elType.getSize();
|
||||
length = new CIntField(type.getCIntegerField("_length"), 0);
|
||||
}
|
||||
|
||||
ConstantPoolCache(OopHandle handle, ObjectHeap heap) {
|
||||
@ -62,6 +62,8 @@ public class ConstantPoolCache extends Array {
|
||||
|
||||
private static long baseOffset;
|
||||
private static long elementSize;
|
||||
private static CIntField length;
|
||||
|
||||
|
||||
public ConstantPool getConstants() { return (ConstantPool) constants.getValue(this); }
|
||||
|
||||
@ -87,6 +89,10 @@ public class ConstantPoolCache extends Array {
|
||||
tty.print("ConstantPoolCache for " + getConstants().getPoolHolder().getName().asString());
|
||||
}
|
||||
|
||||
public int getLength() {
|
||||
return (int) length.getValue(this);
|
||||
}
|
||||
|
||||
public void iterateFields(OopVisitor visitor, boolean doVMFields) {
|
||||
super.iterateFields(visitor, doVMFields);
|
||||
if (doVMFields) {
|
||||
|
@ -32,7 +32,7 @@ import sun.jvm.hotspot.types.*;
|
||||
|
||||
// A ConstantPoolCacheKlass is the klass of a ConstantPoolCache
|
||||
|
||||
public class ConstantPoolCacheKlass extends ArrayKlass {
|
||||
public class ConstantPoolCacheKlass extends Klass {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
@ -43,13 +43,20 @@ public class ConstantPoolCacheKlass extends ArrayKlass {
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
|
||||
Type type = db.lookupType("constantPoolCacheKlass");
|
||||
headerSize = type.getSize() + Oop.getHeaderSize();
|
||||
}
|
||||
|
||||
ConstantPoolCacheKlass(OopHandle handle, ObjectHeap heap) {
|
||||
super(handle, heap);
|
||||
}
|
||||
|
||||
public long getObjectSize() { return alignObjectSize(headerSize); }
|
||||
|
||||
public void printValueOn(PrintStream tty) {
|
||||
tty.print("ConstantPoolCacheKlass");
|
||||
}
|
||||
|
||||
private static long headerSize;
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ import sun.jvm.hotspot.types.*;
|
||||
|
||||
// A ConstantPoolKlass is the klass of a ConstantPool
|
||||
|
||||
public class ConstantPoolKlass extends ArrayKlass {
|
||||
public class ConstantPoolKlass extends Klass {
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
public void update(Observable o, Object data) {
|
||||
@ -43,13 +43,19 @@ public class ConstantPoolKlass extends ArrayKlass {
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
|
||||
Type type = db.lookupType("constantPoolKlass");
|
||||
headerSize = type.getSize() + Oop.getHeaderSize();
|
||||
}
|
||||
|
||||
ConstantPoolKlass(OopHandle handle, ObjectHeap heap) {
|
||||
super(handle, heap);
|
||||
}
|
||||
|
||||
public long getObjectSize() { return alignObjectSize(headerSize); }
|
||||
|
||||
public void printValueOn(PrintStream tty) {
|
||||
tty.print("ConstantPoolKlass");
|
||||
}
|
||||
};
|
||||
|
||||
private static long headerSize;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ public class DefaultOopVisitor implements OopVisitor {
|
||||
|
||||
// Callback methods for each field type in an object
|
||||
public void doOop(OopField field, boolean isVMField) {}
|
||||
public void doOop(NarrowOopField field, boolean isVMField) {}
|
||||
public void doByte(ByteField field, boolean isVMField) {}
|
||||
public void doChar(CharField field, boolean isVMField) {}
|
||||
public void doBoolean(BooleanField field, boolean isVMField) {}
|
||||
|
@ -40,15 +40,26 @@ public class Instance extends Oop {
|
||||
}
|
||||
});
|
||||
}
|
||||
private static long typeSize;
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
|
||||
Type type = db.lookupType("instanceOopDesc");
|
||||
typeSize = type.getSize();
|
||||
}
|
||||
|
||||
Instance(OopHandle handle, ObjectHeap heap) {
|
||||
super(handle, heap);
|
||||
}
|
||||
|
||||
// Returns header size in bytes.
|
||||
public static long getHeaderSize() {
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
return typeSize - VM.getVM().getIntSize();
|
||||
} else {
|
||||
return typeSize;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isInstance() { return true; }
|
||||
|
||||
public void iterateFields(OopVisitor visitor, boolean doVMFields) {
|
||||
|
@ -467,7 +467,6 @@ public class InstanceKlass extends Klass {
|
||||
for (int index = 0; index < length; index += NEXT_OFFSET) {
|
||||
short accessFlags = fields.getShortAt(index + ACCESS_FLAGS_OFFSET);
|
||||
short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET);
|
||||
|
||||
FieldType type = new FieldType((Symbol) getConstants().getObjAt(signatureIndex));
|
||||
AccessFlags access = new AccessFlags(accessFlags);
|
||||
if (access.isStatic()) {
|
||||
@ -790,7 +789,11 @@ public class InstanceKlass extends Klass {
|
||||
short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET);
|
||||
FieldType type = new FieldType((Symbol) getConstants().getObjAt(signatureIndex));
|
||||
if (type.isOop()) {
|
||||
return new OopField(this, index);
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
return new NarrowOopField(this, index);
|
||||
} else {
|
||||
return new OopField(this, index);
|
||||
}
|
||||
}
|
||||
if (type.isByte()) {
|
||||
return new ByteField(this, index);
|
||||
|
@ -171,8 +171,7 @@ public class Klass extends Oop implements ClassConstants {
|
||||
}
|
||||
|
||||
public long getObjectSize() {
|
||||
System.out.println("should not reach here");
|
||||
return 0;
|
||||
throw new RuntimeException("should not reach here");
|
||||
}
|
||||
|
||||
/** Array class with specific rank */
|
||||
|
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2000-2008 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.oops;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
|
||||
// The class for an oop field simply provides access to the value.
|
||||
public class NarrowOopField extends OopField {
|
||||
public NarrowOopField(FieldIdentifier id, long offset, boolean isVMField) {
|
||||
super(id, offset, isVMField);
|
||||
}
|
||||
|
||||
public NarrowOopField(sun.jvm.hotspot.types.OopField vmField, long startOffset) {
|
||||
super(new NamedFieldIdentifier(vmField.getName()), vmField.getOffset() + startOffset, true);
|
||||
}
|
||||
|
||||
public NarrowOopField(InstanceKlass holder, int fieldArrayIndex) {
|
||||
super(holder, fieldArrayIndex);
|
||||
}
|
||||
|
||||
public Oop getValue(Oop obj) {
|
||||
return obj.getHeap().newOop(getValueAsOopHandle(obj));
|
||||
}
|
||||
|
||||
/** Debugging support */
|
||||
public OopHandle getValueAsOopHandle(Oop obj) {
|
||||
return obj.getHandle().getCompOopHandleAt(getOffset());
|
||||
}
|
||||
|
||||
public void setValue(Oop obj) throws MutationException {
|
||||
// Fix this: setOopAt is missing in Address
|
||||
}
|
||||
}
|
@ -43,7 +43,7 @@ public class ObjArray extends Array {
|
||||
|
||||
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
|
||||
Type type = db.lookupType("objArrayOopDesc");
|
||||
elementSize = db.getOopSize();
|
||||
elementSize = VM.getVM().getHeapOopSize();
|
||||
}
|
||||
|
||||
ObjArray(OopHandle handle, ObjectHeap heap) {
|
||||
@ -54,9 +54,17 @@ public class ObjArray extends Array {
|
||||
|
||||
private static long elementSize;
|
||||
|
||||
public Oop getObjAt(long index) {
|
||||
public OopHandle getOopHandleAt(long index) {
|
||||
long offset = baseOffsetInBytes(BasicType.T_OBJECT) + (index * elementSize);
|
||||
return getHeap().newOop(getHandle().getOopHandleAt(offset));
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
return getHandle().getCompOopHandleAt(offset);
|
||||
} else {
|
||||
return getHandle().getOopHandleAt(offset);
|
||||
}
|
||||
}
|
||||
|
||||
public Oop getObjAt(long index) {
|
||||
return getHeap().newOop(getOopHandleAt(index));
|
||||
}
|
||||
|
||||
public void printValueOn(PrintStream tty) {
|
||||
@ -69,7 +77,13 @@ public class ObjArray extends Array {
|
||||
long baseOffset = baseOffsetInBytes(BasicType.T_OBJECT);
|
||||
for (int index = 0; index < length; index++) {
|
||||
long offset = baseOffset + (index * elementSize);
|
||||
visitor.doOop(new OopField(new IndexableFieldIdentifier(index), offset, false), false);
|
||||
OopField field;
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
field = new NarrowOopField(new IndexableFieldIdentifier(index), offset, false);
|
||||
} else {
|
||||
field = new OopField(new IndexableFieldIdentifier(index), offset, false);
|
||||
}
|
||||
visitor.doOop(field, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,12 @@ import sun.jvm.hotspot.utilities.*;
|
||||
|
||||
public class ObjectHeap {
|
||||
|
||||
private static final boolean DEBUG;
|
||||
|
||||
static {
|
||||
DEBUG = System.getProperty("sun.jvm.hotspot.oops.ObjectHeap.DEBUG") != null;
|
||||
}
|
||||
|
||||
private OopHandle symbolKlassHandle;
|
||||
private OopHandle methodKlassHandle;
|
||||
private OopHandle constMethodKlassHandle;
|
||||
@ -152,7 +158,7 @@ public class ObjectHeap {
|
||||
|
||||
public ObjectHeap(TypeDataBase db) throws WrongTypeException {
|
||||
// Get commonly used sizes of basic types
|
||||
oopSize = db.getOopSize();
|
||||
oopSize = VM.getVM().getOopSize();
|
||||
byteSize = db.getJByteType().getSize();
|
||||
charSize = db.getJCharType().getSize();
|
||||
booleanSize = db.getJBooleanType().getSize();
|
||||
@ -440,12 +446,16 @@ public class ObjectHeap {
|
||||
try {
|
||||
// Traverses the space from bottom to top
|
||||
OopHandle handle = bottom.addOffsetToAsOopHandle(0);
|
||||
|
||||
while (handle.lessThan(top)) {
|
||||
Oop obj = null;
|
||||
|
||||
try {
|
||||
obj = newOop(handle);
|
||||
} catch (UnknownOopException exp) {
|
||||
if (DEBUG) {
|
||||
throw new RuntimeException(" UnknownOopException " + exp);
|
||||
}
|
||||
}
|
||||
if (obj == null) {
|
||||
//Find the object size using Printezis bits and skip over
|
||||
|
@ -64,8 +64,17 @@ public class ObjectHistogram implements HeapVisitor {
|
||||
List list = getElements();
|
||||
ObjectHistogramElement.titleOn(tty);
|
||||
Iterator iterator = list.listIterator();
|
||||
int num=0;
|
||||
int totalCount=0;
|
||||
int totalSize=0;
|
||||
while (iterator.hasNext()) {
|
||||
((ObjectHistogramElement) iterator.next()).printOn(tty);
|
||||
ObjectHistogramElement el = (ObjectHistogramElement) iterator.next();
|
||||
num++;
|
||||
totalCount+=el.getCount();
|
||||
totalSize+=el.getSize();
|
||||
tty.print(num + ":" + "\t\t");
|
||||
el.printOn(tty);
|
||||
}
|
||||
tty.println("Total : " + "\t" + totalCount + "\t" + totalSize);
|
||||
}
|
||||
}
|
||||
|
@ -110,12 +110,12 @@ public class ObjectHistogramElement {
|
||||
public static void titleOn(PrintStream tty) {
|
||||
tty.println("Object Histogram:");
|
||||
tty.println();
|
||||
tty.println("Size" + "\t" + "Count" + "\t" + "Class description");
|
||||
tty.println("-------------------------------------------------------");
|
||||
tty.println("num " + "\t" + " #instances" + "\t" + "#bytes" + "\t" + "Class description");
|
||||
tty.println("--------------------------------------------------------------------------");
|
||||
}
|
||||
|
||||
public void printOn(PrintStream tty) {
|
||||
tty.print(size + "\t" + count + "\t");
|
||||
tty.print(count + "\t" + size + "\t");
|
||||
tty.print(getDescription());
|
||||
tty.println();
|
||||
}
|
||||
|
@ -47,7 +47,8 @@ public class Oop {
|
||||
private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
|
||||
Type type = db.lookupType("oopDesc");
|
||||
mark = new CIntField(type.getCIntegerField("_mark"), 0);
|
||||
klass = new OopField(type.getOopField("_klass"), 0);
|
||||
klass = new OopField(type.getOopField("_metadata._klass"), 0);
|
||||
compressedKlass = new NarrowOopField(type.getOopField("_metadata._compressed_klass"), 0);
|
||||
headerSize = type.getSize();
|
||||
}
|
||||
|
||||
@ -67,10 +68,11 @@ public class Oop {
|
||||
public OopHandle getHandle() { return handle; }
|
||||
|
||||
private static long headerSize;
|
||||
public static long getHeaderSize() { return headerSize; }
|
||||
public static long getHeaderSize() { return headerSize; } // Header size in bytes.
|
||||
|
||||
private static CIntField mark;
|
||||
private static OopField klass;
|
||||
private static NarrowOopField compressedKlass;
|
||||
|
||||
public boolean isShared() {
|
||||
return CompactingPermGenGen.isShared(handle);
|
||||
@ -86,7 +88,13 @@ public class Oop {
|
||||
|
||||
// Accessors for declared fields
|
||||
public Mark getMark() { return new Mark(getHandle()); }
|
||||
public Klass getKlass() { return (Klass) klass.getValue(this); }
|
||||
public Klass getKlass() {
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
return (Klass) compressedKlass.getValue(this);
|
||||
} else {
|
||||
return (Klass) klass.getValue(this);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isA(Klass k) {
|
||||
return getKlass().isSubtypeOf(k);
|
||||
@ -120,7 +128,7 @@ public class Oop {
|
||||
|
||||
// Align the object size.
|
||||
public static long alignObjectSize(long size) {
|
||||
return VM.getVM().alignUp(size, VM.getVM().getMinObjAlignmentInBytes());
|
||||
return VM.getVM().alignUp(size, VM.getVM().getMinObjAlignment());
|
||||
}
|
||||
|
||||
// All vm's align longs, so pad out certain offsets.
|
||||
@ -163,7 +171,11 @@ public class Oop {
|
||||
void iterateFields(OopVisitor visitor, boolean doVMFields) {
|
||||
if (doVMFields) {
|
||||
visitor.doCInt(mark, true);
|
||||
visitor.doOop(klass, true);
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
visitor.doOop(compressedKlass, true);
|
||||
} else {
|
||||
visitor.doOop(klass, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -219,6 +231,10 @@ public class Oop {
|
||||
if (handle == null) {
|
||||
return null;
|
||||
}
|
||||
return handle.getOopHandleAt(klass.getOffset());
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
return handle.getCompOopHandleAt(compressedKlass.getOffset());
|
||||
} else {
|
||||
return handle.getOopHandleAt(klass.getOffset());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -57,6 +57,13 @@ public class OopPrinter implements OopVisitor {
|
||||
Oop.printOopValueOn(field.getValue(getObj()), tty);
|
||||
tty.println();
|
||||
}
|
||||
|
||||
public void doOop(NarrowOopField field, boolean isVMField) {
|
||||
printField(field);
|
||||
Oop.printOopValueOn(field.getValue(getObj()), tty);
|
||||
tty.println();
|
||||
}
|
||||
|
||||
public void doChar(CharField field, boolean isVMField) {
|
||||
printField(field);
|
||||
char c = field.getValue(getObj());
|
||||
|
@ -281,8 +281,11 @@ public class OopUtilities implements /* imports */ JVMTIThreadState {
|
||||
} catch (RuntimeException re) {
|
||||
// ignore, currently java_lang_Class::hc_klass_offset is zero
|
||||
}
|
||||
|
||||
hcKlassField = new OopField(new NamedFieldIdentifier("hc_klass"), hcKlassOffset, true);
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
hcKlassField = new NarrowOopField(new NamedFieldIdentifier("hc_klass"), hcKlassOffset, true);
|
||||
} else {
|
||||
hcKlassField = new OopField(new NamedFieldIdentifier("hc_klass"), hcKlassOffset, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,7 @@ public interface OopVisitor {
|
||||
|
||||
// Callback methods for each field type in an object
|
||||
public void doOop(OopField field, boolean isVMField);
|
||||
public void doOop(NarrowOopField field, boolean isVMField);
|
||||
public void doByte(ByteField field, boolean isVMField);
|
||||
public void doChar(CharField field, boolean isVMField);
|
||||
public void doBoolean(BooleanField field, boolean isVMField);
|
||||
|
@ -31,4 +31,5 @@ import sun.jvm.hotspot.debugger.*;
|
||||
|
||||
public interface AddressVisitor {
|
||||
public void visitAddress(Address addr);
|
||||
public void visitCompOopAddress(Address addr);
|
||||
}
|
||||
|
@ -534,7 +534,8 @@ public abstract class Frame implements Cloneable {
|
||||
public void visitValueLocation(Address valueAddr) {
|
||||
}
|
||||
|
||||
public void visitDeadLocation(Address deadAddr) {
|
||||
public void visitNarrowOopLocation(Address compOopAddr) {
|
||||
addressVisitor.visitCompOopAddress(compOopAddr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ import sun.jvm.hotspot.memory.*;
|
||||
import sun.jvm.hotspot.oops.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.utilities.*;
|
||||
import sun.jvm.hotspot.runtime.*;
|
||||
|
||||
/** <P> This class encapsulates the global state of the VM; the
|
||||
universe, object heap, interpreter, etc. It is a Singleton and
|
||||
@ -93,6 +94,10 @@ public class VM {
|
||||
private boolean isLP64;
|
||||
private int bytesPerLong;
|
||||
private int minObjAlignmentInBytes;
|
||||
private int logMinObjAlignmentInBytes;
|
||||
private int heapWordSize;
|
||||
private int heapOopSize;
|
||||
private int oopSize;
|
||||
/** This is only present in a non-core build */
|
||||
private CodeCache codeCache;
|
||||
/** This is only present in a C1 build */
|
||||
@ -117,6 +122,7 @@ public class VM {
|
||||
private static Type uintxType;
|
||||
private static CIntegerType boolType;
|
||||
private Boolean sharingEnabled;
|
||||
private Boolean compressedOopsEnabled;
|
||||
|
||||
// command line flags supplied to VM - see struct Flag in globals.hpp
|
||||
public static final class Flag {
|
||||
@ -308,6 +314,11 @@ public class VM {
|
||||
}
|
||||
bytesPerLong = db.lookupIntConstant("BytesPerLong").intValue();
|
||||
minObjAlignmentInBytes = db.lookupIntConstant("MinObjAlignmentInBytes").intValue();
|
||||
// minObjAlignment = db.lookupIntConstant("MinObjAlignment").intValue();
|
||||
logMinObjAlignmentInBytes = db.lookupIntConstant("LogMinObjAlignmentInBytes").intValue();
|
||||
heapWordSize = db.lookupIntConstant("HeapWordSize").intValue();
|
||||
oopSize = db.lookupIntConstant("oopSize").intValue();
|
||||
heapOopSize = db.lookupIntConstant("heapOopSize").intValue();
|
||||
|
||||
intxType = db.lookupType("intx");
|
||||
uintxType = db.lookupType("uintx");
|
||||
@ -331,6 +342,8 @@ public class VM {
|
||||
throw new RuntimeException("Attempt to initialize VM twice");
|
||||
}
|
||||
soleInstance = new VM(db, debugger, debugger.getMachineDescription().isBigEndian());
|
||||
debugger.putHeapConst(Universe.getHeapBase(), soleInstance.getHeapOopSize(),
|
||||
soleInstance.logMinObjAlignmentInBytes);
|
||||
for (Iterator iter = vmInitializedObservers.iterator(); iter.hasNext(); ) {
|
||||
((Observer) iter.next()).update(null, null);
|
||||
}
|
||||
@ -440,13 +453,17 @@ public class VM {
|
||||
}
|
||||
|
||||
public long getOopSize() {
|
||||
return db.getOopSize();
|
||||
return oopSize;
|
||||
}
|
||||
|
||||
public long getLogAddressSize() {
|
||||
return logAddressSize;
|
||||
}
|
||||
|
||||
public long getIntSize() {
|
||||
return db.getJIntType().getSize();
|
||||
}
|
||||
|
||||
/** NOTE: this offset is in BYTES in this system! */
|
||||
public long getStackBias() {
|
||||
return stackBias;
|
||||
@ -467,10 +484,24 @@ public class VM {
|
||||
}
|
||||
|
||||
/** Get minimum object alignment in bytes. */
|
||||
public int getMinObjAlignmentInBytes() {
|
||||
public int getMinObjAlignment() {
|
||||
return minObjAlignmentInBytes;
|
||||
}
|
||||
|
||||
public int getMinObjAlignmentInBytes() {
|
||||
return minObjAlignmentInBytes;
|
||||
}
|
||||
public int getLogMinObjAlignmentInBytes() {
|
||||
return logMinObjAlignmentInBytes;
|
||||
}
|
||||
|
||||
public int getHeapWordSize() {
|
||||
return heapWordSize;
|
||||
}
|
||||
|
||||
public int getHeapOopSize() {
|
||||
return heapOopSize;
|
||||
}
|
||||
/** Utility routine for getting data structure alignment correct */
|
||||
public long alignUp(long size, long alignment) {
|
||||
return (size + alignment - 1) & ~(alignment - 1);
|
||||
@ -701,6 +732,14 @@ public class VM {
|
||||
return sharingEnabled.booleanValue();
|
||||
}
|
||||
|
||||
public boolean isCompressedOopsEnabled() {
|
||||
if (compressedOopsEnabled == null) {
|
||||
Flag flag = getCommandLineFlag("UseCompressedOops");
|
||||
compressedOopsEnabled = (flag == null) ? Boolean.FALSE:
|
||||
(flag.getBool()? Boolean.TRUE: Boolean.FALSE);
|
||||
}
|
||||
return compressedOopsEnabled.booleanValue();
|
||||
}
|
||||
|
||||
// returns null, if not available.
|
||||
public Flag[] getCommandLineFlags() {
|
||||
|
@ -109,6 +109,8 @@ public interface Field {
|
||||
public Address getAddress (Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
|
||||
public OopHandle getOopHandle(Address addr)
|
||||
throws UnmappedAddressException, UnalignedAddressException, WrongTypeException, NotInHeapException;
|
||||
public OopHandle getNarrowOopHandle(Address addr)
|
||||
throws UnmappedAddressException, UnalignedAddressException, WrongTypeException, NotInHeapException;
|
||||
|
||||
/** <P> These accessors require that the field be static; otherwise,
|
||||
a WrongTypeException will be thrown. Note that type checking is
|
||||
@ -138,4 +140,6 @@ public interface Field {
|
||||
public Address getAddress () throws UnmappedAddressException, UnalignedAddressException;
|
||||
public OopHandle getOopHandle()
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException;
|
||||
public OopHandle getNarrowOopHandle()
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException;
|
||||
}
|
||||
|
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.types;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
|
||||
/** A specialization of Field which represents a field containing an
|
||||
narrow oop value and which adds typechecked getValue() routines returning
|
||||
OopHandles. */
|
||||
|
||||
public interface NarrowOopField extends OopField {
|
||||
/** The field must be nonstatic and the type of the field must be an
|
||||
oop type, or a WrongTypeException will be thrown. */
|
||||
public OopHandle getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
|
||||
|
||||
/** The field must be static and the type of the field must be an
|
||||
oop type, or a WrongTypeException will be thrown. */
|
||||
public OopHandle getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException;
|
||||
}
|
@ -122,5 +122,6 @@ public interface Type {
|
||||
public JShortField getJShortField (String fieldName) throws WrongTypeException;
|
||||
public CIntegerField getCIntegerField (String fieldName) throws WrongTypeException;
|
||||
public OopField getOopField (String fieldName) throws WrongTypeException;
|
||||
public NarrowOopField getNarrowOopField (String fieldName) throws WrongTypeException;
|
||||
public AddressField getAddressField (String fieldName);
|
||||
}
|
||||
|
@ -43,6 +43,19 @@ public class BasicField implements Field {
|
||||
/** Used for static fields only */
|
||||
private Address staticFieldAddress;
|
||||
|
||||
// Copy constructor to create NarrowOopField from OopField.
|
||||
public BasicField(Field fld) {
|
||||
BasicField field = (BasicField)fld;
|
||||
|
||||
this.db = field.db;
|
||||
this.containingType = field.containingType;
|
||||
this.name = field.name;
|
||||
this.type = field.type;
|
||||
this.size = field.size;
|
||||
this.isStatic = field.isStatic;
|
||||
this.offset = field.offset;
|
||||
this.staticFieldAddress = field.staticFieldAddress;
|
||||
}
|
||||
/** offsetInBytes is ignored if the field is static;
|
||||
staticFieldAddress is used only if the field is static. */
|
||||
public BasicField(BasicTypeDataBase db, Type containingType, String name, Type type,
|
||||
@ -161,6 +174,13 @@ public class BasicField implements Field {
|
||||
}
|
||||
return addr.getOopHandleAt(offset);
|
||||
}
|
||||
public OopHandle getNarrowOopHandle(Address addr)
|
||||
throws UnmappedAddressException, UnalignedAddressException, WrongTypeException, NotInHeapException {
|
||||
if (isStatic) {
|
||||
throw new WrongTypeException();
|
||||
}
|
||||
return addr.getCompOopHandleAt(offset);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// Dereferencing operations for static fields
|
||||
@ -234,4 +254,11 @@ public class BasicField implements Field {
|
||||
}
|
||||
return staticFieldAddress.getOopHandleAt(0);
|
||||
}
|
||||
public OopHandle getNarrowOopHandle()
|
||||
throws UnmappedAddressException, UnalignedAddressException, WrongTypeException, NotInHeapException {
|
||||
if (!isStatic) {
|
||||
throw new WrongTypeException();
|
||||
}
|
||||
return staticFieldAddress.getCompOopHandleAt(0);
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +95,10 @@ public class BasicFieldWrapper implements Field {
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
return field.getOopHandle(addr);
|
||||
}
|
||||
public OopHandle getNarrowOopHandle(Address addr)
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
return field.getNarrowOopHandle(addr);
|
||||
}
|
||||
|
||||
public boolean getJBoolean () throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
||||
return field.getJBoolean();
|
||||
@ -130,4 +134,8 @@ public class BasicFieldWrapper implements Field {
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
return field.getOopHandle();
|
||||
}
|
||||
public OopHandle getNarrowOopHandle()
|
||||
throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
|
||||
return field.getNarrowOopHandle();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright 2008 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*
|
||||
*/
|
||||
|
||||
package sun.jvm.hotspot.types.basic;
|
||||
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
|
||||
/** A specialization of BasicField which represents a field containing
|
||||
an oop value and which adds typechecked getValue() routines
|
||||
returning OopHandles. */
|
||||
|
||||
public class BasicNarrowOopField extends BasicOopField implements NarrowOopField {
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
public BasicNarrowOopField (OopField oopf) {
|
||||
super(oopf);
|
||||
}
|
||||
|
||||
public BasicNarrowOopField(BasicTypeDataBase db, Type containingType, String name, Type type,
|
||||
boolean isStatic, long offset, Address staticFieldAddress) {
|
||||
super(db, containingType, name, type, isStatic, offset, staticFieldAddress);
|
||||
|
||||
if (DEBUG) {
|
||||
System.out.println(" name " + name + " type " + type + " isStatic " + isStatic + " offset " + offset + " static addr " + staticFieldAddress);
|
||||
}
|
||||
if (!type.isOopType()) {
|
||||
throw new WrongTypeException("Type of a BasicOopField must be an oop type");
|
||||
}
|
||||
}
|
||||
|
||||
/** The field must be nonstatic and the type of the field must be a
|
||||
Java oop, or a WrongTypeException will be thrown. */
|
||||
public OopHandle getValue(Address addr) throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
||||
return getNarrowOopHandle(addr);
|
||||
}
|
||||
|
||||
/** The field must be static and the type of the field must be a
|
||||
Java oop, or a WrongTypeException will be thrown. */
|
||||
public OopHandle getValue() throws UnmappedAddressException, UnalignedAddressException, WrongTypeException {
|
||||
return getNarrowOopHandle();
|
||||
}
|
||||
}
|
@ -32,6 +32,12 @@ import sun.jvm.hotspot.types.*;
|
||||
returning OopHandles. */
|
||||
|
||||
public class BasicOopField extends BasicField implements OopField {
|
||||
|
||||
|
||||
public BasicOopField(OopField oopf) {
|
||||
super(oopf);
|
||||
}
|
||||
|
||||
public BasicOopField(BasicTypeDataBase db, Type containingType, String name, Type type,
|
||||
boolean isStatic, long offset, Address staticFieldAddress) {
|
||||
super(db, containingType, name, type, isStatic, offset, staticFieldAddress);
|
||||
|
@ -273,6 +273,10 @@ public class BasicType implements Type {
|
||||
return (OopField) field;
|
||||
}
|
||||
|
||||
public NarrowOopField getNarrowOopField(String fieldName) throws WrongTypeException {
|
||||
return (NarrowOopField) new BasicNarrowOopField(getOopField(fieldName));
|
||||
}
|
||||
|
||||
public AddressField getAddressField(String fieldName) {
|
||||
// This type can not be inferred (for now), so provide a wrapper
|
||||
Field field = getField(fieldName);
|
||||
@ -287,7 +291,7 @@ public class BasicType implements Type {
|
||||
name was already present in this class. */
|
||||
public void addField(Field field) {
|
||||
if (nameToFieldMap.get(field.getName()) != null) {
|
||||
throw new RuntimeException("field of name \"" + field.getName() + "\" already present");
|
||||
throw new RuntimeException("field of name \"" + field.getName() + "\" already present in type " + this);
|
||||
}
|
||||
|
||||
nameToFieldMap.put(field.getName(), field);
|
||||
|
@ -27,6 +27,7 @@ package sun.jvm.hotspot.types.basic;
|
||||
import java.util.*;
|
||||
import sun.jvm.hotspot.debugger.*;
|
||||
import sun.jvm.hotspot.types.*;
|
||||
import sun.jvm.hotspot.runtime.VM;
|
||||
|
||||
/** <P> This is a basic implementation of the TypeDataBase interface.
|
||||
It allows an external type database builder to add types to be
|
||||
@ -146,7 +147,7 @@ public class BasicTypeDataBase implements TypeDataBase {
|
||||
}
|
||||
|
||||
public long getOopSize() {
|
||||
return machDesc.getOopSize();
|
||||
return VM.getVM().getOopSize();
|
||||
}
|
||||
|
||||
public boolean addressTypeIsEqualToType(Address addr, Type type) {
|
||||
|
@ -92,7 +92,17 @@ public class FindInHeapPanel extends JPanel {
|
||||
iterated += addressSize;
|
||||
updateProgressBar();
|
||||
}
|
||||
public void visitCompOopAddress(Address addr) {
|
||||
if (error) return;
|
||||
|
||||
Address val = addr.getCompOopAddressAt(0);
|
||||
if (AddressOps.equal(val, value)) {
|
||||
error = reportResult(addr);
|
||||
}
|
||||
iterated += addressSize;
|
||||
updateProgressBar();
|
||||
|
||||
}
|
||||
public void epilogue() {
|
||||
iterated = 0;
|
||||
updateProgressBar();
|
||||
|
@ -1077,8 +1077,8 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
|
||||
oms = new OopMapStream(map, OopMapValue.OopTypes.VALUE_VALUE);
|
||||
buf.append(omvIterator.iterate(oms, "Value:", false));
|
||||
|
||||
oms = new OopMapStream(map, OopMapValue.OopTypes.DEAD_VALUE);
|
||||
buf.append(omvIterator.iterate(oms, "Dead:", false));
|
||||
oms = new OopMapStream(map, OopMapValue.OopTypes.NARROWOOP_VALUE);
|
||||
buf.append(omvIterator.iterate(oms, "Oop:", false));
|
||||
|
||||
oms = new OopMapStream(map, OopMapValue.OopTypes.CALLEE_SAVED_VALUE);
|
||||
buf.append(omvIterator.iterate(oms, "Callee saved:", true));
|
||||
|
@ -155,6 +155,9 @@ public abstract class AbstractHeapGraphWriter implements HeapGraphWriter {
|
||||
} catch (IOException exp) {
|
||||
throw new RuntimeException(exp);
|
||||
}
|
||||
}
|
||||
public void visitCompOopAddress(Address handleAddr) {
|
||||
throw new RuntimeException("Should not reach here. JNIHandles are not compressed");
|
||||
}
|
||||
});
|
||||
} catch (RuntimeException re) {
|
||||
|
@ -574,6 +574,10 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
|
||||
throw new RuntimeException(exp);
|
||||
}
|
||||
}
|
||||
public void visitCompOopAddress(Address handleAddr) {
|
||||
throw new RuntimeException(
|
||||
" Should not reach here. JNIHandles are not compressed \n");
|
||||
}
|
||||
});
|
||||
} catch (RuntimeException re) {
|
||||
handleRuntimeException(re);
|
||||
@ -601,8 +605,7 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
|
||||
writeObjectID(array.getKlass().getJavaMirror());
|
||||
final int length = (int) array.getLength();
|
||||
for (int index = 0; index < length; index++) {
|
||||
long offset = OBJECT_BASE_OFFSET + index * OBJ_ID_SIZE;
|
||||
OopHandle handle = array.getHandle().getOopHandleAt(offset);
|
||||
OopHandle handle = array.getOopHandleAt(index);
|
||||
writeObjectID(getAddressValue(handle));
|
||||
}
|
||||
}
|
||||
@ -803,8 +806,13 @@ public class HeapHprofBinWriter extends AbstractHeapGraphWriter {
|
||||
break;
|
||||
case JVM_SIGNATURE_CLASS:
|
||||
case JVM_SIGNATURE_ARRAY: {
|
||||
OopHandle handle = ((OopField)field).getValueAsOopHandle(oop);
|
||||
writeObjectID(getAddressValue(handle));
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
OopHandle handle = ((NarrowOopField)field).getValueAsOopHandle(oop);
|
||||
writeObjectID(getAddressValue(handle));
|
||||
} else {
|
||||
OopHandle handle = ((OopField)field).getValueAsOopHandle(oop);
|
||||
writeObjectID(getAddressValue(handle));
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -282,6 +282,15 @@ public class ReversePtrsAnalysis {
|
||||
markAndTraverse(next);
|
||||
}
|
||||
|
||||
public void visitCompOopAddress(Address addr) {
|
||||
Oop next = heap.newOop(addr.getCompOopHandleAt(0));
|
||||
LivenessPathElement lp = new LivenessPathElement(null,
|
||||
new NamedFieldIdentifier(baseRootDescription +
|
||||
" @ " + addr));
|
||||
rp.put(lp, next);
|
||||
markAndTraverse(next);
|
||||
}
|
||||
|
||||
private String baseRootDescription;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,11 @@ public class RobustOopDeterminator {
|
||||
private static void initialize(TypeDataBase db) {
|
||||
Type type = db.lookupType("oopDesc");
|
||||
|
||||
klassField = type.getOopField("_klass");
|
||||
if (VM.getVM().isCompressedOopsEnabled()) {
|
||||
klassField = type.getNarrowOopField("_metadata._compressed_klass");
|
||||
} else {
|
||||
klassField = type.getOopField("_metadata._klass");
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean oopLooksValid(OopHandle oop) {
|
||||
|
@ -1,7 +0,0 @@
|
||||
;
|
||||
; This .DEF file is a placeholder for one which is automatically
|
||||
; generated during the build process. See
|
||||
; build\windows\build_vm_def.sh and
|
||||
; build\windows\makefiles\makedeps.make (esp. the "-prelink"
|
||||
; options).
|
||||
;
|
@ -85,6 +85,9 @@ C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1
|
||||
C2_VM_TARGETS=product fastdebug optimized jvmg
|
||||
KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel
|
||||
|
||||
# JDK directory list
|
||||
JDK_DIRS=bin include jre lib demo
|
||||
|
||||
all: all_product all_fastdebug
|
||||
all_product: product product1 productkernel docs export_product
|
||||
all_fastdebug: fastdebug fastdebug1 fastdebugkernel docs export_fastdebug
|
||||
@ -341,7 +344,7 @@ copy_product_jdk:
|
||||
$(RM) -r $(JDK_IMAGE_DIR)
|
||||
$(MKDIR) -p $(JDK_IMAGE_DIR)
|
||||
($(CD) $(JDK_IMPORT_PATH) && \
|
||||
$(TAR) -cf - bin include jre lib) | \
|
||||
$(TAR) -cf - $(JDK_DIRS)) | \
|
||||
($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
|
||||
|
||||
copy_fastdebug_jdk:
|
||||
@ -349,11 +352,11 @@ copy_fastdebug_jdk:
|
||||
$(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug
|
||||
if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
|
||||
($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
|
||||
$(TAR) -cf - bin include jre lib) | \
|
||||
$(TAR) -cf - $(JDK_DIRS)) | \
|
||||
($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
|
||||
else \
|
||||
($(CD) $(JDK_IMPORT_PATH) && \
|
||||
$(TAR) -cf - bin include jre lib) | \
|
||||
$(TAR) -cf - $(JDK_DIRS)) | \
|
||||
($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \
|
||||
fi
|
||||
|
||||
@ -362,15 +365,15 @@ copy_debug_jdk:
|
||||
$(MKDIR) -p $(JDK_IMAGE_DIR)/debug
|
||||
if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \
|
||||
($(CD) $(JDK_IMPORT_PATH)/debug && \
|
||||
$(TAR) -cf - bin include jre lib) | \
|
||||
$(TAR) -cf - $(JDK_DIRS)) | \
|
||||
($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
|
||||
elif [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \
|
||||
($(CD) $(JDK_IMPORT_PATH)/fastdebug && \
|
||||
$(TAR) -cf - bin include jre lib) | \
|
||||
$(TAR) -cf - $(JDK_DIRS)) | \
|
||||
($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
|
||||
else \
|
||||
($(CD) $(JDK_IMPORT_PATH) && \
|
||||
$(TAR) -cf - bin include jre lib) | \
|
||||
$(TAR) -cf - $(JDK_DIRS)) | \
|
||||
($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \
|
||||
fi
|
||||
|
||||
|
@ -57,6 +57,7 @@ endef
|
||||
# When the tree of subdirs is built, this setting is stored in each flags.make.
|
||||
GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done)
|
||||
HS_SRC_DIR=$(GAMMADIR)/src
|
||||
HS_MAKE_DIR=$(GAMMADIR)/make
|
||||
HS_BUILD_DIR=$(GAMMADIR)/build
|
||||
|
||||
ifeq ($(USER),)
|
||||
@ -170,17 +171,17 @@ endif
|
||||
|
||||
# The platform dependent defs.make defines platform specific variable such
|
||||
# as ARCH, EXPORT_LIST etc. We must place the include here after BOOTDIR is defined.
|
||||
include $(GAMMADIR)/build/$(OSNAME)/makefiles/defs.make
|
||||
include $(GAMMADIR)/make/$(OSNAME)/makefiles/defs.make
|
||||
|
||||
# We are trying to put platform specific defintions
|
||||
# files to build/$(OSNAME)/makefiles dictory. However
|
||||
# files to make/$(OSNAME)/makefiles dictory. However
|
||||
# some definitions are common for both linux and solaris,
|
||||
# so we put them here.
|
||||
ifneq ($(OSNAME),windows)
|
||||
ABS_OUTPUTDIR := $(shell $(CD) $(OUTPUTDIR); $(PWD))
|
||||
ABS_OUTPUTDIR := $(shell mkdir -p $(OUTPUTDIR); $(CD) $(OUTPUTDIR); $(PWD))
|
||||
ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR); $(PWD))
|
||||
ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR); $(PWD))
|
||||
ABS_OS_MAKEFILE := $(shell $(CD) $(HS_BUILD_DIR)/$(OSNAME); $(PWD))/Makefile
|
||||
ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME); $(PWD))/Makefile
|
||||
|
||||
# uname, HotSpot source directory, build directory and JDK use different names
|
||||
# for CPU architectures.
|
||||
|
14
hotspot/make/hotspot_distro
Normal file
14
hotspot/make/hotspot_distro
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright 2006-2007 Sun Microsystems, Inc. All rights reserved.
|
||||
# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
||||
#
|
||||
|
||||
#
|
||||
# This file format must remain compatible with both
|
||||
# GNU Makefile and Microsoft nmake formats.
|
||||
#
|
||||
|
||||
# Don't put quotes (fail windows build).
|
||||
HOTSPOT_VM_DISTRO=Java HotSpot(TM)
|
||||
COMPANY_NAME=Sun Microsystems, Inc.
|
||||
PRODUCT_NAME=Java(TM) Platform SE
|
@ -31,11 +31,11 @@
|
||||
#
|
||||
|
||||
# Don't put quotes (fail windows build).
|
||||
HOTSPOT_VM_COPYRIGHT=Copyright 2007
|
||||
HOTSPOT_VM_COPYRIGHT=Copyright 2008
|
||||
|
||||
HS_MAJOR_VER=12
|
||||
HS_MAJOR_VER=13
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=03
|
||||
HS_BUILD_NUMBER=01
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=7
|
||||
|
@ -29,6 +29,11 @@ JPRT.tools.default.release=jdk1.7.0
|
||||
# Build result bundles are not partial builds| but include everything
|
||||
JPRT.need.sibling.build=false
|
||||
|
||||
# Directories needed to build
|
||||
JPRT.bundle.src.dirs=make src agent
|
||||
JPRT.bundle.exclude.src.dirs=build
|
||||
|
||||
|
||||
# Standard list of JPRT build targets for this workspace
|
||||
JPRT.build.targets= \
|
||||
solaris_sparc_5.10-{product|fastdebug|debug}, \
|
||||
|
@ -59,7 +59,7 @@ include ../../make/defs.make
|
||||
else
|
||||
include $(GAMMADIR)/make/defs.make
|
||||
endif
|
||||
include $(GAMMADIR)/build/$(OSNAME)/makefiles/rules.make
|
||||
include $(GAMMADIR)/make/$(OSNAME)/makefiles/rules.make
|
||||
|
||||
ifndef LP64
|
||||
ifndef CC_INTERP
|
||||
@ -182,7 +182,7 @@ TARGETS_C1 = $(addsuffix 1,$(TARGETS))
|
||||
TARGETS_TIERED = $(addsuffix tiered,$(TARGETS))
|
||||
TARGETS_CORE = $(addsuffix core,$(TARGETS))
|
||||
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/build/$(OSNAME)/makefiles/buildtree.make
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
|
||||
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
|
||||
|
||||
@ -225,24 +225,24 @@ check_j2se_version:
|
||||
fi
|
||||
|
||||
$(SUBDIRS_TIERED): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=tiered
|
||||
|
||||
$(SUBDIRS_C2): $(BUILDTREE_MAKE)
|
||||
ifdef FORCE_TIERED
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=tiered FORCE_TIERED=1
|
||||
else
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=compiler2
|
||||
endif
|
||||
|
||||
$(SUBDIRS_C1): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=compiler1
|
||||
|
||||
$(SUBDIRS_CORE): $(BUILDTREE_MAKE)
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/Makefile checks
|
||||
$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
|
||||
$(BUILDTREE) VARIANT=core
|
||||
|
||||
# Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
|
||||
@ -284,7 +284,7 @@ treecore: $(SUBDIRS_CORE)
|
||||
# Hence create a docs directory beside ...$(ARCH)_[...]
|
||||
docs: checks
|
||||
$(QUIETLY) mkdir -p $(SUBDIR_DOCS)
|
||||
$(MAKE) -f $(GAMMADIR)/build/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs
|
||||
$(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs
|
||||
|
||||
# Synonyms for win32-like targets.
|
||||
compiler2: jvmg product
|
||||
@ -301,7 +301,7 @@ clean_compiler1 clean_compiler2 clean_core:
|
||||
|
||||
clean: clean_compiler2 clean_compiler1 clean_core clean_docs
|
||||
|
||||
include $(GAMMADIR)/build/$(OSNAME)/makefiles/cscope.make
|
||||
include $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
@ -91,5 +91,5 @@ case ${Location} in
|
||||
esac
|
||||
|
||||
echo \
|
||||
${GNUMAKE} -f ${Location}/build/linux/Makefile $Build_Options GAMMADIR=${Location}
|
||||
${GNUMAKE} -f ${Location}/build/linux/Makefile $Build_Options GAMMADIR=${Location}
|
||||
${GNUMAKE} -f ${Location}/make/linux/Makefile $Build_Options GAMMADIR=${Location}
|
||||
${GNUMAKE} -f ${Location}/make/linux/Makefile $Build_Options GAMMADIR=${Location}
|
@ -26,7 +26,7 @@
|
||||
# build directories.
|
||||
# It knows how to compile, link, and run the adlc.
|
||||
|
||||
include $(GAMMADIR)/build/$(Platform_os_family)/makefiles/rules.make
|
||||
include $(GAMMADIR)/make/$(Platform_os_family)/makefiles/rules.make
|
||||
|
||||
# #########################################################################
|
||||
|
||||
@ -138,7 +138,7 @@ endif
|
||||
# used to selectively update generated adlc files. This should
|
||||
# provide a nice compilation speed improvement.
|
||||
#
|
||||
ADLC_UPDATER_DIRECTORY = $(GAMMADIR)/build/$(OS)
|
||||
ADLC_UPDATER_DIRECTORY = $(GAMMADIR)/make/$(OS)
|
||||
ADLC_UPDATER = adlc_updater
|
||||
|
||||
# This action refreshes all generated adlc files simultaneously.
|
@ -64,9 +64,9 @@ QUIETLY$(MAKE_VERBOSE) = @
|
||||
TESTFLAGS = -Xbatch -showversion
|
||||
|
||||
ifdef USE_SUNCC
|
||||
PLATFORM_FILE = $(GAMMADIR)/build/$(OS_FAMILY)/platform_$(BUILDARCH).suncc
|
||||
PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH).suncc
|
||||
else
|
||||
PLATFORM_FILE = $(GAMMADIR)/build/$(OS_FAMILY)/platform_$(BUILDARCH)
|
||||
PLATFORM_FILE = $(GAMMADIR)/make/$(OS_FAMILY)/platform_$(BUILDARCH)
|
||||
endif
|
||||
|
||||
ifdef FORCE_TIERED
|
||||
@ -111,7 +111,7 @@ TARGETS = debug fastdebug jvmg optimized product profiled
|
||||
SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
|
||||
|
||||
# For dependencies and recursive makes.
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/build/$(OS_FAMILY)/makefiles/buildtree.make
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
|
||||
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make \
|
||||
env.sh env.csh .dbxrc test_gamma
|
||||
@ -133,19 +133,19 @@ endif
|
||||
ifndef HOTSPOT_BUILD_USER
|
||||
HOTSPOT_BUILD_USER := $(shell whoami)
|
||||
endif
|
||||
# Define HOTSPOT_VM_DISTRO based on settings in build/hotspot_distro
|
||||
# or build/closed/hotspot_distro.
|
||||
# Define HOTSPOT_VM_DISTRO based on settings in make/openjdk_distro
|
||||
# or make/hotspot_distro.
|
||||
ifndef HOTSPOT_VM_DISTRO
|
||||
CLOSED_DIR_EXISTS := $(shell \
|
||||
if [ -d $(GAMMADIR)/build/closed ] ; then \
|
||||
if [ -d $(GAMMADIR)/src/closed ] ; then \
|
||||
echo true; \
|
||||
else \
|
||||
echo false; \
|
||||
fi)
|
||||
ifeq ($(CLOSED_DIR_EXISTS), true)
|
||||
include $(GAMMADIR)/build/closed/hotspot_distro
|
||||
include $(GAMMADIR)/make/hotspot_distro
|
||||
else
|
||||
include $(GAMMADIR)/build/hotspot_distro
|
||||
include $(GAMMADIR)/make/openjdk_distro
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -199,8 +199,8 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \
|
||||
echo "SYSDEFS += \$$(HOTSPOT_EXTRA_SYSDEFS)"; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
|
||||
) > $@
|
||||
|
||||
flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
@ -209,8 +209,8 @@ flags_vm.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||
$(BUILDTREE_COMMENT); \
|
||||
echo; \
|
||||
[ "$(TARGET)" = profiled ] && \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/optimized.make"; \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/$(TARGET).make"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/optimized.make"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(TARGET).make"; \
|
||||
) > $@
|
||||
|
||||
../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
|
||||
@ -226,7 +226,7 @@ Makefile: $(BUILDTREE_MAKE)
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/top.make"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/top.make"; \
|
||||
) > $@
|
||||
|
||||
vm.make: $(BUILDTREE_MAKE)
|
||||
@ -237,7 +237,7 @@ vm.make: $(BUILDTREE_MAKE)
|
||||
echo include flags.make; \
|
||||
echo include flags_vm.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
adlc.make: $(BUILDTREE_MAKE)
|
||||
@ -247,7 +247,7 @@ adlc.make: $(BUILDTREE_MAKE)
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
jvmti.make: $(BUILDTREE_MAKE)
|
||||
@ -257,7 +257,7 @@ jvmti.make: $(BUILDTREE_MAKE)
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
sa.make: $(BUILDTREE_MAKE)
|
||||
@ -267,7 +267,7 @@ sa.make: $(BUILDTREE_MAKE)
|
||||
echo; \
|
||||
echo include flags.make; \
|
||||
echo; \
|
||||
echo "include \$$(GAMMADIR)/build/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
|
||||
) > $@
|
||||
|
||||
env.sh: $(BUILDTREE_MAKE)
|
||||
@ -339,7 +339,7 @@ test_gamma: $(BUILDTREE_MAKE)
|
||||
echo "then"; \
|
||||
echo " $(WRONG_DATA_MODE_MSG); exit 0;"; \
|
||||
echo "fi"; \
|
||||
echo 'CLASSPATH="$(GAMMADIR)/build/$(OS_FAMILY):$$CLASSPATH"'; \
|
||||
echo 'CLASSPATH="$(GAMMADIR)/make/$(OS_FAMILY):$$CLASSPATH"'; \
|
||||
echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \
|
||||
echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \
|
||||
) > $@
|
@ -38,6 +38,7 @@ include $(GAMMADIR)/make/scm.make
|
||||
|
||||
NAWK = awk
|
||||
RM = rm -f
|
||||
HG = hg
|
||||
CS_TOP = ../..
|
||||
|
||||
CSDIRS = $(CS_TOP)/src $(CS_TOP)/build
|
||||
@ -121,9 +122,9 @@ cscope cscope.out: cscope.files FORCE
|
||||
# relevant files first.
|
||||
cscope.files: .cscope.files.raw
|
||||
echo "$(CSINCS)" > $@
|
||||
-egrep -v "\.java|\/build\/" $< >> $@
|
||||
-egrep -v "\.java|\/make\/" $< >> $@
|
||||
-fgrep ".java" $< >> $@
|
||||
-fgrep "/build/" $< >> $@
|
||||
-fgrep "/make/" $< >> $@
|
||||
|
||||
.cscope.files.raw: .nametable.files
|
||||
-find $(CSDIRS) -type d \( $(CS_PRUNE) \) -prune -o \
|
||||
@ -140,14 +141,17 @@ TAGS.clean: nametable.clean
|
||||
|
||||
# .nametable.files and .nametable.files.tmp are used to determine if any files
|
||||
# were added to/deleted from/renamed in the workspace. If not, then there's
|
||||
# normally no need to run find. To force a 'find': gmake nametable.clean.
|
||||
# normally no need to rebuild the cscope database. To force a rebuild of
|
||||
# the cscope database: gmake nametable.clean.
|
||||
.nametable.files: .nametable.files.tmp
|
||||
cmp -s $@ $< || cp $< $@
|
||||
|
||||
.nametable.files.tmp: $(CS_TOP)/Codemgr_wsdata/nametable
|
||||
$(NAWK) \
|
||||
'{ if (sub("( [a-z0-9]{2,8}){4}$$", "")) print $$0; }' $< > $@
|
||||
( cmp -s $@ $< ) || ( cp $< $@ )
|
||||
-$(RM) $<
|
||||
|
||||
# `hg status' is slightly faster than `hg fstatus'. Both are
|
||||
# quite a bit slower on an NFS mounted file system, so this is
|
||||
# really geared towards repos on local file systems.
|
||||
.nametable.files.tmp:
|
||||
-$(HG) fstatus -acmn > $@
|
||||
nametable.clean:
|
||||
-$(RM) .nametable.files .nametable.files.tmp
|
||||
|
@ -30,7 +30,7 @@ DEBUG_CFLAGS/BYFILE = $(DEBUG_CFLAGS/$@)$(DEBUG_CFLAGS/DEFAULT$(DEBUG_CFLAGS/$@)
|
||||
CFLAGS += $(DEBUG_CFLAGS/BYFILE)
|
||||
|
||||
# Linker mapfile
|
||||
MAPFILE = $(GAMMADIR)/build/linux/makefiles/mapfile-vers-debug
|
||||
MAPFILE = $(GAMMADIR)/make/linux/makefiles/mapfile-vers-debug
|
||||
|
||||
_JUNK_ := $(shell echo -e >&2 ""\
|
||||
"----------------------------------------------------------------------\n" \
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user