hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Frame.java
changeset 13391 30245956af37
parent 10517 f92c9ff3a15f
child 13728 882756847a04
equal deleted inserted replaced
13309:50c604cb0d5f 13391:30245956af37
   145     } else {
   145     } else {
   146       return false;
   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   public boolean isCompiledFrame() {
   150   public boolean isCompiledFrame() {
   157     if (Assert.ASSERTS_ENABLED) {
   151     if (Assert.ASSERTS_ENABLED) {
   158       Assert.that(!VM.getVM().isCore(), "noncore builds only");
   152       Assert.that(!VM.getVM().isCore(), "noncore builds only");
   159     }
   153     }
   160     CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());
   154     CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());
   214 
   208 
   215   /** returns the sender, but skips conversion frames */
   209   /** returns the sender, but skips conversion frames */
   216   public Frame realSender(RegisterMap map) {
   210   public Frame realSender(RegisterMap map) {
   217     if (!VM.getVM().isCore()) {
   211     if (!VM.getVM().isCore()) {
   218       Frame result = sender(map);
   212       Frame result = sender(map);
   219       while (result.isRuntimeFrame() ||
   213       while (result.isRuntimeFrame()) {
   220              result.isRicochetFrame()) {
       
   221         result = result.sender(map);
   214         result = result.sender(map);
   222       }
   215       }
   223       return result;
   216       return result;
   224     } else {
   217     } else {
   225       return sender(map);
   218       return sender(map);
   629   private void oopsCodeBlobDo   (AddressVisitor oopVisitor, RegisterMap regMap) {
   622   private void oopsCodeBlobDo   (AddressVisitor oopVisitor, RegisterMap regMap) {
   630     CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());
   623     CodeBlob cb = VM.getVM().getCodeCache().findBlob(getPC());
   631     if (Assert.ASSERTS_ENABLED) {
   624     if (Assert.ASSERTS_ENABLED) {
   632       Assert.that(cb != null, "sanity check");
   625       Assert.that(cb != null, "sanity check");
   633     }
   626     }
   634     if (cb == VM.getVM().ricochetBlob()) {
       
   635       oopsRicochetDo(oopVisitor, regMap);
       
   636     }
       
   637     if (cb.getOopMaps() != null) {
   627     if (cb.getOopMaps() != null) {
   638       OopMapSet.oopsDo(this, cb, regMap, oopVisitor, VM.getVM().isDebugging());
   628       OopMapSet.oopsDo(this, cb, regMap, oopVisitor, VM.getVM().isDebugging());
   639 
   629 
   640       // FIXME: add in traversal of argument oops (skipping this for
   630       // FIXME: add in traversal of argument oops (skipping this for
   641       // now until we have the other stuff tested)
   631       // now until we have the other stuff tested)
   646 
   636 
   647     // If we see an activation belonging to a non_entrant nmethod, we mark it.
   637     // If we see an activation belonging to a non_entrant nmethod, we mark it.
   648     //    if (cb->is_nmethod() && ((nmethod *)cb)->is_not_entrant()) {
   638     //    if (cb->is_nmethod() && ((nmethod *)cb)->is_not_entrant()) {
   649     //      ((nmethod*)cb)->mark_as_seen_on_stack();
   639     //      ((nmethod*)cb)->mark_as_seen_on_stack();
   650     //    }
   640     //    }
   651   }
       
   652 
       
   653   private void oopsRicochetDo      (AddressVisitor oopVisitor, RegisterMap regMap) {
       
   654     // XXX Empty for now
       
   655   }
   641   }
   656 
   642 
   657   // FIXME: implement the above routines, plus add
   643   // FIXME: implement the above routines, plus add
   658   // oops_interpreted_arguments_do and oops_compiled_arguments_do
   644   // oops_interpreted_arguments_do and oops_compiled_arguments_do
   659 }
   645 }