Mercurial > hg > graal-compiler
changeset 21626:ca3c6538bcec
JVMCI update makefiles for Solaris/SPARC; os::read at early stage of VM does not work, use ::read as fallback in JVMCIRuntime::parse_lines (JBS:GRAAL-54)
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Mon, 01 Jun 2015 14:17:05 +0200 |
parents | 0a203897b112 |
children | 06d12473ed61 |
files | make/solaris/makefiles/debug.make make/solaris/makefiles/fastdebug.make make/solaris/makefiles/optimized.make make/solaris/makefiles/product.make src/os/solaris/vm/thread_solaris.inline.hpp src/share/vm/jvmci/jvmciRuntime.cpp |
diffstat | 6 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/make/solaris/makefiles/debug.make Mon Jun 01 13:19:48 2015 +0200 +++ b/make/solaris/makefiles/debug.make Mon Jun 01 14:17:05 2015 +0200 @@ -47,7 +47,7 @@ MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers \ $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-debug #ifdef JVMCI -MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-JVMCI +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-debug #endif # This mapfile is only needed when compiling with dtrace support,
--- a/make/solaris/makefiles/fastdebug.make Mon Jun 01 13:19:48 2015 +0200 +++ b/make/solaris/makefiles/fastdebug.make Mon Jun 01 14:17:05 2015 +0200 @@ -118,7 +118,7 @@ MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers \ $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-debug #ifdef JVMCI -MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-JVMCI +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-fastdebug #endif # This mapfile is only needed when compiling with dtrace support,
--- a/make/solaris/makefiles/optimized.make Mon Jun 01 13:19:48 2015 +0200 +++ b/make/solaris/makefiles/optimized.make Mon Jun 01 14:17:05 2015 +0200 @@ -55,7 +55,7 @@ # Linker mapfiles MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers #ifdef JVMCI -MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-JVMCI +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-optimized #endif # This mapfile is only needed when compiling with dtrace support,
--- a/make/solaris/makefiles/product.make Mon Jun 01 13:19:48 2015 +0200 +++ b/make/solaris/makefiles/product.make Mon Jun 01 14:17:05 2015 +0200 @@ -67,7 +67,7 @@ # Linker mapfiles MAPFILE = $(GAMMADIR)/make/solaris/makefiles/mapfile-vers ifdef JVMCI -MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-JVMCI +MAPFILE += $(GAMMADIR)/make/solaris/makefiles/mapfile-vers-product endif ifndef USE_GCC
--- a/src/os/solaris/vm/thread_solaris.inline.hpp Mon Jun 01 13:19:48 2015 +0200 +++ b/src/os/solaris/vm/thread_solaris.inline.hpp Mon Jun 01 14:17:05 2015 +0200 @@ -47,7 +47,7 @@ uintptr_t raw = pd_raw_thread_id(); int ix = pd_cache_index(raw); Thread* candidate = ThreadLocalStorage::_get_thread_cache[ix]; - if (candidate->self_raw_id() == raw) { + if (candidate != NULL && candidate->self_raw_id() == raw) { // hit return candidate; } else {
--- a/src/share/vm/jvmci/jvmciRuntime.cpp Mon Jun 01 13:19:48 2015 +0200 +++ b/src/share/vm/jvmci/jvmciRuntime.cpp Mon Jun 01 14:17:05 2015 +0200 @@ -1111,7 +1111,12 @@ int file_handle = os::open(path, 0, 0); if (file_handle != -1) { char* buffer = NEW_C_HEAP_ARRAY(char, st.st_size + 1, mtInternal); - int num_read = (int) os::read(file_handle, (char*) buffer, st.st_size); + int num_read; + if(ThreadLocalStorage::thread() == NULL) { // Solaris needs a JavaThread for os::read, if no thread started yet, fallback. + num_read = (int) ::read(file_handle, (char*) buffer, st.st_size); + } else { + num_read = (int) os::read(file_handle, (char*) buffer, st.st_size); + } if (num_read == -1) { warning("Error reading file %s due to %s", path, strerror(errno)); } else if (num_read != st.st_size) {