# HG changeset patch # User jcoomes # Date 1243381422 25200 # Node ID 7fd05714f579e28ae3400591938d343362230705 # Parent c55be0c7bd32c016c52218eb4c8b5da8a75450b5# Parent 29e7d79232b9a277bdefbb162a8d8e52efc2bbca Merge diff -r 29e7d79232b9 -r 7fd05714f579 .hgtags --- a/.hgtags Tue May 19 04:05:31 2009 -0700 +++ b/.hgtags Tue May 26 16:43:42 2009 -0700 @@ -31,3 +31,5 @@ fafab5d5349c7c066d677538db67a1ee0fb33bd2 jdk7-b54 f8e839c086152da70d6ec5913ba6f9f509282e8d jdk7-b55 a3fd9e40ff2e854f6169eb6d09d491a28634d04f jdk7-b56 +f4cbf78110c726919f46b59a3b054c54c7e889b4 jdk7-b57 +53d9bf689e80fcc76b221bbe6c5d58e08b80cbc6 jdk7-b58 diff -r 29e7d79232b9 -r 7fd05714f579 make/hotspot_version --- a/make/hotspot_version Tue May 19 04:05:31 2009 -0700 +++ b/make/hotspot_version Tue May 26 16:43:42 2009 -0700 @@ -35,7 +35,7 @@ HS_MAJOR_VER=16 HS_MINOR_VER=0 -HS_BUILD_NUMBER=02 +HS_BUILD_NUMBER=03 JDK_MAJOR_VER=1 JDK_MINOR_VER=7 diff -r 29e7d79232b9 -r 7fd05714f579 src/os/linux/vm/os_linux.cpp --- a/src/os/linux/vm/os_linux.cpp Tue May 19 04:05:31 2009 -0700 +++ b/src/os/linux/vm/os_linux.cpp Tue May 26 16:43:42 2009 -0700 @@ -2314,7 +2314,8 @@ void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { } void os::free_memory(char *addr, size_t bytes) { - uncommit_memory(addr, bytes); + ::mmap(addr, bytes, PROT_READ | PROT_WRITE, + MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0); } void os::numa_make_global(char *addr, size_t bytes) { @@ -2361,6 +2362,19 @@ extern "C" void numa_warn(int number, char *where, ...) { } extern "C" void numa_error(char *where) { } + +// If we are running with libnuma version > 2, then we should +// be trying to use symbols with versions 1.1 +// If we are running with earlier version, which did not have symbol versions, +// we should use the base version. +void* os::Linux::libnuma_dlsym(void* handle, const char *name) { + void *f = dlvsym(handle, name, "libnuma_1.1"); + if (f == NULL) { + f = dlsym(handle, name); + } + return f; +} + bool os::Linux::libnuma_init() { // sched_getcpu() should be in libc. set_sched_getcpu(CAST_TO_FN_PTR(sched_getcpu_func_t, @@ -2370,19 +2384,19 @@ void *handle = dlopen("libnuma.so.1", RTLD_LAZY); if (handle != NULL) { set_numa_node_to_cpus(CAST_TO_FN_PTR(numa_node_to_cpus_func_t, - dlsym(handle, "numa_node_to_cpus"))); + libnuma_dlsym(handle, "numa_node_to_cpus"))); set_numa_max_node(CAST_TO_FN_PTR(numa_max_node_func_t, - dlsym(handle, "numa_max_node"))); + libnuma_dlsym(handle, "numa_max_node"))); set_numa_available(CAST_TO_FN_PTR(numa_available_func_t, - dlsym(handle, "numa_available"))); + libnuma_dlsym(handle, "numa_available"))); set_numa_tonode_memory(CAST_TO_FN_PTR(numa_tonode_memory_func_t, - dlsym(handle, "numa_tonode_memory"))); + libnuma_dlsym(handle, "numa_tonode_memory"))); set_numa_interleave_memory(CAST_TO_FN_PTR(numa_interleave_memory_func_t, - dlsym(handle, "numa_interleave_memory"))); + libnuma_dlsym(handle, "numa_interleave_memory"))); if (numa_available() != -1) { - set_numa_all_nodes((unsigned long*)dlsym(handle, "numa_all_nodes")); + set_numa_all_nodes((unsigned long*)libnuma_dlsym(handle, "numa_all_nodes")); // Create a cpu -> node mapping _cpu_to_node = new (ResourceObj::C_HEAP) GrowableArray(0, true); rebuild_cpu_to_node_map(); diff -r 29e7d79232b9 -r 7fd05714f579 src/os/linux/vm/os_linux.hpp --- a/src/os/linux/vm/os_linux.hpp Tue May 19 04:05:31 2009 -0700 +++ b/src/os/linux/vm/os_linux.hpp Tue May 26 16:43:42 2009 -0700 @@ -147,7 +147,7 @@ static void libpthread_init(); static bool libnuma_init(); - + static void* libnuma_dlsym(void* handle, const char* name); // Minimum stack size a thread can be created with (allowing // the VM to completely create the thread and enter user code) static size_t min_stack_allowed;