提交 c3850a84 编写于 作者: I iveresov

6720130: NUMA allocator: The linux version should search for libnuma.so.1

Summary: Search for libnuma.so.1 on Linux and liblgrp.so.1 on Solaris.
Reviewed-by: jmasa
上级 74a092db
...@@ -2278,7 +2278,7 @@ void os::Linux::libnuma_init() { ...@@ -2278,7 +2278,7 @@ void os::Linux::libnuma_init() {
dlsym(RTLD_DEFAULT, "sched_getcpu"))); dlsym(RTLD_DEFAULT, "sched_getcpu")));
if (sched_getcpu() != -1) { // Does it work? if (sched_getcpu() != -1) { // Does it work?
void *handle = dlopen("libnuma.so", RTLD_LAZY); void *handle = dlopen("libnuma.so.1", RTLD_LAZY);
if (handle != NULL) { if (handle != NULL) {
set_numa_node_to_cpus(CAST_TO_FN_PTR(numa_node_to_cpus_func_t, set_numa_node_to_cpus(CAST_TO_FN_PTR(numa_node_to_cpus_func_t,
dlsym(handle, "numa_node_to_cpus"))); dlsym(handle, "numa_node_to_cpus")));
......
...@@ -4570,7 +4570,7 @@ void os::Solaris::synchronization_init() { ...@@ -4570,7 +4570,7 @@ void os::Solaris::synchronization_init() {
} }
void os::Solaris::liblgrp_init() { void os::Solaris::liblgrp_init() {
void *handle = dlopen("liblgrp.so", RTLD_LAZY); void *handle = dlopen("liblgrp.so.1", RTLD_LAZY);
if (handle != NULL) { if (handle != NULL) {
os::Solaris::set_lgrp_home(CAST_TO_FN_PTR(lgrp_home_func_t, dlsym(handle, "lgrp_home"))); os::Solaris::set_lgrp_home(CAST_TO_FN_PTR(lgrp_home_func_t, dlsym(handle, "lgrp_home")));
os::Solaris::set_lgrp_init(CAST_TO_FN_PTR(lgrp_init_func_t, dlsym(handle, "lgrp_init"))); os::Solaris::set_lgrp_init(CAST_TO_FN_PTR(lgrp_init_func_t, dlsym(handle, "lgrp_init")));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册