Print this page


Split Close
Expand all
Collapse all
          --- old/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java
          +++ new/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java
↓ open down ↓ 139 lines elided ↑ open up ↑
 140  140    public boolean isEntryFrame()                 { return VM.getVM().getStubRoutines().returnsToCallStub(getPC()); }
 141  141    public boolean isNativeFrame() {
 142  142      if (!VM.getVM().isCore()) {
 143  143        CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());
 144  144        return (cb != null && cb.isNativeMethod());
 145  145      } else {
 146  146        return false;
 147  147      }
 148  148    }
 149  149  
 150      -  public boolean isRicochetFrame() {
 151      -    CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());
 152      -    RicochetBlob rcb = VM.getVM().ricochetBlob();
 153      -    return (cb == rcb && rcb != null && rcb.returnsToBounceAddr(getPC()));
 154      -  }
 155      -
 156  150    public boolean isCompiledFrame() {
 157  151      if (Assert.ASSERTS_ENABLED) {
 158  152        Assert.that(!VM.getVM().isCore(), "noncore builds only");
 159  153      }
 160  154      CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());
 161  155      return (cb != null && cb.isJavaMethod());
 162  156    }
 163  157  
 164  158    public boolean isRuntimeFrame() {
 165  159      if (Assert.ASSERTS_ENABLED) {
↓ open down ↓ 43 lines elided ↑ open up ↑
 209  203    /** returns the sending frame */
 210  204    public abstract Frame sender(RegisterMap map, CodeBlob nm);
 211  205  
 212  206    /** equivalent to sender(map, null) */
 213  207    public Frame sender(RegisterMap map)          { return sender(map, null); }
 214  208  
 215  209    /** returns the sender, but skips conversion frames */
 216  210    public Frame realSender(RegisterMap map) {
 217  211      if (!VM.getVM().isCore()) {
 218  212        Frame result = sender(map);
 219      -      while (result.isRuntimeFrame() ||
 220      -             result.isRicochetFrame()) {
      213 +      while (result.isRuntimeFrame()) {
 221  214          result = result.sender(map);
 222  215        }
 223  216        return result;
 224  217      } else {
 225  218        return sender(map);
 226  219      }
 227  220    }
 228  221  
 229  222    /** Platform-dependent query indicating whether this frame has a
 230  223        sender. Should return true if it is possible to call sender() at
↓ open down ↓ 393 lines elided ↑ open up ↑
 624  617        }
 625  618      }
 626  619    }
 627  620  
 628  621    private void oopsEntryDo      (AddressVisitor oopVisitor, RegisterMap regMap) {}
 629  622    private void oopsCodeBlobDo   (AddressVisitor oopVisitor, RegisterMap regMap) {
 630  623      CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());
 631  624      if (Assert.ASSERTS_ENABLED) {
 632  625        Assert.that(cb != null, "sanity check");
 633  626      }
 634      -    if (cb == VM.getVM().ricochetBlob()) {
 635      -      oopsRicochetDo(oopVisitor, regMap);
 636      -    }
 637  627      if (cb.getOopMaps() != null) {
 638  628        OopMapSet.oopsDo(this, cb, regMap, oopVisitor, VM.getVM().isDebugging());
 639  629  
 640  630        // FIXME: add in traversal of argument oops (skipping this for
 641  631        // now until we have the other stuff tested)
 642  632  
 643  633      }
 644  634  
 645  635      // FIXME: would add this in in non-debugging system
 646  636  
 647  637      // If we see an activation belonging to a non_entrant nmethod, we mark it.
 648  638      //    if (cb->is_nmethod() && ((nmethod *)cb)->is_not_entrant()) {
 649  639      //      ((nmethod*)cb)->mark_as_seen_on_stack();
 650  640      //    }
 651  641    }
 652  642  
 653      -  private void oopsRicochetDo      (AddressVisitor oopVisitor, RegisterMap regMap) {
 654      -    // XXX Empty for now
 655      -  }
 656      -
 657  643    // FIXME: implement the above routines, plus add
 658  644    // oops_interpreted_arguments_do and oops_compiled_arguments_do
 659  645  }
 660  646  
 661  647  //
 662  648  // Only used internally, to iterate through oop slots in interpreted
 663  649  // frames
 664  650  //
 665  651  class InterpreterFrameClosure implements OffsetClosure {
 666  652    // Used for debugging this code
↓ open down ↓ 97 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX