Mercurial > hg > truffle
comparison src/share/vm/services/heapDumper.cpp @ 4076:2ceafe3ceb65
7110428: Crash during HeapDump operation
Reviewed-by: ysr, dholmes
author | poonam |
---|---|
date | Wed, 16 Nov 2011 16:27:29 -0800 |
parents | 167b70ff3abc |
children | d2a62e0f25eb |
comparison
equal
deleted
inserted
replaced
4075:aa4c21b00f7f | 4076:2ceafe3ceb65 |
---|---|
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "classfile/symbolTable.hpp" | 26 #include "classfile/symbolTable.hpp" |
27 #include "classfile/systemDictionary.hpp" | 27 #include "classfile/systemDictionary.hpp" |
28 #include "classfile/vmSymbols.hpp" | 28 #include "classfile/vmSymbols.hpp" |
29 #include "gc_implementation/shared/vmGCOperations.hpp" | 29 #include "gc_implementation/shared/vmGCOperations.hpp" |
30 #include "memory/gcLocker.inline.hpp" | |
30 #include "memory/genCollectedHeap.hpp" | 31 #include "memory/genCollectedHeap.hpp" |
31 #include "memory/universe.hpp" | 32 #include "memory/universe.hpp" |
32 #include "oops/objArrayKlass.hpp" | 33 #include "oops/objArrayKlass.hpp" |
33 #include "runtime/javaCalls.hpp" | 34 #include "runtime/javaCalls.hpp" |
34 #include "runtime/jniHandles.hpp" | 35 #include "runtime/jniHandles.hpp" |
1707 | 1708 |
1708 void VM_HeapDumper::doit() { | 1709 void VM_HeapDumper::doit() { |
1709 | 1710 |
1710 HandleMark hm; | 1711 HandleMark hm; |
1711 CollectedHeap* ch = Universe::heap(); | 1712 CollectedHeap* ch = Universe::heap(); |
1713 | |
1714 ch->ensure_parsability(false); // must happen, even if collection does | |
1715 // not happen (e.g. due to GC_locker) | |
1716 | |
1712 if (_gc_before_heap_dump) { | 1717 if (_gc_before_heap_dump) { |
1713 ch->collect_as_vm_thread(GCCause::_heap_dump); | 1718 if (GC_locker::is_active()) { |
1714 } else { | 1719 warning("GC locker is held; pre-heapdump GC was skipped"); |
1715 // make the heap parsable (no need to retire TLABs) | 1720 } else { |
1716 ch->ensure_parsability(false); | 1721 ch->collect_as_vm_thread(GCCause::_heap_dump); |
1722 } | |
1717 } | 1723 } |
1718 | 1724 |
1719 // At this point we should be the only dumper active, so | 1725 // At this point we should be the only dumper active, so |
1720 // the following should be safe. | 1726 // the following should be safe. |
1721 set_global_dumper(); | 1727 set_global_dumper(); |