comparison src/os/solaris/vm/os_solaris.cpp @ 6882:716c64bda5ba

7199092: NMT: NMT needs to deal overlapped virtual memory ranges Summary: Enhanced virtual memory tracking to track committed regions as well as reserved regions, so NMT now can generate virtual memory map. Reviewed-by: acorn, coleenp
author zgu
date Fri, 19 Oct 2012 21:40:07 -0400
parents fb19af007ffc
children e522a00b91aa 6cb0d32b828b
comparison
equal deleted inserted replaced
6879:8ebcedb7604d 6882:716c64bda5ba
53 #include "runtime/statSampler.hpp" 53 #include "runtime/statSampler.hpp"
54 #include "runtime/stubRoutines.hpp" 54 #include "runtime/stubRoutines.hpp"
55 #include "runtime/threadCritical.hpp" 55 #include "runtime/threadCritical.hpp"
56 #include "runtime/timer.hpp" 56 #include "runtime/timer.hpp"
57 #include "services/attachListener.hpp" 57 #include "services/attachListener.hpp"
58 #include "services/memTracker.hpp"
58 #include "services/runtimeService.hpp" 59 #include "services/runtimeService.hpp"
59 #include "thread_solaris.inline.hpp" 60 #include "thread_solaris.inline.hpp"
60 #include "utilities/decoder.hpp" 61 #include "utilities/decoder.hpp"
61 #include "utilities/defaultStream.hpp" 62 #include "utilities/defaultStream.hpp"
62 #include "utilities/events.hpp" 63 #include "utilities/events.hpp"
3070 assert(bytes % os::vm_page_size() == 0, "reserving unexpected size block"); 3071 assert(bytes % os::vm_page_size() == 0, "reserving unexpected size block");
3071 3072
3072 // Since snv_84, Solaris attempts to honor the address hint - see 5003415. 3073 // Since snv_84, Solaris attempts to honor the address hint - see 5003415.
3073 // Give it a try, if the kernel honors the hint we can return immediately. 3074 // Give it a try, if the kernel honors the hint we can return immediately.
3074 char* addr = Solaris::anon_mmap(requested_addr, bytes, 0, false); 3075 char* addr = Solaris::anon_mmap(requested_addr, bytes, 0, false);
3076
3075 volatile int err = errno; 3077 volatile int err = errno;
3076 if (addr == requested_addr) { 3078 if (addr == requested_addr) {
3077 return addr; 3079 return addr;
3078 } else if (addr != NULL) { 3080 } else if (addr != NULL) {
3079 unmap_memory(addr, bytes); 3081 pd_unmap_memory(addr, bytes);
3080 } 3082 }
3081 3083
3082 if (PrintMiscellaneous && Verbose) { 3084 if (PrintMiscellaneous && Verbose) {
3083 char buf[256]; 3085 char buf[256];
3084 buf[0] = '\0'; 3086 buf[0] = '\0';