diff options
author | poonam <none@none> | 2010-05-15 18:24:34 -0700 |
---|---|---|
committer | poonam <none@none> | 2010-05-15 18:24:34 -0700 |
commit | 69f48af19f3a959a4c6f9d0a653ba0c534457a9b (patch) | |
tree | 56cbead194a32eb6de9c32b90ee243a7735f4040 /agent | |
parent | 5c77fa2e864871810a9784b20ca86222e7ad7a51 (diff) |
6745217: jmap assertion failure
Summary: SA shows exception with core files > 2GB. These changes fix that by correcting the size of CMSBitmap during its allocation.
Reviewed-by: swamyv
Diffstat (limited to 'agent')
-rw-r--r-- | agent/src/share/classes/sun/jvm/hotspot/memory/CMSBitMap.java | 5 | ||||
-rw-r--r-- | agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/agent/src/share/classes/sun/jvm/hotspot/memory/CMSBitMap.java b/agent/src/share/classes/sun/jvm/hotspot/memory/CMSBitMap.java index 695a42c71..aa19d1b9b 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/memory/CMSBitMap.java +++ b/agent/src/share/classes/sun/jvm/hotspot/memory/CMSBitMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2007-2010 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 @@ -78,9 +78,8 @@ public class CMSBitMap extends VMObject { } public BitMap bm() { - BitMap bitMap = new BitMap((int) (bmWordSize() >> (shifter() + 3) )); + BitMap bitMap = new BitMap((int) (bmWordSize() >> shifter() )); VirtualSpace vs = virtualSpace(); - //bitMap.set_size((int)vs.committedSize()); bitMap.set_map(vs.low()); return bitMap; } diff --git a/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java b/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java index 4a68a22b9..25e3f1579 100644 --- a/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2000-2010 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 @@ -326,7 +326,13 @@ public class JavaThread extends Thread { /** Gets the Java-side thread object for this JavaThread */ public Oop getThreadObj() { - return VM.getVM().getObjectHeap().newOop(threadObjField.getValue(addr)); + Oop obj = null; + try { + obj = VM.getVM().getObjectHeap().newOop(threadObjField.getValue(addr)); + } catch (Exception e) { + e.printStackTrace(); + } + return obj; } /** Get the Java-side name of this thread */ |