< prev index next >

src/hotspot/os/solaris/os_solaris.cpp

Print this page
rev 47414 : Move polling page allocation to SafepointMechanism initialization
rev 47415 : Add Thread Local handshakes and thread local polling

@@ -2189,14 +2189,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 // 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;
 }
 

@@ -2559,11 +2555,11 @@
   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())) {
+  } 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,32 +4217,10 @@
 // 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;
   }
 
< prev index next >