equal
deleted
inserted
replaced
4636 os::Solaris::set_cond_destroy(::cond_destroy); |
4636 os::Solaris::set_cond_destroy(::cond_destroy); |
4637 } |
4637 } |
4638 } |
4638 } |
4639 } |
4639 } |
4640 |
4640 |
4641 void os::Solaris::liblgrp_init() { |
4641 bool os::Solaris::liblgrp_init() { |
4642 void *handle = dlopen("liblgrp.so.1", RTLD_LAZY); |
4642 void *handle = dlopen("liblgrp.so.1", RTLD_LAZY); |
4643 if (handle != NULL) { |
4643 if (handle != NULL) { |
4644 os::Solaris::set_lgrp_home(CAST_TO_FN_PTR(lgrp_home_func_t, dlsym(handle, "lgrp_home"))); |
4644 os::Solaris::set_lgrp_home(CAST_TO_FN_PTR(lgrp_home_func_t, dlsym(handle, "lgrp_home"))); |
4645 os::Solaris::set_lgrp_init(CAST_TO_FN_PTR(lgrp_init_func_t, dlsym(handle, "lgrp_init"))); |
4645 os::Solaris::set_lgrp_init(CAST_TO_FN_PTR(lgrp_init_func_t, dlsym(handle, "lgrp_init"))); |
4646 os::Solaris::set_lgrp_fini(CAST_TO_FN_PTR(lgrp_fini_func_t, dlsym(handle, "lgrp_fini"))); |
4646 os::Solaris::set_lgrp_fini(CAST_TO_FN_PTR(lgrp_fini_func_t, dlsym(handle, "lgrp_fini"))); |
4651 os::Solaris::set_lgrp_cookie_stale(CAST_TO_FN_PTR(lgrp_cookie_stale_func_t, |
4651 os::Solaris::set_lgrp_cookie_stale(CAST_TO_FN_PTR(lgrp_cookie_stale_func_t, |
4652 dlsym(handle, "lgrp_cookie_stale"))); |
4652 dlsym(handle, "lgrp_cookie_stale"))); |
4653 |
4653 |
4654 lgrp_cookie_t c = lgrp_init(LGRP_VIEW_CALLER); |
4654 lgrp_cookie_t c = lgrp_init(LGRP_VIEW_CALLER); |
4655 set_lgrp_cookie(c); |
4655 set_lgrp_cookie(c); |
4656 } else { |
4656 return true; |
4657 warning("your OS does not support NUMA"); |
4657 } |
4658 } |
4658 return false; |
4659 } |
4659 } |
4660 |
4660 |
4661 void os::Solaris::misc_sym_init() { |
4661 void os::Solaris::misc_sym_init() { |
4662 address func = (address)dlsym(RTLD_DEFAULT, "meminfo"); |
4662 address func = (address)dlsym(RTLD_DEFAULT, "meminfo"); |
4663 if(func == NULL) { |
4663 if(func == NULL) { |
4822 // the yellow/red zones can be guarded. |
4822 // the yellow/red zones can be guarded. |
4823 JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes, |
4823 JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes, |
4824 vm_page_size())); |
4824 vm_page_size())); |
4825 |
4825 |
4826 Solaris::libthread_init(); |
4826 Solaris::libthread_init(); |
|
4827 |
4827 if (UseNUMA) { |
4828 if (UseNUMA) { |
4828 Solaris::liblgrp_init(); |
4829 if (!Solaris::liblgrp_init()) { |
4829 } |
4830 UseNUMA = false; |
|
4831 } else { |
|
4832 size_t lgrp_limit = os::numa_get_groups_num(); |
|
4833 int *lgrp_ids = NEW_C_HEAP_ARRAY(int, lgrp_limit); |
|
4834 size_t lgrp_num = os::numa_get_leaf_groups(lgrp_ids, lgrp_limit); |
|
4835 FREE_C_HEAP_ARRAY(int, lgrp_ids); |
|
4836 if (lgrp_num < 2) { |
|
4837 // There's only one locality group, disable NUMA. |
|
4838 UseNUMA = false; |
|
4839 } |
|
4840 } |
|
4841 if (!UseNUMA && ForceNUMA) { |
|
4842 UseNUMA = true; |
|
4843 } |
|
4844 } |
|
4845 |
4830 Solaris::misc_sym_init(); |
4846 Solaris::misc_sym_init(); |
4831 Solaris::signal_sets_init(); |
4847 Solaris::signal_sets_init(); |
4832 Solaris::init_signal_mem(); |
4848 Solaris::init_signal_mem(); |
4833 Solaris::install_signal_handlers(); |
4849 Solaris::install_signal_handlers(); |
4834 |
4850 |