agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java Fri Jul 8 15:22:41 2011
--- new/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java Fri Jul 8 15:22:41 2011
*** 567,580 ****
--- 567,580 ----
case Bytecodes._invokestatic:
case Bytecodes._invokeinterface:
case Bytecodes._invokedynamic:
// FIXME: print signature of referenced method (need more
// accessors in ConstantPool and ConstantPoolCache)
! int idx = currentBC.getIndexBig();
! int idx = currentBC.hasIndexU4() ? currentBC.getIndexU4() : currentBC.getIndexU2();
tty.print(" idx " + idx);
/*
! int idx = currentBC.getIndexBig();
! int idx = currentBC.getIndexU2();
ConstantPool cp = method().getConstants();
int nameAndTypeIdx = cp.name_and_type_ref_index_at(idx);
int signatureIdx = cp.signature_ref_index_at(nameAndTypeIdx);
Symbol* signature = cp.symbol_at(signatureIdx);
tty.print("%s", signature.as_C_string());
*** 607,620 ****
--- 607,620 ----
case Bytecodes._invokestatic:
case Bytecodes._invokeinterface:
case Bytecodes._invokedynamic:
// FIXME: print signature of referenced method (need more
// accessors in ConstantPool and ConstantPoolCache)
! int idx = currentBC.getIndexBig();
! int idx = currentBC.hasIndexU4() ? currentBC.getIndexU4() : currentBC.getIndexU2();
tty.print(" idx " + idx);
/*
! int idx = currentBC.getIndexBig();
! int idx = currentBC.getIndexU2();
constantPoolOop cp = method().constants();
int nameAndTypeIdx = cp.name_and_type_ref_index_at(idx);
int signatureIdx = cp.signature_ref_index_at(nameAndTypeIdx);
Symbol* signature = cp.symbol_at(signatureIdx);
tty.print("%s", signature.as_C_string());
*** 1116,1126 ****
--- 1116,1127 ----
/** Sets the current state to be the state after executing the
current instruction, starting in the current state. */
void interp1 (BytecodeStream itr) {
if (DEBUG) {
! System.err.println(" - bci " + itr.bci() + " " + itr.code());
+ printCurrentState(System.err, itr, false);
}
// if (TraceNewOopMapGeneration) {
// print_current_state(tty, itr, TraceNewOopMapGenerationDetailed);
// }
*** 1177,1188 ****
--- 1178,1189 ----
case Bytecodes._dconst_0:
case Bytecodes._dconst_1: ppush(vvCTS); break;
case Bytecodes._ldc2_w: ppush(vvCTS); break;
! case Bytecodes._ldc: doLdc(itr.getIndex(), itr.bci()); break;
! case Bytecodes._ldc_w: doLdc(itr.getIndexBig(), itr.bci());break;
! case Bytecodes._ldc: doLdc(itr.bci()); break;
! case Bytecodes._ldc_w: doLdc(itr.bci()); break;
case Bytecodes._iload:
case Bytecodes._fload: ppload(vCTS, itr.getIndex()); break;
case Bytecodes._lload:
*** 1370,1391 ****
--- 1371,1390 ----
case Bytecodes._if_acmpne: ppop(rrCTS); break;
case Bytecodes._jsr: doJsr(itr.dest()); break;
case Bytecodes._jsr_w: doJsr(itr.dest_w()); break;
! case Bytecodes._getstatic: doField(true, true, itr.getIndexU2Cpcache(), itr.bci()); break;
itr.getIndexBig(),
! itr.bci()); break;
! case Bytecodes._putstatic: doField(false, true, itr.getIndexBig(), itr.bci()); break;
case Bytecodes._getfield: doField(true, false, itr.getIndexBig(), itr.bci()); break;
case Bytecodes._putfield: doField(false, false, itr.getIndexBig(), itr.bci()); break;
+ case Bytecodes._putstatic: doField(false, true, itr.getIndexU2Cpcache(), itr.bci()); break;
! case Bytecodes._getfield: doField(true, false, itr.getIndexU2Cpcache(), itr.bci()); break;
! case Bytecodes._putfield: doField(false, false, itr.getIndexU2Cpcache(), itr.bci()); break;
case Bytecodes._invokevirtual:
! case Bytecodes._invokespecial: doMethod(false, false, itr.getIndexBig(), itr.bci()); break;
! case Bytecodes._invokestatic: doMethod(true, false, itr.getIndexBig(), itr.bci()); break;
! case Bytecodes._invokedynamic: doMethod(false, true, itr.getIndexBig(), itr.bci()); break;
! case Bytecodes._invokeinterface: doMethod(false, true, itr.getIndexBig(), itr.bci()); break;
! case Bytecodes._invokespecial: doMethod(false, false, itr.getIndexU2Cpcache(), itr.bci()); break;
! case Bytecodes._invokestatic: doMethod(true, false, itr.getIndexU2Cpcache(), itr.bci()); break;
! case Bytecodes._invokedynamic: doMethod(true, false, itr.getIndexU4(), itr.bci()); break;
! case Bytecodes._invokeinterface: doMethod(false, true, itr.getIndexU2Cpcache(), itr.bci()); break;
case Bytecodes._newarray:
case Bytecodes._anewarray: ppNewRef(vCTS, itr.bci()); break;
case Bytecodes._checkcast: doCheckcast(); break;
case Bytecodes._arraylength:
case Bytecodes._instanceof: pp(rCTS, vCTS); break;
*** 1663,1679 ****
--- 1662,1676 ----
}
push(actual[idx]);
}
}
- void doLdc (int idx, int bci) {
+ BytecodeLoadConstant ldc = BytecodeLoadConstant.at(_method, bci);
ConstantPool cp = method().getConstants();
! ConstantTag tag = cp.getTagAt(idx);
! CellTypeState cts = (tag.isString() || tag.isUnresolvedString() ||
tag.isKlass() || tag.isUnresolvedKlass())
? CellTypeState.makeLineRef(bci)
: valCTS;
! BasicType bt = ldc.resultType();
! CellTypeState cts = (bt == BasicType.T_OBJECT) ? CellTypeState.makeLineRef(bci) : valCTS;
ppush1(cts);
}
void doAstore (int idx) {
CellTypeState r_or_p = pop();
*** 1727,1746 ****
--- 1724,1735 ----
}
void doMethod (boolean is_static, boolean is_interface, int idx, int bci) {
// Dig up signature for field in constant pool
ConstantPool cp = _method.getConstants();
! int nameAndTypeIdx = cp.getTagAt(idx).isNameAndType() ? idx : cp.getNameAndTypeRefIndexAt(idx);
int signatureIdx = cp.getSignatureRefIndexAt(nameAndTypeIdx);
Symbol signature = cp.getSymbolAt(signatureIdx);
! Symbol signature = cp.getSignatureRefAt(idx);
if (DEBUG) {
System.err.println("doMethod: signature = " + signature.asString() + ", idx = " + idx +
", nameAndTypeIdx = " + nameAndTypeIdx + ", signatureIdx = " + signatureIdx +
", bci = " + bci);
}
// Parse method signature
CellTypeStateList out = new CellTypeStateList(4);
CellTypeStateList in = new CellTypeStateList(MAXARGSIZE+1); // Includes result
ComputeCallStack cse = new ComputeCallStack(signature);
agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File