Mercurial > hg > graal-jvmci-8
changeset 792:085dd9ee61aa
Merge
author | never |
---|---|
date | Wed, 03 Jun 2009 18:15:25 -0700 |
parents | f1f3a2719a55 (diff) 8b0b8998e1c3 (current diff) |
children | eacd97c88873 |
files | |
diffstat | 6 files changed, 48 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Wed Jun 03 15:16:50 2009 -0700 +++ b/.hgtags Wed Jun 03 18:15:25 2009 -0700 @@ -32,3 +32,4 @@ f8e839c086152da70d6ec5913ba6f9f509282e8d jdk7-b55 a3fd9e40ff2e854f6169eb6d09d491a28634d04f jdk7-b56 f4cbf78110c726919f46b59a3b054c54c7e889b4 jdk7-b57 +53d9bf689e80fcc76b221bbe6c5d58e08b80cbc6 jdk7-b58
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java Wed Jun 03 15:16:50 2009 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/JavaThread.java Wed Jun 03 18:15:25 2009 -0700 @@ -317,11 +317,11 @@ } public Address getStackBase() { - return stackBaseField.getValue(); + return stackBaseField.getValue(addr); } public long getStackSize() { - return stackSizeField.getValue(); + return stackSizeField.getValue(addr); } /** Gets the Java-side thread object for this JavaThread */
--- a/make/hotspot_version Wed Jun 03 15:16:50 2009 -0700 +++ b/make/hotspot_version Wed Jun 03 18:15:25 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
--- a/src/os/linux/vm/os_linux.cpp Wed Jun 03 15:16:50 2009 -0700 +++ b/src/os/linux/vm/os_linux.cpp Wed Jun 03 18:15:25 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<int>(0, true); rebuild_cpu_to_node_map();
--- a/src/os/linux/vm/os_linux.hpp Wed Jun 03 15:16:50 2009 -0700 +++ b/src/os/linux/vm/os_linux.hpp Wed Jun 03 18:15:25 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;
--- a/src/share/vm/oops/constantPoolOop.cpp Wed Jun 03 15:16:50 2009 -0700 +++ b/src/share/vm/oops/constantPoolOop.cpp Wed Jun 03 18:15:25 2009 -0700 @@ -1181,7 +1181,28 @@ unsigned int hash; char *str = string_at_noresolve(idx); symbolOop sym = SymbolTable::lookup_only(str, (int) strlen(str), hash); - idx1 = tbl->symbol_to_value(sym); + if (sym == NULL) { + // sym can be NULL if string refers to incorrectly encoded JVM_CONSTANT_Utf8 + // this can happen with JVM TI; see CR 6839599 for more details + oop string = *(obj_at_addr(idx)); + assert(java_lang_String::is_instance(string),"Not a String"); + DBG(printf("Error #%03hd tag=%03hd\n", idx, tag)); + idx1 = 0; + for (int j = 0; j < tbl->table_size() && idx1 == 0; j++) { + for (SymbolHashMapEntry* cur = tbl->bucket(j); cur != NULL; cur = cur->next()) { + int length; + sym = cur->symbol(); + jchar* chars = sym->as_unicode(length); + if (java_lang_String::equals(string, chars, length)) { + idx1 = cur->value(); + DBG(printf("Index found: %d\n",idx1)); + break; + } + } + } + } else { + idx1 = tbl->symbol_to_value(sym); + } assert(idx1 != 0, "Have not found a hashtable entry"); Bytes::put_Java_u2((address) (bytes+1), idx1); DBG(printf("JVM_CONSTANT_String: idx=#%03hd, %s", idx1, str));