hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
author rbackman
Tue, 05 May 2015 16:50:25 +0200
changeset 30590 14f7f48c1377
parent 13873 7b72e3873785
permissions -rw-r--r--
8064458: OopMap class could be more compact Reviewed-by: kvn, bdelsart
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
13873
7b72e3873785 6879063: SA should use hsdis for disassembly
minqi
parents: 13391
diff changeset
     2
 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. 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
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 * questions.
1
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
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
import sun.jvm.hotspot.compiler.*;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
import sun.jvm.hotspot.debugger.*;
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 CodeBlob extends VMObject {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
  private static AddressField  nameField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  private static CIntegerField sizeField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  private static CIntegerField headerSizeField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  private static CIntegerField relocationSizeField;
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
    41
  private static CIntegerField contentOffsetField;
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
    42
  private static CIntegerField codeOffsetField;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  private static CIntegerField frameCompleteOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  private static CIntegerField dataOffsetField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  private static CIntegerField frameSizeField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  private static AddressField  oopMapsField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  // Only used by server compiler on x86; computed over in SA rather
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  // than relying on computation in target VM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  private static final int     NOT_YET_COMPUTED = -2;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  private static final int     UNDEFINED        = -1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  private              int     linkOffset       = NOT_YET_COMPUTED;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  private static       int     matcherInterpreterFramePointerReg;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  static {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
    VM.registerVMInitializedObserver(new Observer() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
        public void update(Observable o, Object data) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
          initialize(VM.getVM().getTypeDataBase());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
      });
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  private static void initialize(TypeDataBase db) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    Type type = db.lookupType("CodeBlob");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
    nameField                = type.getAddressField("_name");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
    sizeField                = type.getCIntegerField("_size");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
    headerSizeField          = type.getCIntegerField("_header_size");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
    relocationSizeField      = type.getCIntegerField("_relocation_size");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
    frameCompleteOffsetField = type.getCIntegerField("_frame_complete_offset");
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
    71
    contentOffsetField       = type.getCIntegerField("_content_offset");
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
    72
    codeOffsetField          = type.getCIntegerField("_code_offset");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
    dataOffsetField          = type.getCIntegerField("_data_offset");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
    frameSizeField           = type.getCIntegerField("_frame_size");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
    oopMapsField             = type.getAddressField("_oop_maps");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
    if (VM.getVM().isServerCompiler()) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
      matcherInterpreterFramePointerReg =
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
        db.lookupIntConstant("Matcher::interpreter_frame_pointer_reg").intValue();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
  public CodeBlob(Address addr) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
    super(addr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  // Typing
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  public boolean isBufferBlob()         { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  public boolean isNMethod()            { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
  public boolean isRuntimeStub()        { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
  public boolean isDeoptimizationStub() { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
  public boolean isUncommonTrapStub()   { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
  public boolean isExceptionStub()      { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
  public boolean isSafepointStub()      { return false; }
9946
b3d5b50e2289 7045513: JSR 292 inlining causes crashes in methodHandleWalk.cpp
never
parents: 6418
diff changeset
    95
  public boolean isAdapterBlob()        { return false; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  // Fine grain nmethod support: isNmethod() == isJavaMethod() || isNativeMethod() || isOSRMethod()
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  public boolean isJavaMethod()         { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  public boolean isNativeMethod()       { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  /** On-Stack Replacement method */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  public boolean isOSRMethod()          { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
10517
f92c9ff3a15f 7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
never
parents: 9946
diff changeset
   103
  public NMethod asNMethodOrNull() {
f92c9ff3a15f 7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
never
parents: 9946
diff changeset
   104
    if (isNMethod()) return (NMethod)this;
f92c9ff3a15f 7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
never
parents: 9946
diff changeset
   105
    return null;
f92c9ff3a15f 7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
never
parents: 9946
diff changeset
   106
  }
f92c9ff3a15f 7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
never
parents: 9946
diff changeset
   107
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  // Boundaries
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  public Address headerBegin() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
    return addr;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  public Address headerEnd() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
    return addr.addOffsetTo(headerSizeField.getValue(addr));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  // FIXME: add RelocInfo
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  //  public RelocInfo relocationBegin();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
  //  public RelocInfo relocationEnd();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   121
  public Address contentBegin() {
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   122
    return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   125
  public Address contentEnd() {
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   126
    return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   127
  }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   128
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   129
  public Address codeBegin() {
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   130
    return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   131
  }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   132
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   133
  public Address codeEnd() {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
    return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  public Address dataBegin() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
    return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  public Address dataEnd() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
    return headerBegin().addOffsetTo(sizeField.getValue(addr));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  // Offsets
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   146
  public int getRelocationOffset() { return (int) headerSizeField   .getValue(addr); }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   147
  public int getContentOffset()    { return (int) contentOffsetField.getValue(addr); }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   148
  public int getCodeOffset()       { return (int) codeOffsetField   .getValue(addr); }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   149
  public int getDataOffset()       { return (int) dataOffsetField   .getValue(addr); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  // Sizes
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   152
  public int getSize()             { return (int) sizeField      .getValue(addr);     }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   153
  public int getHeaderSize()       { return (int) headerSizeField.getValue(addr);     }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
  // FIXME: add getRelocationSize()
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   155
  public int getContentSize()      { return (int) contentEnd().minus(contentBegin()); }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   156
  public int getCodeSize()         { return (int) codeEnd()   .minus(codeBegin());    }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   157
  public int getDataSize()         { return (int) dataEnd()   .minus(dataBegin());    }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
  // Containment
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   160
  public boolean blobContains(Address addr)    { return headerBegin() .lessThanOrEqual(addr) && dataEnd()   .greaterThan(addr); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
  // FIXME: add relocationContains
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   162
  public boolean contentContains(Address addr) { return contentBegin().lessThanOrEqual(addr) && contentEnd().greaterThan(addr); }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   163
  public boolean codeContains(Address addr)    { return codeBegin()   .lessThanOrEqual(addr) && codeEnd()   .greaterThan(addr); }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   164
  public boolean dataContains(Address addr)    { return dataBegin()   .lessThanOrEqual(addr) && dataEnd()   .greaterThan(addr); }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   165
  public boolean contains(Address addr)        { return contentContains(addr);                                                  }
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   166
  public boolean isFrameCompleteAt(Address a)  { return codeContains(a) && a.minus(codeBegin()) >= frameCompleteOffsetField.getValue(addr); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  // Reclamation support (really only used by the nmethods, but in order to get asserts to work
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  // in the CodeCache they are defined virtual here)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  public boolean isZombie()             { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
  public boolean isLockedByVM()         { return false; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  /** OopMap for frame; can return null if none available */
30590
14f7f48c1377 8064458: OopMap class could be more compact
rbackman
parents: 13873
diff changeset
   174
  public ImmutableOopMapSet getOopMaps() {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
    Address oopMapsAddr = oopMapsField.getValue(addr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
    if (oopMapsAddr == null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
      return null;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
    }
30590
14f7f48c1377 8064458: OopMap class could be more compact
rbackman
parents: 13873
diff changeset
   179
    return new ImmutableOopMapSet(oopMapsAddr);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  // FIXME: not yet implementable
30590
14f7f48c1377 8064458: OopMap class could be more compact
rbackman
parents: 13873
diff changeset
   182
  //  void set_oop_maps(ImmutableOopMapSet* p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
30590
14f7f48c1377 8064458: OopMap class could be more compact
rbackman
parents: 13873
diff changeset
   184
  public ImmutableOopMap getOopMapForReturnAddress(Address returnAddress, boolean debugging) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
    Address pc = returnAddress;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
    if (Assert.ASSERTS_ENABLED) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
      Assert.that(getOopMaps() != null, "nope");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
    }
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   189
    return getOopMaps().findMapAtOffset(pc.minus(codeBegin()), debugging);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  //  virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, void f(oop*)) { ShouldNotReachHere(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  //  FIXME;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  /** NOTE: this returns a size in BYTES in this system! */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
  public long getFrameSize() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
    return VM.getVM().getAddressSize() * frameSizeField.getValue(addr);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  // Returns true, if the next frame is responsible for GC'ing oops passed as arguments
10517
f92c9ff3a15f 7051798: SA-JDI: NPE in Frame.addressOfStackSlot(Frame.java:244)
never
parents: 9946
diff changeset
   201
  public boolean callerMustGCArguments() { return false; }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
  public String getName() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
    return CStringUtilities.getString(nameField.getValue(addr));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  // FIXME: NOT FINISHED
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  // FIXME: add more accessors
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
  public void print() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
    printOn(System.out);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  public void printOn(PrintStream tty) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
    tty.print(getName());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
    printComponentsOn(tty);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
  protected void printComponentsOn(PrintStream tty) {
6418
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   221
    tty.println(" content: [" + contentBegin() + ", " + contentEnd() + "), " +
6671edbd230e 6978355: renaming for 6961697
twisti
parents: 5702
diff changeset
   222
                " code: [" + codeBegin() + ", " + codeEnd() + "), " +
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
                " data: [" + dataBegin() + ", " + dataEnd() + "), " +
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
                " frame size: " + getFrameSize());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
}