mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6995781: Native Memory Tracking (Phase 1)
7151532: DCmd for hotspot native memory tracking Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd Reviewed-by: acorn, coleenp, fparain
This commit is contained in:
parent
8e42425c92
commit
a39b17624a
315 changed files with 7245 additions and 1477 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "memory/cardTableModRefBS.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
#include "services/memTracker.hpp"
|
||||
|
||||
void ObjectStartArray::initialize(MemRegion reserved_region) {
|
||||
// We're based on the assumption that we use the same
|
||||
|
@ -50,6 +51,7 @@ void ObjectStartArray::initialize(MemRegion reserved_region) {
|
|||
if (!backing_store.is_reserved()) {
|
||||
vm_exit_during_initialization("Could not reserve space for ObjectStartArray");
|
||||
}
|
||||
MemTracker::record_virtual_memory_type((address)backing_store.base(), mtGC);
|
||||
|
||||
// We do not commit any memory initially
|
||||
if (!_virtual_space.initialize(backing_store, 0)) {
|
||||
|
@ -57,10 +59,14 @@ void ObjectStartArray::initialize(MemRegion reserved_region) {
|
|||
}
|
||||
|
||||
_raw_base = (jbyte*)_virtual_space.low_boundary();
|
||||
|
||||
if (_raw_base == NULL) {
|
||||
vm_exit_during_initialization("Could not get raw_base address");
|
||||
}
|
||||
|
||||
MemTracker::record_virtual_memory_type((address)_raw_base, mtGC);
|
||||
|
||||
|
||||
_offset_base = _raw_base - (size_t(reserved_region.start()) >> block_shift);
|
||||
|
||||
_covered_region.set_start(reserved_region.start());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue