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

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

Print this page


   1 /*
   2  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 173     return
 174       constantsSize()    +
 175       instsSize()        +
 176       stubSize()         +
 177       scopesDataSize()   +
 178       scopesPCsSize()    +
 179       dependenciesSize() +
 180       handlerTableSize() +
 181       nulChkTableSize();
 182   }
 183 
 184   public boolean constantsContains   (Address addr) { return constantsBegin()   .lessThanOrEqual(addr) && constantsEnd()   .greaterThan(addr); }
 185   public boolean instsContains       (Address addr) { return instsBegin()       .lessThanOrEqual(addr) && instsEnd()       .greaterThan(addr); }
 186   public boolean stubContains        (Address addr) { return stubBegin()        .lessThanOrEqual(addr) && stubEnd()        .greaterThan(addr); }
 187   public boolean oopsContains        (Address addr) { return oopsBegin()        .lessThanOrEqual(addr) && oopsEnd()        .greaterThan(addr); }
 188   public boolean scopesDataContains  (Address addr) { return scopesDataBegin()  .lessThanOrEqual(addr) && scopesDataEnd()  .greaterThan(addr); }
 189   public boolean scopesPCsContains   (Address addr) { return scopesPCsBegin()   .lessThanOrEqual(addr) && scopesPCsEnd()   .greaterThan(addr); }
 190   public boolean handlerTableContains(Address addr) { return handlerTableBegin().lessThanOrEqual(addr) && handlerTableEnd().greaterThan(addr); }
 191   public boolean nulChkTableContains (Address addr) { return nulChkTableBegin() .lessThanOrEqual(addr) && nulChkTableEnd() .greaterThan(addr); }
 192 


 193   /** Entry points */
 194   public Address getEntryPoint()         { return entryPointField.getValue(addr);         }
 195   public Address getVerifiedEntryPoint() { return verifiedEntryPointField.getValue(addr); }
 196 
 197   /** Support for oops in scopes and relocs. Note: index 0 is reserved for null. */
 198   public OopHandle getOopAt(int index) {
 199     if (index == 0) return null;
 200     if (Assert.ASSERTS_ENABLED) {
 201       Assert.that(index > 0 && index <= oopsSize(), "must be a valid non-zero index");
 202     }
 203     return oopsBegin().getOopHandleAt((index - 1) * VM.getVM().getOopSize());
 204   }
 205 
 206   // FIXME: add interpreter_entry_point()
 207   // FIXME: add lazy_interpreter_entry_point() for C2
 208 
 209   // **********
 210   // * FIXME: * ADD ACCESS TO FLAGS!!!!
 211   // **********
 212   // public boolean isInUse();
 213   // public boolean isAlive();
 214   // public boolean isNotEntrant();
 215   // public boolean isZombie();
 216 
 217   // ********************************
 218   // * MAJOR FIXME: MAJOR HACK HERE *
 219   // ********************************
 220   public boolean isZombie() { return false; }
 221 


   1 /*
   2  * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 173     return
 174       constantsSize()    +
 175       instsSize()        +
 176       stubSize()         +
 177       scopesDataSize()   +
 178       scopesPCsSize()    +
 179       dependenciesSize() +
 180       handlerTableSize() +
 181       nulChkTableSize();
 182   }
 183 
 184   public boolean constantsContains   (Address addr) { return constantsBegin()   .lessThanOrEqual(addr) && constantsEnd()   .greaterThan(addr); }
 185   public boolean instsContains       (Address addr) { return instsBegin()       .lessThanOrEqual(addr) && instsEnd()       .greaterThan(addr); }
 186   public boolean stubContains        (Address addr) { return stubBegin()        .lessThanOrEqual(addr) && stubEnd()        .greaterThan(addr); }
 187   public boolean oopsContains        (Address addr) { return oopsBegin()        .lessThanOrEqual(addr) && oopsEnd()        .greaterThan(addr); }
 188   public boolean scopesDataContains  (Address addr) { return scopesDataBegin()  .lessThanOrEqual(addr) && scopesDataEnd()  .greaterThan(addr); }
 189   public boolean scopesPCsContains   (Address addr) { return scopesPCsBegin()   .lessThanOrEqual(addr) && scopesPCsEnd()   .greaterThan(addr); }
 190   public boolean handlerTableContains(Address addr) { return handlerTableBegin().lessThanOrEqual(addr) && handlerTableEnd().greaterThan(addr); }
 191   public boolean nulChkTableContains (Address addr) { return nulChkTableBegin() .lessThanOrEqual(addr) && nulChkTableEnd() .greaterThan(addr); }
 192 
 193   public int getOopsLength() { return (int) (oopsSize() / VM.getVM().getOopSize()); }
 194 
 195   /** Entry points */
 196   public Address getEntryPoint()         { return entryPointField.getValue(addr);         }
 197   public Address getVerifiedEntryPoint() { return verifiedEntryPointField.getValue(addr); }
 198 
 199   /** Support for oops in scopes and relocs. Note: index 0 is reserved for null. */
 200   public OopHandle getOopAt(int index) {
 201     if (index == 0) return null;
 202     if (Assert.ASSERTS_ENABLED) {
 203       Assert.that(index > 0 && index <= getOopsLength(), "must be a valid non-zero index");
 204     }
 205     return oopsBegin().getOopHandleAt((index - 1) * VM.getVM().getOopSize());
 206   }
 207 
 208   // FIXME: add interpreter_entry_point()
 209   // FIXME: add lazy_interpreter_entry_point() for C2
 210 
 211   // **********
 212   // * FIXME: * ADD ACCESS TO FLAGS!!!!
 213   // **********
 214   // public boolean isInUse();
 215   // public boolean isAlive();
 216   // public boolean isNotEntrant();
 217   // public boolean isZombie();
 218 
 219   // ********************************
 220   // * MAJOR FIXME: MAJOR HACK HERE *
 221   // ********************************
 222   public boolean isZombie() { return false; }
 223 


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