aboutsummaryrefslogtreecommitdiff
path: root/agent
diff options
context:
space:
mode:
authortwisti <none@none>2010-08-25 05:27:54 -0700
committertwisti <none@none>2010-08-25 05:27:54 -0700
commitc6865e24e0444bd5fdb6fb1e3117108765b29efc (patch)
treeb36d0c2b2e59e67b7b9b2c52b66f14eddb9e4182 /agent
parent6d5fe3805a03867db608a887106167fbb79099a4 (diff)
6978355: renaming for 6961697
Summary: This is the renaming part of 6961697 to keep the actual changes small for review. Reviewed-by: kvn, never
Diffstat (limited to 'agent')
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java2
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/c1/Runtime1.java4
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java54
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java15
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/code/PCDesc.java4
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/ui/FindInCodeCachePanel.java6
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java16
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java6
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java12
9 files changed, 67 insertions, 52 deletions
diff --git a/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java b/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
index 35a4ab22b..3bbe31378 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
@@ -1037,7 +1037,7 @@ public class CommandProcessor {
public void prologue(Address start, Address end) {
}
public void visit(CodeBlob blob) {
- fout.println(gen.genHTML(blob.instructionsBegin()));
+ fout.println(gen.genHTML(blob.contentBegin()));
}
public void epilogue() {
}
diff --git a/agent/src/share/classes/sun/jvm/hotspot/c1/Runtime1.java b/agent/src/share/classes/sun/jvm/hotspot/c1/Runtime1.java
index cbabffa70..28f181a53 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/c1/Runtime1.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/c1/Runtime1.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@ public class Runtime1 {
/** FIXME: consider making argument "type-safe" in Java port */
public Address entryFor(int id) {
- return blobFor(id).instructionsBegin();
+ return blobFor(id).codeBegin();
}
/** FIXME: consider making argument "type-safe" in Java port */
diff --git a/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java b/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
index be3e85388..937c5ce96 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,8 @@ public class CodeBlob extends VMObject {
private static CIntegerField sizeField;
private static CIntegerField headerSizeField;
private static CIntegerField relocationSizeField;
- private static CIntegerField instructionsOffsetField;
+ private static CIntegerField contentOffsetField;
+ private static CIntegerField codeOffsetField;
private static CIntegerField frameCompleteOffsetField;
private static CIntegerField dataOffsetField;
private static CIntegerField frameSizeField;
@@ -68,7 +69,8 @@ public class CodeBlob extends VMObject {
headerSizeField = type.getCIntegerField("_header_size");
relocationSizeField = type.getCIntegerField("_relocation_size");
frameCompleteOffsetField = type.getCIntegerField("_frame_complete_offset");
- instructionsOffsetField = type.getCIntegerField("_instructions_offset");
+ contentOffsetField = type.getCIntegerField("_content_offset");
+ codeOffsetField = type.getCIntegerField("_code_offset");
dataOffsetField = type.getCIntegerField("_data_offset");
frameSizeField = type.getCIntegerField("_frame_size");
oopMapsField = type.getAddressField("_oop_maps");
@@ -111,11 +113,19 @@ public class CodeBlob extends VMObject {
// public RelocInfo relocationBegin();
// public RelocInfo relocationEnd();
- public Address instructionsBegin() {
- return headerBegin().addOffsetTo(instructionsOffsetField.getValue(addr));
+ public Address contentBegin() {
+ return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
}
- public Address instructionsEnd() {
+ public Address contentEnd() {
+ return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
+ }
+
+ public Address codeBegin() {
+ return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
+ }
+
+ public Address codeEnd() {
return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
}
@@ -128,24 +138,27 @@ public class CodeBlob extends VMObject {
}
// Offsets
- public int getRelocationOffset() { return (int) headerSizeField.getValue(addr); }
- public int getInstructionsOffset() { return (int) instructionsOffsetField.getValue(addr); }
- public int getDataOffset() { return (int) dataOffsetField.getValue(addr); }
+ public int getRelocationOffset() { return (int) headerSizeField .getValue(addr); }
+ public int getContentOffset() { return (int) contentOffsetField.getValue(addr); }
+ public int getCodeOffset() { return (int) codeOffsetField .getValue(addr); }
+ public int getDataOffset() { return (int) dataOffsetField .getValue(addr); }
// Sizes
- public int getSize() { return (int) sizeField.getValue(addr); }
- public int getHeaderSize() { return (int) headerSizeField.getValue(addr); }
+ public int getSize() { return (int) sizeField .getValue(addr); }
+ public int getHeaderSize() { return (int) headerSizeField.getValue(addr); }
// FIXME: add getRelocationSize()
- public int getInstructionsSize() { return (int) instructionsEnd().minus(instructionsBegin()); }
- public int getDataSize() { return (int) dataEnd().minus(dataBegin()); }
+ public int getContentSize() { return (int) contentEnd().minus(contentBegin()); }
+ public int getCodeSize() { return (int) codeEnd() .minus(codeBegin()); }
+ public int getDataSize() { return (int) dataEnd() .minus(dataBegin()); }
// Containment
- public boolean blobContains(Address addr) { return headerBegin().lessThanOrEqual(addr) && dataEnd().greaterThan(addr); }
+ public boolean blobContains(Address addr) { return headerBegin() .lessThanOrEqual(addr) && dataEnd() .greaterThan(addr); }
// FIXME: add relocationContains
- public boolean instructionsContains(Address addr) { return instructionsBegin().lessThanOrEqual(addr) && instructionsEnd().greaterThan(addr); }
- public boolean dataContains(Address addr) { return dataBegin().lessThanOrEqual(addr) && dataEnd().greaterThan(addr); }
- public boolean contains(Address addr) { return instructionsContains(addr); }
- public boolean isFrameCompleteAt(Address a) { return instructionsContains(a) && a.minus(instructionsBegin()) >= frameCompleteOffsetField.getValue(addr); }
+ public boolean contentContains(Address addr) { return contentBegin().lessThanOrEqual(addr) && contentEnd().greaterThan(addr); }
+ public boolean codeContains(Address addr) { return codeBegin() .lessThanOrEqual(addr) && codeEnd() .greaterThan(addr); }
+ public boolean dataContains(Address addr) { return dataBegin() .lessThanOrEqual(addr) && dataEnd() .greaterThan(addr); }
+ public boolean contains(Address addr) { return contentContains(addr); }
+ public boolean isFrameCompleteAt(Address a) { return codeContains(a) && a.minus(codeBegin()) >= frameCompleteOffsetField.getValue(addr); }
// Reclamation support (really only used by the nmethods, but in order to get asserts to work
// in the CodeCache they are defined virtual here)
@@ -168,7 +181,7 @@ public class CodeBlob extends VMObject {
if (Assert.ASSERTS_ENABLED) {
Assert.that(getOopMaps() != null, "nope");
}
- return getOopMaps().findMapAtOffset(pc.minus(instructionsBegin()), debugging);
+ return getOopMaps().findMapAtOffset(pc.minus(codeBegin()), debugging);
}
// virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, void f(oop*)) { ShouldNotReachHere(); }
@@ -200,7 +213,8 @@ public class CodeBlob extends VMObject {
}
protected void printComponentsOn(PrintStream tty) {
- tty.println(" instructions: [" + instructionsBegin() + ", " + instructionsEnd() + "), " +
+ tty.println(" content: [" + contentBegin() + ", " + contentEnd() + "), " +
+ " code: [" + codeBegin() + ", " + codeEnd() + "), " +
" data: [" + dataBegin() + ", " + dataEnd() + "), " +
" frame size: " + getFrameSize());
}
diff --git a/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java b/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java
index a6641dd16..80da843d3 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java
@@ -134,10 +134,10 @@ public class NMethod extends CodeBlob {
public boolean isOSRMethod() { return getEntryBCI() != VM.getVM().getInvocationEntryBCI(); }
/** Boundaries for different parts */
- public Address constantsBegin() { return instructionsBegin(); }
+ public Address constantsBegin() { return contentBegin(); }
public Address constantsEnd() { return getEntryPoint(); }
- public Address codeBegin() { return getEntryPoint(); }
- public Address codeEnd() { return headerBegin().addOffsetTo(getStubOffset()); }
+ public Address instsBegin() { return codeBegin(); }
+ public Address instsEnd() { return headerBegin().addOffsetTo(getStubOffset()); }
public Address exceptionBegin() { return headerBegin().addOffsetTo(getExceptionOffset()); }
public Address deoptBegin() { return headerBegin().addOffsetTo(getDeoptOffset()); }
public Address stubBegin() { return headerBegin().addOffsetTo(getStubOffset()); }
@@ -156,7 +156,7 @@ public class NMethod extends CodeBlob {
public Address nulChkTableEnd() { return headerBegin().addOffsetTo(getNMethodEndOffset()); }
public int constantsSize() { return (int) constantsEnd() .minus(constantsBegin()); }
- public int codeSize() { return (int) codeEnd() .minus(codeBegin()); }
+ public int instsSize() { return (int) instsEnd() .minus(instsBegin()); }
public int stubSize() { return (int) stubEnd() .minus(stubBegin()); }
public int oopsSize() { return (int) oopsEnd() .minus(oopsBegin()); }
public int scopesDataSize() { return (int) scopesDataEnd() .minus(scopesDataBegin()); }
@@ -169,7 +169,7 @@ public class NMethod extends CodeBlob {
public int totalSize() {
return
constantsSize() +
- codeSize() +
+ instsSize() +
stubSize() +
scopesDataSize() +
scopesPCsSize() +
@@ -179,7 +179,7 @@ public class NMethod extends CodeBlob {
}
public boolean constantsContains (Address addr) { return constantsBegin() .lessThanOrEqual(addr) && constantsEnd() .greaterThan(addr); }
- public boolean codeContains (Address addr) { return codeBegin() .lessThanOrEqual(addr) && codeEnd() .greaterThan(addr); }
+ public boolean instsContains (Address addr) { return instsBegin() .lessThanOrEqual(addr) && instsEnd() .greaterThan(addr); }
public boolean stubContains (Address addr) { return stubBegin() .lessThanOrEqual(addr) && stubEnd() .greaterThan(addr); }
public boolean oopsContains (Address addr) { return oopsBegin() .lessThanOrEqual(addr) && oopsEnd() .greaterThan(addr); }
public boolean scopesDataContains (Address addr) { return scopesDataBegin() .lessThanOrEqual(addr) && scopesDataEnd() .greaterThan(addr); }
@@ -353,7 +353,8 @@ public class NMethod extends CodeBlob {
protected void printComponentsOn(PrintStream tty) {
// FIXME: add relocation information
- tty.println(" instructions: [" + instructionsBegin() + ", " + instructionsEnd() + "), " +
+ tty.println(" content: [" + contentBegin() + ", " + contentEnd() + "), " +
+ " code: [" + codeBegin() + ", " + codeEnd() + "), " +
" data: [" + dataBegin() + ", " + dataEnd() + "), " +
" oops: [" + oopsBegin() + ", " + oopsEnd() + "), " +
" frame size: " + getFrameSize());
diff --git a/agent/src/share/classes/sun/jvm/hotspot/code/PCDesc.java b/agent/src/share/classes/sun/jvm/hotspot/code/PCDesc.java
index ff4b94807..c6bf5d78b 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/code/PCDesc.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/code/PCDesc.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@ public class PCDesc extends VMObject {
}
public Address getRealPC(NMethod code) {
- return code.instructionsBegin().addOffsetTo(getPCOffset());
+ return code.codeBegin().addOffsetTo(getPCOffset());
}
diff --git a/agent/src/share/classes/sun/jvm/hotspot/ui/FindInCodeCachePanel.java b/agent/src/share/classes/sun/jvm/hotspot/ui/FindInCodeCachePanel.java
index 96e7d8ac6..21619b1f5 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/ui/FindInCodeCachePanel.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/ui/FindInCodeCachePanel.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -190,11 +190,11 @@ public class FindInCodeCachePanel extends SAPanel {
private void reportResult(StringBuffer result, CodeBlob blob) {
result.append("<a href='blob:");
- result.append(blob.instructionsBegin().toString());
+ result.append(blob.contentBegin().toString());
result.append("'>");
result.append(blob.getName());
result.append("@");
- result.append(blob.instructionsBegin());
+ result.append(blob.contentBegin());
result.append("</a><br>");
}
diff --git a/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java b/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
index d594404f4..e70ba9461 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
@@ -1415,13 +1415,13 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
buf.append(genMethodAndKlassLink(nmethod.getMethod()));
buf.h3("Compiled Code");
- sun.jvm.hotspot.debugger.Address codeBegin = nmethod.codeBegin();
- sun.jvm.hotspot.debugger.Address codeEnd = nmethod.codeEnd();
- final int codeSize = (int)codeEnd.minus(codeBegin);
- final long startPc = addressToLong(codeBegin);
- final byte[] code = new byte[codeSize];
+ sun.jvm.hotspot.debugger.Address instsBegin = nmethod.instsBegin();
+ sun.jvm.hotspot.debugger.Address instsEnd = nmethod.instsEnd();
+ final int instsSize = nmethod.instsSize();
+ final long startPc = addressToLong(instsBegin);
+ final byte[] code = new byte[instsSize];
for (int i=0; i < code.length; i++)
- code[i] = codeBegin.getJByteAt(i);
+ code[i] = instsBegin.getJByteAt(i);
final long verifiedEntryPoint = addressToLong(nmethod.getVerifiedEntryPoint());
final long entryPoint = addressToLong(nmethod.getEntryPoint());
@@ -1499,8 +1499,8 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
buf.h3("CodeBlob");
buf.h3("Compiled Code");
- final sun.jvm.hotspot.debugger.Address codeBegin = blob.instructionsBegin();
- final int codeSize = blob.getInstructionsSize();
+ final sun.jvm.hotspot.debugger.Address codeBegin = blob.codeBegin();
+ final int codeSize = blob.getCodeSize();
final long startPc = addressToLong(codeBegin);
final byte[] code = new byte[codeSize];
for (int i=0; i < code.length; i++)
diff --git a/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java b/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java
index b1e3c4acc..379e83e83 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java
@@ -96,15 +96,15 @@ public class PointerFinder {
if (Assert.ASSERTS_ENABLED) {
Assert.that(loc.blob != null, "Should have found CodeBlob");
}
- loc.inBlobInstructions = loc.blob.instructionsContains(a);
- loc.inBlobData = loc.blob.dataContains(a);
+ loc.inBlobCode = loc.blob.codeContains(a);
+ loc.inBlobData = loc.blob.dataContains(a);
if (loc.blob.isNMethod()) {
NMethod nm = (NMethod) loc.blob;
loc.inBlobOops = nm.oopsContains(a);
}
- loc.inBlobUnknownLocation = (!(loc.inBlobInstructions ||
+ loc.inBlobUnknownLocation = (!(loc.inBlobCode ||
loc.inBlobData ||
loc.inBlobOops));
return loc;
diff --git a/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java b/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java
index fd54b0d45..85559d437 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerLocation.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -65,7 +65,7 @@ public class PointerLocation {
InterpreterCodelet interpreterCodelet;
CodeBlob blob;
// FIXME: add more detail about CodeBlob
- boolean inBlobInstructions;
+ boolean inBlobCode;
boolean inBlobData;
boolean inBlobOops;
boolean inBlobUnknownLocation;
@@ -142,8 +142,8 @@ public class PointerLocation {
return blob;
}
- public boolean isInBlobInstructions() {
- return inBlobInstructions;
+ public boolean isInBlobCode() {
+ return inBlobCode;
}
public boolean isInBlobData() {
@@ -233,8 +233,8 @@ public class PointerLocation {
} else if (isInCodeCache()) {
CodeBlob b = getCodeBlob();
tty.print("In ");
- if (isInBlobInstructions()) {
- tty.print("instructions");
+ if (isInBlobCode()) {
+ tty.print("code");
} else if (isInBlobData()) {
tty.print("data");
} else if (isInBlobOops()) {