diff options
Diffstat (limited to 'java/openjdk6/files/patch-set')
-rw-r--r-- | java/openjdk6/files/patch-set | 84 |
1 files changed, 67 insertions, 17 deletions
diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set index 73f3034e0175..29b77e0fe555 100644 --- a/java/openjdk6/files/patch-set +++ b/java/openjdk6/files/patch-set @@ -5837,8 +5837,28 @@ } inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf) ---- hotspot/src/os/posix/launcher/java_md.c 2011-07-05 14:30:58.000000000 -0400 -+++ hotspot/src/os/posix/launcher/java_md.c 2011-07-07 19:17:02.000000000 -0400 +--- hotspot/src/os/bsd/vm/vmError_bsd.cpp 2012-05-01 17:15:07.000000000 -0400 ++++ hotspot/src/os/bsd/vm/vmError_bsd.cpp 2012-09-26 17:05:10.000000000 -0400 +@@ -44,7 +44,7 @@ + jio_snprintf(p, buflen - len, + "\n\n" + "Do you want to debug the problem?\n\n" +- "To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n" ++ "To debug, run 'gdb /proc/%d/file %d'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n" + "Enter 'yes' to launch gdb automatically (PATH must include gdb)\n" + "Otherwise, press RETURN to abort...", + os::current_process_id(), os::current_process_id(), +@@ -54,7 +54,7 @@ + + if (yes) { + // yes, user asked VM to launch debugger +- jio_snprintf(buf, buflen, "gdb /proc/%d/exe %d", ++ jio_snprintf(buf, buflen, "gdb /proc/%d/file %d", + os::current_process_id(), os::current_process_id()); + + os::fork_and_exec(buf); +--- hotspot/src/os/posix/launcher/java_md.c 2012-05-01 17:15:07.000000000 -0400 ++++ hotspot/src/os/posix/launcher/java_md.c 2012-09-26 17:49:02.000000000 -0400 @@ -41,14 +41,21 @@ #include "version_comp.h" #endif @@ -5934,16 +5954,22 @@ char *execname = GetExecname(); if (execname) { strncpy(buf, execname, bufsize-1); -@@ -961,7 +984,7 @@ +@@ -961,9 +984,13 @@ } } } -#elif defined(__linux__) +#elif defined(__linux__) || defined(_ALLBSD_SOURCE) { ++#ifdef __FreeBSD__ ++ const char* self = "/proc/curproc/file"; ++#else const char* self = "/proc/self/exe"; ++#endif char buf[PATH_MAX+1]; -@@ -971,7 +994,7 @@ + int len = readlink(self, buf, PATH_MAX); + if (len >= 0) { +@@ -971,7 +998,7 @@ exec_path = JLI_StringDup(buf); } } @@ -5952,7 +5978,7 @@ { /* Not implemented */ } -@@ -1175,7 +1198,7 @@ +@@ -1175,7 +1202,7 @@ #endif /* __sun && i586 */ @@ -5961,7 +5987,7 @@ /* * A utility method for asking the CPU about itself. -@@ -1240,7 +1263,7 @@ +@@ -1240,7 +1267,7 @@ #endif } @@ -5970,7 +5996,7 @@ #ifdef i586 /* -@@ -1452,6 +1475,39 @@ +@@ -1452,6 +1479,39 @@ #endif /* __linux__ && i586 */ @@ -6010,7 +6036,7 @@ /* Dispatch to the platform-specific definition of "server-class" */ jboolean ServerClassMachine(void) { -@@ -1466,6 +1522,8 @@ +@@ -1466,6 +1526,8 @@ result = solaris_i586_ServerClassMachine(); #elif defined(__linux__) && defined(i586) result = linux_i586_ServerClassMachine(); @@ -6019,7 +6045,7 @@ #else if (_launcher_debug) { printf("ServerClassMachine: returns default value of %s\n", -@@ -1821,7 +1879,7 @@ +@@ -1821,7 +1883,7 @@ int ContinueInNewThread(int (JNICALL *continuation)(void *), jlong stack_size, void * args) { int rslt; @@ -13972,8 +13998,8 @@ #define HOST_TO_JAVA_CHAR(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff))) #define HOST_TO_JAVA_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff))) ---- jdk/src/solaris/bin/java_md.c 2011-07-05 14:36:09.000000000 -0400 -+++ jdk/src/solaris/bin/java_md.c 2011-07-07 19:17:04.000000000 -0400 +--- jdk/src/solaris/bin/java_md.c 2012-05-01 17:18:34.000000000 -0400 ++++ jdk/src/solaris/bin/java_md.c 2012-09-26 17:43:09.000000000 -0400 @@ -24,6 +24,7 @@ */ @@ -14082,7 +14108,31 @@ "%s:" "%s/lib/%s:" "%s/../lib/%s", -@@ -977,6 +1011,7 @@ +@@ -878,9 +912,13 @@ + } + } + } +-#elif defined(__linux__) ++#elif defined(__linux__) || defined(_ALLBSD_SOURCE) + { ++#ifdef __FreeBSD__ ++ const char* self = "/proc/curproc/file"; ++#else + const char* self = "/proc/self/exe"; ++#endif + char buf[PATH_MAX+1]; + int len = readlink(self, buf, PATH_MAX); + if (len >= 0) { +@@ -888,7 +926,7 @@ + exec_path = JLI_StringDup(buf); + } + } +-#else /* !__sun && !__linux */ ++#else /* !__sun && !__linux && !_ALLBSD_SOURCE */ + { + /* Not implemented */ + } +@@ -977,6 +1015,7 @@ /* Compute physical memory by asking the OS */ uint64_t physical_memory(void) { @@ -14090,7 +14140,7 @@ const uint64_t pages = (uint64_t) sysconf(_SC_PHYS_PAGES); const uint64_t page_size = (uint64_t) sysconf(_SC_PAGESIZE); const uint64_t result = pages * page_size; -@@ -988,6 +1023,28 @@ +@@ -988,6 +1027,28 @@ " physical memory: " UINT64_FORMAT " (%.3fGB)\n", pages, page_size, result, result / (double) GB); } @@ -14119,7 +14169,7 @@ return result; } -@@ -1083,7 +1140,7 @@ +@@ -1083,7 +1144,7 @@ #endif /* __sun && i586 */ @@ -14128,7 +14178,7 @@ /* * A utility method for asking the CPU about itself. -@@ -1692,9 +1749,23 @@ +@@ -1692,9 +1753,23 @@ return(borrowed_unsetenv(name)); } @@ -14153,7 +14203,7 @@ static void* hSplashLib = NULL; -@@ -1722,13 +1793,15 @@ +@@ -1722,13 +1797,15 @@ return "%lld"; } @@ -14171,7 +14221,7 @@ pthread_t tid; pthread_attr_t attr; pthread_attr_init(&attr); -@@ -1765,13 +1838,11 @@ +@@ -1765,13 +1842,11 @@ rslt = continuation(args); } #endif |