Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/g1BlockOffsetTable.cpp @ 6197:d2a62e0f25eb
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking
Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd
Reviewed-by: acorn, coleenp, fparain
author | zgu |
---|---|
date | Thu, 28 Jun 2012 17:03:16 -0400 |
parents | 2250ee17e258 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" | 26 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp" |
27 #include "memory/space.hpp" | 27 #include "memory/space.hpp" |
28 #include "oops/oop.inline.hpp" | 28 #include "oops/oop.inline.hpp" |
29 #include "runtime/java.hpp" | 29 #include "runtime/java.hpp" |
30 #include "services/memTracker.hpp" | |
30 | 31 |
31 ////////////////////////////////////////////////////////////////////// | 32 ////////////////////////////////////////////////////////////////////// |
32 // G1BlockOffsetSharedArray | 33 // G1BlockOffsetSharedArray |
33 ////////////////////////////////////////////////////////////////////// | 34 ////////////////////////////////////////////////////////////////////// |
34 | 35 |
42 vm_exit_during_initialization("Could not reserve enough space for heap offset array"); | 43 vm_exit_during_initialization("Could not reserve enough space for heap offset array"); |
43 } | 44 } |
44 if (!_vs.initialize(rs, 0)) { | 45 if (!_vs.initialize(rs, 0)) { |
45 vm_exit_during_initialization("Could not reserve enough space for heap offset array"); | 46 vm_exit_during_initialization("Could not reserve enough space for heap offset array"); |
46 } | 47 } |
48 | |
49 MemTracker::record_virtual_memory_type((address)rs.base(), mtGC); | |
50 | |
47 _offset_array = (u_char*)_vs.low_boundary(); | 51 _offset_array = (u_char*)_vs.low_boundary(); |
48 resize(init_word_size); | 52 resize(init_word_size); |
49 if (TraceBlockOffsetTable) { | 53 if (TraceBlockOffsetTable) { |
50 gclog_or_tty->print_cr("G1BlockOffsetSharedArray::G1BlockOffsetSharedArray: "); | 54 gclog_or_tty->print_cr("G1BlockOffsetSharedArray::G1BlockOffsetSharedArray: "); |
51 gclog_or_tty->print_cr(" " | 55 gclog_or_tty->print_cr(" " |