From 260ffa12c0f108eb67999015df3fe0328aec4e3d Mon Sep 17 00:00:00 2001 From: Greg Lewis Date: Thu, 20 Sep 2007 03:35:30 +0000 Subject: . Default UseThreadPriorities to false on BSD. This can be toggled by passing -XX:+UseThreadPriorities. . Remove the os_sleep hack which was used on FreeBSD to make sure lower priority threads got time slices. Instead, just call pthread_yield(). On FreeBSD 7.x with libthr, this will still give lower priority threads some time (with the above flag turned on), although such behaviour is not guaranteed by POSIX. This boosts FreeBSD performance by 7-fold on an 8 core system, putting it on a par with Solaris (benchmarks by kris@). The Java standard and the JCK tests are somewhat contradictory on thread priority being guaranteed to work, and in this case the performance benefits appear to outweigh any possible side effects. . Pick up DEFAULT_LD_LIBRARY_PATH from the build environment rather than patching it into a file at build time. This simplifies the Makefile. Submitted by: Kurt Miller --- java/jdk15/files/patch-vm::globals.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 java/jdk15/files/patch-vm::globals.hpp (limited to 'java/jdk15/files/patch-vm::globals.hpp') diff --git a/java/jdk15/files/patch-vm::globals.hpp b/java/jdk15/files/patch-vm::globals.hpp new file mode 100644 index 000000000000..04d6c38413ed --- /dev/null +++ b/java/jdk15/files/patch-vm::globals.hpp @@ -0,0 +1,26 @@ +$FreeBSD$ + +--- ../../hotspot/src/share/vm/runtime/globals.hpp.orig Wed May 2 04:01:50 2007 ++++ ../../hotspot/src/share/vm/runtime/globals.hpp Tue Sep 18 21:40:44 2007 +@@ -130,6 +130,12 @@ + #define falseInProduct true + #endif + ++#if defined(_ALLBSD_SOURCE) ++#define OSUseThreadPriorities false ++#else ++#define OSUseThreadPriorities true ++#endif ++ + // develop flags are settable / visible only during development and are constant in the PRODUCT version + // product flags are always settable / visible + +@@ -2546,7 +2552,7 @@ + "beginning to throw OutOfMemoryErrors in each compile") \ + \ + /* Priorities */ \ +- product(bool, UseThreadPriorities, true, \ ++ product(bool, UseThreadPriorities, OSUseThreadPriorities, \ + "Use native thread priorities") \ + \ + product(intx, ThreadPriorityPolicy, 0, \ -- cgit v1.2.3