< prev index next >

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

Print this page
rev 8333 : 8077842: Remove the level parameter passed around in GenCollectedHeap
Reviewed-by:

*** 1,7 **** /* ! * Copyright (c) 2000, 2012, Oracle and/or its affiliates. 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 (c) 2000, 2015, Oracle and/or its affiliates. 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.
*** 82,96 **** public boolean isInHeap() { return (heap != null || (gen != null)); } public boolean isInNewGen() { ! return ((gen != null) && (gen.level() == 0)); } public boolean isInOldGen() { ! return ((gen != null) && (gen.level() == 1)); } public boolean inOtherGen() { return (!isInNewGen() && !isInOldGen()); } --- 82,96 ---- public boolean isInHeap() { return (heap != null || (gen != null)); } public boolean isInNewGen() { ! return ((gen != null) && (gen == ((GenCollectedHeap)heap).getGen(0))); } public boolean isInOldGen() { ! return ((gen != null) && (gen == ((GenCollectedHeap)heap).getGen(1))); } public boolean inOtherGen() { return (!isInNewGen() && !isInOldGen()); }
*** 205,216 **** } else { if (isInNewGen()) { tty.print("In new generation "); } else if (isInOldGen()) { tty.print("In old generation "); - } else if (gen != null) { - tty.print("In Generation " + getGeneration().level()); } else { tty.print("In unknown section of Java heap"); } if (getGeneration() != null) { getGeneration().printOn(tty); --- 205,214 ----
< prev index next >