agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff agent/src/share/classes/sun/jvm/hotspot/code

agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java

Print this page




 154   // FIXME: add getRelocationSize()
 155   public int getContentSize()      { return (int) contentEnd().minus(contentBegin()); }
 156   public int getCodeSize()         { return (int) codeEnd()   .minus(codeBegin());    }
 157   public int getDataSize()         { return (int) dataEnd()   .minus(dataBegin());    }
 158 
 159   // Containment
 160   public boolean blobContains(Address addr)    { return headerBegin() .lessThanOrEqual(addr) && dataEnd()   .greaterThan(addr); }
 161   // FIXME: add relocationContains
 162   public boolean contentContains(Address addr) { return contentBegin().lessThanOrEqual(addr) && contentEnd().greaterThan(addr); }
 163   public boolean codeContains(Address addr)    { return codeBegin()   .lessThanOrEqual(addr) && codeEnd()   .greaterThan(addr); }
 164   public boolean dataContains(Address addr)    { return dataBegin()   .lessThanOrEqual(addr) && dataEnd()   .greaterThan(addr); }
 165   public boolean contains(Address addr)        { return contentContains(addr);                                                  }
 166   public boolean isFrameCompleteAt(Address a)  { return codeContains(a) && a.minus(codeBegin()) >= frameCompleteOffsetField.getValue(addr); }
 167 
 168   // Reclamation support (really only used by the nmethods, but in order to get asserts to work
 169   // in the CodeCache they are defined virtual here)
 170   public boolean isZombie()             { return false; }
 171   public boolean isLockedByVM()         { return false; }
 172 
 173   /** OopMap for frame; can return null if none available */
 174   public OopMapSet getOopMaps() {
 175     Address oopMapsAddr = oopMapsField.getValue(addr);
 176     if (oopMapsAddr == null) {
 177       return null;
 178     }
 179     return new OopMapSet(oopMapsAddr);
 180   }
 181   // FIXME: not yet implementable
 182   //  void set_oop_maps(OopMapSet* p);
 183 
 184   public OopMap getOopMapForReturnAddress(Address returnAddress, boolean debugging) {
 185     Address pc = returnAddress;
 186     if (Assert.ASSERTS_ENABLED) {
 187       Assert.that(getOopMaps() != null, "nope");
 188     }
 189     return getOopMaps().findMapAtOffset(pc.minus(codeBegin()), debugging);
 190   }
 191 
 192   //  virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, void f(oop*)) { ShouldNotReachHere(); }
 193   //  FIXME;
 194 
 195   /** NOTE: this returns a size in BYTES in this system! */
 196   public long getFrameSize() {
 197     return VM.getVM().getAddressSize() * frameSizeField.getValue(addr);
 198   }
 199 
 200   // Returns true, if the next frame is responsible for GC'ing oops passed as arguments
 201   public boolean callerMustGCArguments() { return false; }
 202 
 203   public String getName() {
 204     return CStringUtilities.getString(nameField.getValue(addr));




 154   // FIXME: add getRelocationSize()
 155   public int getContentSize()      { return (int) contentEnd().minus(contentBegin()); }
 156   public int getCodeSize()         { return (int) codeEnd()   .minus(codeBegin());    }
 157   public int getDataSize()         { return (int) dataEnd()   .minus(dataBegin());    }
 158 
 159   // Containment
 160   public boolean blobContains(Address addr)    { return headerBegin() .lessThanOrEqual(addr) && dataEnd()   .greaterThan(addr); }
 161   // FIXME: add relocationContains
 162   public boolean contentContains(Address addr) { return contentBegin().lessThanOrEqual(addr) && contentEnd().greaterThan(addr); }
 163   public boolean codeContains(Address addr)    { return codeBegin()   .lessThanOrEqual(addr) && codeEnd()   .greaterThan(addr); }
 164   public boolean dataContains(Address addr)    { return dataBegin()   .lessThanOrEqual(addr) && dataEnd()   .greaterThan(addr); }
 165   public boolean contains(Address addr)        { return contentContains(addr);                                                  }
 166   public boolean isFrameCompleteAt(Address a)  { return codeContains(a) && a.minus(codeBegin()) >= frameCompleteOffsetField.getValue(addr); }
 167 
 168   // Reclamation support (really only used by the nmethods, but in order to get asserts to work
 169   // in the CodeCache they are defined virtual here)
 170   public boolean isZombie()             { return false; }
 171   public boolean isLockedByVM()         { return false; }
 172 
 173   /** OopMap for frame; can return null if none available */
 174   public ImmutableOopMapSet getOopMaps() {
 175     Address oopMapsAddr = oopMapsField.getValue(addr);
 176     if (oopMapsAddr == null) {
 177       return null;
 178     }
 179     return new ImmutableOopMapSet(oopMapsAddr);
 180   }
 181   // FIXME: not yet implementable
 182   //  void set_oop_maps(ImmutableOopMapSet* p);
 183 
 184   public ImmutableOopMap getOopMapForReturnAddress(Address returnAddress, boolean debugging) {
 185     Address pc = returnAddress;
 186     if (Assert.ASSERTS_ENABLED) {
 187       Assert.that(getOopMaps() != null, "nope");
 188     }
 189     return getOopMaps().findMapAtOffset(pc.minus(codeBegin()), debugging);
 190   }
 191 
 192   //  virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, void f(oop*)) { ShouldNotReachHere(); }
 193   //  FIXME;
 194 
 195   /** NOTE: this returns a size in BYTES in this system! */
 196   public long getFrameSize() {
 197     return VM.getVM().getAddressSize() * frameSizeField.getValue(addr);
 198   }
 199 
 200   // Returns true, if the next frame is responsible for GC'ing oops passed as arguments
 201   public boolean callerMustGCArguments() { return false; }
 202 
 203   public String getName() {
 204     return CStringUtilities.getString(nameField.getValue(addr));


agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File