< prev index next >

src/hotspot/os/bsd/os_bsd.cpp

Print this page
rev 51962 : [mq]: deprecation_warnings


3228   if (Bsd::page_size() == -1) {
3229     fatal("os_bsd.cpp: os::init: sysconf failed (%s)", os::strerror(errno));
3230   }
3231   init_page_sizes((size_t) Bsd::page_size());
3232 
3233   Bsd::initialize_system_info();
3234 
3235   // _main_thread points to the thread that created/loaded the JVM.
3236   Bsd::_main_thread = pthread_self();
3237 
3238   Bsd::clock_init();
3239   initial_time_count = javaTimeNanos();
3240 
3241 #ifdef __APPLE__
3242   // XXXDARWIN
3243   // Work around the unaligned VM callbacks in hotspot's
3244   // sharedRuntime. The callbacks don't use SSE2 instructions, and work on
3245   // Linux, Solaris, and FreeBSD. On Mac OS X, dyld (rightly so) enforces
3246   // alignment when doing symbol lookup. To work around this, we force early
3247   // binding of all symbols now, thus binding when alignment is known-good.
3248   _dyld_bind_fully_image_containing_address((const void *) &os::init);






3249 #endif
3250 
3251   os::Posix::init();
3252 }
3253 
3254 // To install functions for atexit system call
3255 extern "C" {
3256   static void perfMemory_exit_helper() {
3257     perfMemory_exit();
3258   }
3259 }
3260 
3261 // this is called _after_ the global arguments have been parsed
3262 jint os::init_2(void) {
3263 
3264   os::Posix::init_2();
3265 
3266   // initialize suspend/resume support - must do this before signal_sets_init()
3267   if (SR_initialize() != 0) {
3268     perror("SR_initialize failed");




3228   if (Bsd::page_size() == -1) {
3229     fatal("os_bsd.cpp: os::init: sysconf failed (%s)", os::strerror(errno));
3230   }
3231   init_page_sizes((size_t) Bsd::page_size());
3232 
3233   Bsd::initialize_system_info();
3234 
3235   // _main_thread points to the thread that created/loaded the JVM.
3236   Bsd::_main_thread = pthread_self();
3237 
3238   Bsd::clock_init();
3239   initial_time_count = javaTimeNanos();
3240 
3241 #ifdef __APPLE__
3242   // XXXDARWIN
3243   // Work around the unaligned VM callbacks in hotspot's
3244   // sharedRuntime. The callbacks don't use SSE2 instructions, and work on
3245   // Linux, Solaris, and FreeBSD. On Mac OS X, dyld (rightly so) enforces
3246   // alignment when doing symbol lookup. To work around this, we force early
3247   // binding of all symbols now, thus binding when alignment is known-good.
3248   Dl_info dl_info;
3249   if (dladdr(CAST_FROM_FN_PTR(void*, os::init), &dl_info) != 0) {
3250     void* handle = dlopen(dl_info.dli_fname, RTLD_NOW);
3251     if (handle != NULL) {
3252       dlclose(handle);
3253     }
3254   }
3255 #endif
3256 
3257   os::Posix::init();
3258 }
3259 
3260 // To install functions for atexit system call
3261 extern "C" {
3262   static void perfMemory_exit_helper() {
3263     perfMemory_exit();
3264   }
3265 }
3266 
3267 // this is called _after_ the global arguments have been parsed
3268 jint os::init_2(void) {
3269 
3270   os::Posix::init_2();
3271 
3272   // initialize suspend/resume support - must do this before signal_sets_init()
3273   if (SR_initialize() != 0) {
3274     perror("SR_initialize failed");


< prev index next >