--- a/hotspot/src/os/linux/vm/perfMemory_linux.cpp Thu Oct 18 13:09:47 2012 -0400
+++ b/hotspot/src/os/linux/vm/perfMemory_linux.cpp Fri Oct 19 21:40:07 2012 -0400
@@ -30,6 +30,7 @@
#include "os_linux.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/perfMemory.hpp"
+#include "services/memTracker.hpp"
#include "utilities/exceptions.hpp"
// put OS-includes here
@@ -753,6 +754,10 @@
// clear the shared memory region
(void)::memset((void*) mapAddress, 0, size);
+ // it does not go through os api, the operation has to record from here
+ MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC);
+ MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal);
+
return mapAddress;
}
@@ -912,6 +917,10 @@
"Could not map PerfMemory");
}
+ // it does not go through os api, the operation has to record from here
+ MemTracker::record_virtual_memory_reserve((address)mapAddress, size, CURRENT_PC);
+ MemTracker::record_virtual_memory_type((address)mapAddress, mtInternal);
+
*addr = mapAddress;
*sizep = size;