Code review request: 7188594 Print statistic collected by NMT with VM flag
Zhengyu Gu
zhengyu.gu at oracle.com
Wed Aug 29 13:55:51 PDT 2012
It is the same output as query through jcmd ...
Here is an example:
Native Memory Tracking:
Total: reserved=707626KB, committed=286258KB
- Java Heap (reserved=579592KB, committed=210500KB)
(mmap: reserved=579592KB, committed=210500KB)
- Class (reserved=464KB, committed=464KB)
(classes #942)
(malloc=464KB, #1418)
- Thread (reserved=8430KB, committed=1926KB)
(thread #15)
(stack: reserved=6588KB, committed=84KB)
(malloc=25KB, #62)
(arena=1817KB, #28)
- Code (reserved=55789KB, committed=11461KB)
(malloc=5869KB, #163641)
(mmap: reserved=49920KB, committed=5592KB)
- GC (reserved=29662KB, committed=28218KB)
(malloc=558KB, #138)
(mmap: reserved=29104KB, committed=27660KB)
- Compiler (reserved=109KB, committed=109KB)
(malloc=11KB, #156)
(arena=98KB, #2)
- Internal (reserved=414KB, committed=414KB)
(malloc=414KB, #1132)
- Symbol (reserved=1247KB, committed=1247KB)
(malloc=759KB, #6131)
(arena=488KB, #1)
- Memory Tracking (reserved=5614KB, committed=5614KB)
(malloc=5614KB, #464)
- Pooled Free Chunks (reserved=26305KB, committed=26305KB)
(malloc=26305KB)
Details:
[0x00e314c2] ChunkPool::allocate(unsigned int)+0xe2
(malloc=24313KB #800)
[0x00e2fc9b] Arena::grow(unsigned int)+0x2b
(malloc=4035KB #52)
[0x01563c94] os::strdup(char const*, unsigned short)+0x34
(malloc=3489KB #81300)
[0x014c362e] MemRecorder::MemRecorder()+0x22e
(malloc=2750KB #229)
[0x014cbcc4] MemPointerArrayImpl<MemPointerRecordEx>::is_full()+0x54
(malloc=2640KB #1)
[0x01040c71] CodeBuffer::block_comment(int, char const*)+0x21
(malloc=1270KB #81272)
[0x0103ce52] CodeBlob::set_oop_maps(OopMapSet*)+0xa2
(malloc=1084KB #821)
[0x00e2ffce] Arena::Arena(unsigned int)+0x1e
(malloc=360KB #1)
[0x015e20b2] ParCompactionManager::ParCompactionManager()+0x282
(malloc=320KB #5)
[0x015e235a] ParCompactionManager::initialize(ParMarkBitMap*)+0x1ea
(malloc=320KB #5)
[0x015fe4fa] PSPromotionManager::PSPromotionManager()+0x1fa
(malloc=320KB #5)
[0x01233042] BasicHashtable<(unsigned short)2304>::new_entry(unsigned
int)+0x112
(malloc=300KB #39)
[0x016be512] Symbol::operator new(unsigned int, int, Thread*)+0x72
(malloc=294KB #6085)
[0x014cc0b4] MemPointerArrayImpl<SeqMemPointerRecordEx>::is_full()+0x54
(malloc=216KB #1)
[0x015e2112] ParCompactionManager::ParCompactionManager()+0x2e2
(malloc=160KB #5)
[0x01738f42] universe_init()+0x432
(malloc=156KB #1)
[0x0155de94] OopMapCache::OopMapCache()+0xd4
(malloc=56KB #45)
[0x014b31b2] Stack<DataLayout*, (unsigned short)1280>::alloc(unsigned
int)+0x42
(malloc=56KB #14)
[0x012331d2] BasicHashtable<(unsigned short)256>::new_entry(unsigned
int)+0x112
(malloc=42KB #8)
[0x0159bd2d] ParkEvent::Allocate(Thread*)+0x21d
(malloc=29KB #68)
[0x01278d8b] instanceKlass::add_dependent_nmethod(nmethod*)+0x5b
(malloc=18KB #1153)
[0x0170103a] Thread::allocate(unsigned int, bool, unsigned short)+0x15a
(malloc=18KB #11)
[0x014b3122] Stack<Klass*, (unsigned short)1280>::alloc(unsigned int)+0x42
(malloc=16KB #4)
[0x01080407] CompileBroker::allocate_task()+0xb7
(malloc=16KB #141)
[0x0152c9f0] nmethod::add_handler_for_exception_and_pc(Handle, unsigned
char+0x70
(malloc=16KB #113)
[0x0133cb59] JNIHandleBlock::allocate_block(Thread*)+0x149
(malloc=10KB #62)
[0x010803eb] CompileBroker::allocate_task()+0x9b
(malloc=9KB #142)
[0x01163aa8] Dictionary::Dictionary(int)+0xe8
(malloc=8KB #1)
[0x015d63b0] PlaceholderTable::PlaceholderTable(int)+0xd0
(malloc=8KB #1)
[0x01738f7d] universe_init()+0x46d
(malloc=8KB #1)
[0x015c4352] PerfData::PerfData(CounterNS, char const*, PerfData::Units,
Per+0x1e2
(malloc=7KB #251)
[0x01278fba] instanceKlass::mask_for(methodHandle, int,
InterpreterOopMap*)+0x7a
(malloc=5KB #45)
[0x01232ef2] BasicHashtable<(unsigned short)1024>::new_entry(unsigned
int)+0x112
(malloc=4KB #1)
[0x0122f5c2] GenericGrowableArray::raw_allocate(int)+0x1a2
(malloc=4KB #11)
[0x015c6324]
_ZN15PerfDataManager20create_long_variableE9CounterNSPKcN8PerfD+0x24
(malloc=4KB #91)
[0x014d026b] MemTracker::get_new_or_pooled_instance()+0x10b
(malloc=4KB #227)
[0x015c6224]
_ZN15PerfDataManager19create_long_counterE9CounterNSPKcN8PerfDa+0x24
(malloc=3KB #85)
[0x01701052] Thread::allocate(unsigned int, bool, unsigned short)+0x172
(malloc=3KB #1)
[0x0170223a] T.6627+0xda
(malloc=3KB #2)
[0x01572851] os::create_thread(Thread*, os::ThreadType, unsigned int)+0x61
(malloc=2KB #13)
[0x0164f34a] AdapterHandlerLibrary::initialize()+0x1ba
(malloc=2KB #1)
[0x014c774f] MemSnapshot::MemSnapshot()+0x35f
(malloc=2KB #1)
[0x0126ec33] T.7544+0x83
(malloc=2KB #12)
[0x017071ae] JavaThread::initialize()+0x1ae
(malloc=2KB #7)
[0x01567f2f] OSThread::pd_initialize()+0x6f
(malloc=2KB #14)
[0x01707aad] Thread::Thread()+0x21d
(malloc=2KB #14)
[0x0164f8fd] AdapterHandlerLibrary::get_adapter(methodHandle)+0x54d
(malloc=2KB #81)
[0x01691b4b] StubCodeMark::StubCodeMark(StubCodeGenerator*, char const*,
cha+0x3b
(malloc=1KB #45)
[0x015c617c]
_ZN15PerfDataManager22create_string_constantE9CounterNSPKcS2_P6+0x1c
(malloc=1KB #31)
[0x01163d50] SymbolPropertyTable::SymbolPropertyTable(int)+0xd0
(malloc=1KB #1)
[0x0176fed7] ReservedSpace::reserve_and_align(unsigned int, unsigned
int, un+0x37
(mmap: reserved=579592KB, committed=210500KB)
[0x0176fd35] ReservedSpace::initialize(unsigned int, unsigned int, bool,
cha+0x555
(mmap: reserved=79024KB, committed=33252KB)
[0x01701b9d] Thread::record_stack_base_and_size()+0xcd
(mmap: reserved=6588KB, committed=84KB)
-Zhengyu
On 8/29/2012 4:13 PM, Vladimir Kozlov wrote:
> Hi, Zhengyu
>
> Could you give an example of output? I thought you need more changes
> for this.
>
> thanks,
> Vladimir
>
> Zhengyu Gu wrote:
>> This is a simple RFE, that allows VM to dump collected native memory
>>
>> tracking data before exits.
>>
>> CR: http://bugs.sun.com/view_bug.do?bug_id=7188594
>> Webrev: http://cr.openjdk.java.net/~zgu/7188594/webrev.00/
>>
>> Thanks,
>>
>> -Zhengyu
>>
More information about the hotspot-dev
mailing list