hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java

Print this page
rev 611 : Merge

*** 1,7 **** /* ! * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 49,59 **** } private static void initialize(TypeDataBase db) { Type type = db.lookupType("oopDesc"); ! klassField = type.getOopField("_klass"); } public static boolean oopLooksValid(OopHandle oop) { if (oop == null) { return false; --- 49,63 ---- } private static void initialize(TypeDataBase db) { Type type = db.lookupType("oopDesc"); ! if (VM.getVM().isCompressedOopsEnabled()) { ! klassField = type.getNarrowOopField("_metadata._compressed_klass"); ! } else { ! klassField = type.getOopField("_metadata._klass"); ! } } public static boolean oopLooksValid(OopHandle oop) { if (oop == null) { return false;