Print this page


Split Close
Expand all
Collapse all
          --- old/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java
          +++ new/agent/src/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java
   1    1  /*
   2      - * Copyright 2000-2004 Sun Microsystems, Inc.  All Rights Reserved.
        2 + * Copyright 2000-2010 Sun Microsystems, Inc.  All Rights Reserved.
   3    3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4   *
   5    5   * This code is free software; you can redistribute it and/or modify it
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.
   8    8   *
   9    9   * This code is distributed in the hope that it will be useful, but WITHOUT
  10   10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 78 lines elided ↑ open up ↑
  91   91      if (!VM.getVM().isCore()) {
  92   92        CodeCache c = VM.getVM().getCodeCache();
  93   93        if (c.contains(a)) {
  94   94          loc.inCodeCache = true;
  95   95          loc.blob = c.findBlobUnsafe(a);
  96   96          if (Assert.ASSERTS_ENABLED) {
  97   97            Assert.that(loc.blob != null, "Should have found CodeBlob");
  98   98          }
  99   99          loc.inBlobInstructions = loc.blob.instructionsContains(a);
 100  100          loc.inBlobData         = loc.blob.dataContains(a);
 101      -        loc.inBlobOops         = loc.blob.oopsContains(a);
      101 +
      102 +        if (loc.blob.isNMethod()) {
      103 +            NMethod nm = (NMethod) loc.blob;
      104 +            loc.inBlobOops = nm.oopsContains(a);
      105 +        }
      106 +
 102  107          loc.inBlobUnknownLocation = (!(loc.inBlobInstructions ||
 103  108                                         loc.inBlobData ||
 104  109                                         loc.inBlobOops));
 105  110          return loc;
 106  111        }
 107  112      }
 108  113  
 109  114      // Check JNIHandles; both local and global
 110  115      JNIHandles handles = VM.getVM().getJNIHandles();
 111  116      JNIHandleBlock handleBlock = handles.globalHandles();
↓ open down ↓ 38 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX