hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java
author twisti
Thu, 20 May 2010 06:34:23 -0700
changeset 5686 5435e77aa3df
parent 4095 6e0acfda1d47
child 5702 201c5cde25bb
permissions -rw-r--r--
6951083: oops and relocations should part of nmethod not CodeBlob Summary: This moves the oops from Codeblob to nmethod. Reviewed-by: kvn, never
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
     2
 * Copyright 2000-2010 Sun Microsystems, Inc.  All Rights Reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
package sun.jvm.hotspot.code;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
import java.io.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
import java.util.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
import sun.jvm.hotspot.debugger.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
import sun.jvm.hotspot.memory.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
import sun.jvm.hotspot.oops.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
import sun.jvm.hotspot.runtime.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
import sun.jvm.hotspot.types.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
import sun.jvm.hotspot.utilities.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
public class NMethod extends CodeBlob {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
  private static long          pcDescSize;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  private static CIntegerField zombieInstructionSizeField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  private static sun.jvm.hotspot.types.OopField methodField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  /** != InvocationEntryBci if this nmethod is an on-stack replacement method */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  private static CIntegerField entryBCIField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  /** To support simple linked-list chaining of nmethods */
3908
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
    43
  private static AddressField  osrLinkField;
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
    44
  private static AddressField  scavengeRootLinkField;
4095
6e0acfda1d47 6892186: SA does not dump debug info for scalar replaced objects
kvn
parents: 3908
diff changeset
    45
  private static JByteField    scavengeRootStateField;
3908
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
    46
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  /** Offsets for different nmethod parts */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  private static CIntegerField exceptionOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  private static CIntegerField deoptOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  private static CIntegerField origPCOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  private static CIntegerField stubOffsetField;
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
    52
  private static CIntegerField oopsOffsetField;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  private static CIntegerField scopesDataOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  private static CIntegerField scopesPCsOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  private static CIntegerField dependenciesOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
  private static CIntegerField handlerTableOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  private static CIntegerField nulChkTableOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  private static CIntegerField nmethodEndOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  /** Offsets for entry points */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  /** Entry point with class check */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  private static AddressField  entryPointField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  /** Entry point without class check */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  private static AddressField  verifiedEntryPointField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  /** Entry point for on stack replacement */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  private static AddressField  osrEntryPointField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  // FIXME: add access to flags (how?)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  /** NMethod Flushing lock (if non-zero, then the nmethod is not removed) */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  private static JIntField     lockCountField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  /** not_entrant method removal. Each mark_sweep pass will update
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
      this mark to current sweep invocation count if it is seen on the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
      stack.  An not_entrant method can be removed when there is no
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
      more activations, i.e., when the _stack_traversal_mark is less than
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
      current sweep traversal index. */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
  private static CIntegerField stackTraversalMarkField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  static {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
    VM.registerVMInitializedObserver(new Observer() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
        public void update(Observable o, Object data) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
          initialize(VM.getVM().getTypeDataBase());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
      });
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  private static void initialize(TypeDataBase db) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
    Type type = db.lookupType("nmethod");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
    zombieInstructionSizeField  = type.getCIntegerField("_zombie_instruction_size");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    methodField                 = type.getOopField("_method");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
    entryBCIField               = type.getCIntegerField("_entry_bci");
3908
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
    94
    osrLinkField                = type.getAddressField("_osr_link");
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
    95
    scavengeRootLinkField       = type.getAddressField("_scavenge_root_link");
4095
6e0acfda1d47 6892186: SA does not dump debug info for scalar replaced objects
kvn
parents: 3908
diff changeset
    96
    scavengeRootStateField      = type.getJByteField("_scavenge_root_state");
3908
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
    97
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
    exceptionOffsetField        = type.getCIntegerField("_exception_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
    deoptOffsetField            = type.getCIntegerField("_deoptimize_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
    origPCOffsetField           = type.getCIntegerField("_orig_pc_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
    stubOffsetField             = type.getCIntegerField("_stub_offset");
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   102
    oopsOffsetField             = type.getCIntegerField("_oops_offset");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
    scopesDataOffsetField       = type.getCIntegerField("_scopes_data_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
    scopesPCsOffsetField        = type.getCIntegerField("_scopes_pcs_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    dependenciesOffsetField     = type.getCIntegerField("_dependencies_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
    handlerTableOffsetField     = type.getCIntegerField("_handler_table_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
    nulChkTableOffsetField      = type.getCIntegerField("_nul_chk_table_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
    nmethodEndOffsetField       = type.getCIntegerField("_nmethod_end_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
    entryPointField             = type.getAddressField("_entry_point");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
    verifiedEntryPointField     = type.getAddressField("_verified_entry_point");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    osrEntryPointField          = type.getAddressField("_osr_entry_point");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
    lockCountField              = type.getJIntField("_lock_count");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    stackTraversalMarkField     = type.getCIntegerField("_stack_traversal_mark");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
    pcDescSize = db.lookupType("PcDesc").getSize();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  public NMethod(Address addr) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
    super(addr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  // Accessors
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
  public Address getAddress() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
    return addr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  public Method getMethod() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
    return (Method) VM.getVM().getObjectHeap().newOop(methodField.getValue(addr));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
  // Type info
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
  public boolean isNMethod()      { return true;                    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
  public boolean isJavaMethod()   { return !getMethod().isNative(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  public boolean isNativeMethod() { return getMethod().isNative();  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  public boolean isOSRMethod()    { return getEntryBCI() != VM.getVM().getInvocationEntryBCI(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  /** Boundaries for different parts */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  public Address constantsBegin()       { return instructionsBegin();                                }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  public Address constantsEnd()         { return getEntryPoint();                                    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  public Address codeBegin()            { return getEntryPoint();                                    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  public Address codeEnd()              { return headerBegin().addOffsetTo(getStubOffset());         }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  public Address exceptionBegin()       { return headerBegin().addOffsetTo(getExceptionOffset());    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
  public Address deoptBegin()           { return headerBegin().addOffsetTo(getDeoptOffset());        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  public Address stubBegin()            { return headerBegin().addOffsetTo(getStubOffset());         }
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   146
  public Address stubEnd()              { return headerBegin().addOffsetTo(getOopsOffset());         }
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   147
  public Address oopsBegin()            { return headerBegin().addOffsetTo(getOopsOffset());         }
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   148
  public Address oopsEnd()              { return headerBegin().addOffsetTo(getScopesDataOffset());   }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  public Address scopesDataBegin()      { return headerBegin().addOffsetTo(getScopesDataOffset());   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  public Address scopesDataEnd()        { return headerBegin().addOffsetTo(getScopesPCsOffset());    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  public Address scopesPCsBegin()       { return headerBegin().addOffsetTo(getScopesPCsOffset());    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
  public Address scopesPCsEnd()         { return headerBegin().addOffsetTo(getDependenciesOffset()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
  public Address dependenciesBegin()    { return headerBegin().addOffsetTo(getDependenciesOffset()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  public Address dependenciesEnd()      { return headerBegin().addOffsetTo(getHandlerTableOffset()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  public Address handlerTableBegin()    { return headerBegin().addOffsetTo(getHandlerTableOffset()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
  public Address handlerTableEnd()      { return headerBegin().addOffsetTo(getNulChkTableOffset());  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  public Address nulChkTableBegin()     { return headerBegin().addOffsetTo(getNulChkTableOffset());  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  public Address nulChkTableEnd()       { return headerBegin().addOffsetTo(getNMethodEndOffset());   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
  public int constantsSize()            { return (int) constantsEnd()   .minus(constantsBegin());    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  public int codeSize()                 { return (int) codeEnd()        .minus(codeBegin());         }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
  public int stubSize()                 { return (int) stubEnd()        .minus(stubBegin());         }
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   163
  public int oopsSize()                 { return (int) oopsEnd()        .minus(oopsBegin());         }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  public int scopesDataSize()           { return (int) scopesDataEnd()  .minus(scopesDataBegin());   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  public int scopesPCsSize()            { return (int) scopesPCsEnd()   .minus(scopesPCsBegin());    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  public int dependenciesSize()         { return (int) dependenciesEnd().minus(dependenciesBegin()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  public int handlerTableSize()         { return (int) handlerTableEnd().minus(handlerTableBegin()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  public int nulChkTableSize()          { return (int) nulChkTableEnd() .minus(nulChkTableBegin());  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  public int origPCOffset()             { return (int) origPCOffsetField.getValue(addr);             }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
  public int totalSize() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
    return
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
      constantsSize()    +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
      codeSize()         +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
      stubSize()         +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
      scopesDataSize()   +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
      scopesPCsSize()    +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
      dependenciesSize() +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
      handlerTableSize() +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
      nulChkTableSize();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  public boolean constantsContains   (Address addr) { return constantsBegin()   .lessThanOrEqual(addr) && constantsEnd()   .greaterThan(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
  public boolean codeContains        (Address addr) { return codeBegin()        .lessThanOrEqual(addr) && codeEnd()        .greaterThan(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  public boolean stubContains        (Address addr) { return stubBegin()        .lessThanOrEqual(addr) && stubEnd()        .greaterThan(addr); }
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   186
  public boolean oopsContains        (Address addr) { return oopsBegin()        .lessThanOrEqual(addr) && oopsEnd()        .greaterThan(addr); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  public boolean scopesDataContains  (Address addr) { return scopesDataBegin()  .lessThanOrEqual(addr) && scopesDataEnd()  .greaterThan(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  public boolean scopesPCsContains   (Address addr) { return scopesPCsBegin()   .lessThanOrEqual(addr) && scopesPCsEnd()   .greaterThan(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
  public boolean handlerTableContains(Address addr) { return handlerTableBegin().lessThanOrEqual(addr) && handlerTableEnd().greaterThan(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  public boolean nulChkTableContains (Address addr) { return nulChkTableBegin() .lessThanOrEqual(addr) && nulChkTableEnd() .greaterThan(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  /** Entry points */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  public Address getEntryPoint()         { return entryPointField.getValue(addr);         }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
  public Address getVerifiedEntryPoint() { return verifiedEntryPointField.getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   196
  /** Support for oops in scopes and relocs. Note: index 0 is reserved for null. */
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   197
  public OopHandle getOopAt(int index) {
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   198
    if (index == 0) return null;
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   199
    if (Assert.ASSERTS_ENABLED) {
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   200
      Assert.that(index > 0 && index <= oopsSize(), "must be a valid non-zero index");
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   201
    }
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   202
    return oopsBegin().getOopHandleAt((index - 1) * VM.getVM().getOopSize());
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   203
  }
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   204
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  // FIXME: add interpreter_entry_point()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  // FIXME: add lazy_interpreter_entry_point() for C2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  // **********
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  // * FIXME: * ADD ACCESS TO FLAGS!!!!
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  // **********
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  // public boolean isInUse();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  // public boolean isAlive();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  // public boolean isNotEntrant();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
  // public boolean isZombie();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
  // ********************************
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
  // * MAJOR FIXME: MAJOR HACK HERE *
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  // ********************************
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
  public boolean isZombie() { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
  // public boolean isUnloaded();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
  // public boolean isYoung();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
  // public boolean isOld();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
  // public int     age();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  // public boolean isMarkedForDeoptimization();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
  // public boolean isMarkedForUnloading();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  // public boolean isMarkedForReclamation();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  // public int     level();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
  // public int     version();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
  // FIXME: add mutators for above
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
  // FIXME: add exception cache access?
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
  /** On-stack replacement support */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
  // FIXME: add mutators
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  public int getOSREntryBCI() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
    if (Assert.ASSERTS_ENABLED) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
      Assert.that(getEntryBCI() != VM.getVM().getInvocationEntryBCI(), "wrong kind of nmethod");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
    return getEntryBCI();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
3908
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   243
  public NMethod getOSRLink() {
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   244
    return (NMethod) VMObjectFactory.newObject(NMethod.class, osrLinkField.getValue(addr));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
3908
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   247
  public NMethod getScavengeRootLink() {
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   248
    return (NMethod) VMObjectFactory.newObject(NMethod.class, scavengeRootLinkField.getValue(addr));
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   249
  }
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   250
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   251
  public int getScavengeRootState() {
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   252
    return (int) scavengeRootStateField.getValue(addr);
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   253
  }
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   254
24b55ad4c228 6863023: need non-perm oops in code cache for JSR 292
jrose
parents: 3686
diff changeset
   255
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
  /** Tells whether frames described by this nmethod can be
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
      deoptimized. Note: native wrappers cannot be deoptimized. */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  public boolean canBeDeoptimized() { return isJavaMethod(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
  // FIXME: add inline cache support
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
  // FIXME: add flush()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
  public boolean isLockedByVM() { return lockCountField.getValue(addr) > 0; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
  // FIXME: add mark_as_seen_on_stack
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
  // FIXME: add can_not_entrant_be_converted
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
  // FIXME: add GC support
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
  //  void follow_roots_or_mark_for_unloading(bool unloading_occurred, bool& marked_for_unloading);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
  //  void follow_root_or_mark_for_unloading(oop* root, bool unloading_occurred, bool& marked_for_unloading);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
  //  void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, void f(oop*));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
  //  void adjust_pointers();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
  /** Finds a PCDesc with real-pc equal to "pc" */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
  public PCDesc getPCDescAt(Address pc) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
    // FIXME: consider adding cache like the one down in the VM
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
    for (Address p = scopesPCsBegin(); p.lessThan(scopesPCsEnd()); p = p.addOffsetTo(pcDescSize)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
      PCDesc pcDesc = new PCDesc(p);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
      if (pcDesc.getRealPC(this).equals(pc)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
        return pcDesc;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
    return null;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
  /** ScopeDesc for an instruction */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
  public ScopeDesc getScopeDescAt(Address pc) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
    PCDesc pd = getPCDescAt(pc);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
    if (Assert.ASSERTS_ENABLED) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
      Assert.that(pd != null, "scope must be present");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
    }
4095
6e0acfda1d47 6892186: SA does not dump debug info for scalar replaced objects
kvn
parents: 3908
diff changeset
   292
    return new ScopeDesc(this, pd.getScopeDecodeOffset(), pd.getObjDecodeOffset(), pd.getReexecute());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
  /** This is only for use by the debugging system, and is only
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
      intended for use in the topmost frame, where we are not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
      guaranteed to be at a PC for which we have a PCDesc. It finds
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
      the PCDesc with realPC closest to the current PC. */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
  public PCDesc getPCDescNearDbg(Address pc) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
    PCDesc bestGuessPCDesc = null;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
    long bestDistance = 0;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
    for (Address p = scopesPCsBegin(); p.lessThan(scopesPCsEnd()); p = p.addOffsetTo(pcDescSize)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
      PCDesc pcDesc = new PCDesc(p);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
      // In case pc is null
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
      long distance = -pcDesc.getRealPC(this).minus(pc);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
      if ((bestGuessPCDesc == null) ||
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
          ((distance >= 0) && (distance < bestDistance))) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
        bestGuessPCDesc = pcDesc;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
        bestDistance    = distance;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
      }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
    return bestGuessPCDesc;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
  /** This is only for use by the debugging system, and is only
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
      intended for use in the topmost frame, where we are not
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
      guaranteed to be at a PC for which we have a PCDesc. It finds
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
      the ScopeDesc closest to the current PC. NOTE that this may
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
      return NULL for compiled methods which don't have any
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
      ScopeDescs! */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
  public ScopeDesc getScopeDescNearDbg(Address pc) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
    PCDesc pd = getPCDescNearDbg(pc);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
    if (pd == null) return null;
4095
6e0acfda1d47 6892186: SA does not dump debug info for scalar replaced objects
kvn
parents: 3908
diff changeset
   324
    return new ScopeDesc(this, pd.getScopeDecodeOffset(), pd.getObjDecodeOffset(), pd.getReexecute());
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
4095
6e0acfda1d47 6892186: SA does not dump debug info for scalar replaced objects
kvn
parents: 3908
diff changeset
   327
  public Map/*<Address, PCDesc>*/ getSafepoints() {
6e0acfda1d47 6892186: SA does not dump debug info for scalar replaced objects
kvn
parents: 3908
diff changeset
   328
    Map safepoints = new HashMap(); // Map<Address, PCDesc>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
    sun.jvm.hotspot.debugger.Address p = null;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
    for (p = scopesPCsBegin(); p.lessThan(scopesPCsEnd());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
         p = p.addOffsetTo(pcDescSize)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
       PCDesc pcDesc = new PCDesc(p);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
       sun.jvm.hotspot.debugger.Address pc = pcDesc.getRealPC(this);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
       safepoints.put(pc, pcDesc);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
    return safepoints;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
  // FIXME: add getPCOffsetForBCI()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
  // FIXME: add embeddedOopAt()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
  // FIXME: add isDependentOn()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
  // FIXME: add isPatchableAt()
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
  /** Support for code generation. Only here for proof-of-concept. */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
  public static int getEntryPointOffset()            { return (int) entryPointField.getOffset();            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
  public static int getVerifiedEntryPointOffset()    { return (int) verifiedEntryPointField.getOffset();    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
  public static int getOSREntryPointOffset()         { return (int) osrEntryPointField.getOffset();         }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
  public static int getEntryBCIOffset()              { return (int) entryBCIField.getOffset();              }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
  /** NOTE: renamed from "method_offset_in_bytes" */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
  public static int getMethodOffset()                { return (int) methodField.getOffset();                }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
  public void print() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
    printOn(System.out);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   356
  protected void printComponentsOn(PrintStream tty) {
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   357
    // FIXME: add relocation information
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   358
    tty.println(" instructions: [" + instructionsBegin() + ", " + instructionsEnd() + "), " +
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   359
                " data: [" + dataBegin() + ", " + dataEnd() + "), " +
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   360
                " oops: [" + oopsBegin() + ", " + oopsEnd() + "), " +
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   361
                " frame size: " + getFrameSize());
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   362
  }
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   363
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
  public String toString() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
    Method method = getMethod();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
    return "NMethod for " +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
            method.getMethodHolder().getName().asString() + "." +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
            method.getName().asString() + method.getSignature().asString() + "==>n" +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
            super.toString();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
  public String flagsToString() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
    // FIXME need access to flags...
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
    return "";
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
  public String getName() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
    Method method = getMethod();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
    return "NMethod for " +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
           method.getMethodHolder().getName().asString() + "." +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
           method.getName().asString() +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
           method.getSignature().asString();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
  //--------------------------------------------------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
  // Internals only below this point
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
  //
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
  private int getEntryBCI()           { return (int) entryBCIField          .getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
  private int getExceptionOffset()    { return (int) exceptionOffsetField   .getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
  private int getDeoptOffset()        { return (int) deoptOffsetField       .getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
  private int getStubOffset()         { return (int) stubOffsetField        .getValue(addr); }
5686
5435e77aa3df 6951083: oops and relocations should part of nmethod not CodeBlob
twisti
parents: 4095
diff changeset
   393
  private int getOopsOffset()         { return (int) oopsOffsetField        .getValue(addr); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
  private int getScopesDataOffset()   { return (int) scopesDataOffsetField  .getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
  private int getScopesPCsOffset()    { return (int) scopesPCsOffsetField   .getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
  private int getDependenciesOffset() { return (int) dependenciesOffsetField.getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
  private int getHandlerTableOffset() { return (int) handlerTableOffsetField.getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
  private int getNulChkTableOffset()  { return (int) nulChkTableOffsetField .getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
  private int getNMethodEndOffset()   { return (int) nmethodEndOffsetField  .getValue(addr); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
}