< prev index next >
src/hotspot/os/solaris/os_solaris.cpp
Print this page
rev 47590 : Move polling page allocation to SafepointMechanism initialization
rev 47591 : Add Thread Local handshakes and thread local polling
*** 2189,2202 ****
////////////////////////////////////////////////////////////////////////////////
// Virtual Memory
static int page_size = -1;
- // The mmap MAP_ALIGN flag is supported on Solaris 9 and later. init_2() will
- // clear this var if support is not available.
- static bool has_map_align = true;
-
int os::vm_page_size() {
assert(page_size != -1, "must call os::init");
return page_size;
}
--- 2189,2198 ----
*** 2559,2569 ****
assert(!(fixed && (alignment_hint > 0)),
"alignment hint meaningless with fixed mmap");
if (fixed) {
flags |= MAP_FIXED;
! } else if (has_map_align && (alignment_hint > (size_t) vm_page_size())) {
flags |= MAP_ALIGN;
addr = (char*) alignment_hint;
}
// Map uncommitted pages PROT_NONE so we fail early if we touch an
--- 2555,2565 ----
assert(!(fixed && (alignment_hint > 0)),
"alignment hint meaningless with fixed mmap");
if (fixed) {
flags |= MAP_FIXED;
! } else if (alignment_hint > (size_t) vm_page_size()) {
flags |= MAP_ALIGN;
addr = (char*) alignment_hint;
}
// Map uncommitted pages PROT_NONE so we fail early if we touch an
*** 4221,4252 ****
// this is called _after_ the global arguments have been parsed
jint os::init_2(void) {
// try to enable extended file IO ASAP, see 6431278
os::Solaris::try_enable_extended_io();
- // Allocate a single page and mark it as readable for safepoint polling. Also
- // use this first mmap call to check support for MAP_ALIGN.
- address polling_page = (address)Solaris::mmap_chunk((char*)page_size,
- page_size,
- MAP_PRIVATE | MAP_ALIGN,
- PROT_READ);
- if (polling_page == NULL) {
- has_map_align = false;
- polling_page = (address)Solaris::mmap_chunk(NULL, page_size, MAP_PRIVATE,
- PROT_READ);
- }
-
- os::set_polling_page(polling_page);
- log_info(os)("SafePoint Polling address: " INTPTR_FORMAT, p2i(polling_page));
-
- if (!UseMembar) {
- address mem_serialize_page = (address)Solaris::mmap_chunk(NULL, page_size, MAP_PRIVATE, PROT_READ | PROT_WRITE);
- guarantee(mem_serialize_page != NULL, "mmap Failed for memory serialize page");
- os::set_memory_serialize_page(mem_serialize_page);
- log_info(os)("Memory Serialize Page address: " INTPTR_FORMAT, p2i(mem_serialize_page));
- }
-
// Check and sets minimum stack sizes against command line options
if (Posix::set_minimum_stack_sizes() == JNI_ERR) {
return JNI_ERR;
}
--- 4217,4226 ----
< prev index next >