- speed up builds on mp systems by using parallel compiles (one per cpu)

- increase default thread stack size on amd64
- filter out corrupt env vars with no name
- Properly deal with error cases in transferTo0(). Corrects non-blocking
IO case.
All but first one from FreeBSD
This commit is contained in:
kurt 2006-07-10 13:17:39 +00:00
parent 64feab316c
commit aa74a6e1f4
4 changed files with 100 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.21 2006/07/01 09:06:00 steven Exp $
# $OpenBSD: Makefile,v 1.22 2006/07/10 13:17:39 kurt Exp $
ONLY_FOR_ARCHS= amd64 i386
@ -6,8 +6,8 @@ COMMENT= "Java2(TM) Standard Edition Dev Kit v${V}"
COMMENT-jre= "Java2(TM) Standard Edition Runtime Environment v${V}"
V= 1.5.0
DISTNAME= jdk-1_5_0
PKGNAME= jdk-${V}p17
PKGNAME-jre= jre-${V}p17
PKGNAME= jdk-${V}p18
PKGNAME-jre= jre-${V}p18
CATEGORIES= devel/jdk java
@ -56,7 +56,8 @@ MAKE_ENV= ALT_MOTIF_DIR="${LOCALBASE}" \
LANG="C" \
CC="${CC}" \
CXX="${CXX}" \
DEFAULT_LD_LIBRARY_PATH="/usr/lib:/usr/X11R6/lib:${LOCALBASE}/lib"
DEFAULT_LD_LIBRARY_PATH="/usr/lib:/usr/X11R6/lib:${LOCALBASE}/lib" \
HOTSPOT_BUILD_JOBS=`sysctl -n hw.ncpu`
# Error message for distfile.
FETCH_MANUALLY= "You must manually fetch the distribution files, place"

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_amd64_vm_globals_bsd_amd64_hpp,v 1.1 2006/07/10 13:17:39 kurt Exp $
--- hotspot/src/os_cpu/bsd_amd64/vm/globals_bsd_amd64.hpp.orig Fri Jul 7 10:47:16 2006
+++ hotspot/src/os_cpu/bsd_amd64/vm/globals_bsd_amd64.hpp Fri Jul 7 10:47:53 2006
@@ -12,7 +12,7 @@
//
define_pd_global(bool, DontYieldALot, false);
//define_pd_global(intx, ThreadStackSize, 0); // 0 => use system default
-define_pd_global(intx, ThreadStackSize, 256);
+define_pd_global(intx, ThreadStackSize, 1024);
define_pd_global(intx, VMThreadStackSize, 1024);
define_pd_global(intx, CompilerThreadStackSize, 0);
define_pd_global(intx, SurvivorRatio, 8);

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-j2se_src_solaris_native_java_lang_ProcessEnvironment_md_c,v 1.1 2006/07/10 13:17:39 kurt Exp $
--- j2se/src/solaris/native/java/lang/ProcessEnvironment_md.c.orig Tue Oct 19 15:02:09 2004
+++ j2se/src/solaris/native/java/lang/ProcessEnvironment_md.c Fri Jul 7 10:48:01 2006
@@ -32,7 +32,7 @@ Java_java_lang_ProcessEnvironment_enviro
for (i = 0; environ[i]; i++) {
/* Ignore corrupted environment variables */
- if (strchr(environ[i], '=') != NULL)
+ if (strchr(environ[i], '=') != NULL && *environ[i] != '=')
count++;
}
@@ -43,7 +43,7 @@ Java_java_lang_ProcessEnvironment_enviro
jsize len = strlen(environ[i]);
const char * varEnd = strchr(environ[i], '=');
/* Ignore corrupted environment variables */
- if (varEnd != NULL) {
+ if (varEnd != NULL && varEnd != environ[i]) {
jbyteArray var, val;
const char * valBeg = varEnd + 1;
jsize varLength = varEnd - environ[i];

View File

@ -0,0 +1,62 @@
$OpenBSD: patch-j2se_src_solaris_native_sun_nio_ch_FileChannelImpl_c,v 1.1 2006/07/10 13:17:39 kurt Exp $
--- j2se/src/solaris/native/sun/nio/ch/FileChannelImpl.c.orig Fri Jul 7 10:47:18 2006
+++ j2se/src/solaris/native/sun/nio/ch/FileChannelImpl.c Fri Jul 7 14:55:36 2006
@@ -273,14 +273,28 @@ Java_sun_nio_ch_FileChannelImpl_transfer
free(buf);
/*
- * XXXBSD: there're potential problems with NBIO fd's. Check it.
+ * Similar to solaris if we've transferred any data return
+ * the number of bytes and ignore any error
+ */
+ if (offset - (off_t)position > 0)
+ return (offset - (off_t)position);
+
+ /*
+ * Deal with NBIO EAGAIN & EINTR the same as solaris.
*/
if (r == -1 || w == -1) {
- fprintf(stderr, "%d %d %d %d %d\n", srcFD, dstFD, r, w, errno);
- JNU_ThrowIOExceptionWithLastError(env, "Transfer failed");
- return IOS_THROWN;
+ switch (errno) {
+ case EAGAIN:
+ return IOS_UNAVAILABLE;
+ case EINTR:
+ return IOS_INTERRUPTED;
+ default:
+ JNU_ThrowIOExceptionWithLastError(env, "Transfer failed");
+ return IOS_THROWN;
+ }
}
- return (offset - (off_t)position);
+
+ return (0);
#endif
}
@@ -333,21 +347,12 @@ Java_sun_nio_ch_FileChannelImpl_release0
fl.l_start = (off64_t)pos;
fl.l_type = F_UNLCK;
lockResult = fcntl(fd, cmd, &fl);
-#if defined(__FreeBSD__)
- /* XXXFREEBSD: While doing of preClose0() we're closing actual fd which
+#if defined(_ALLBSD_SOURCE)
+ /* XXXBSD: While doing of preClose0() we're closing actual fd which
was locked, so here we'll get an error which need to be ignored to
satisfy TCK FileLock test */
- /* XXXFREEBSD: backport to 1.4.2 */
+ /* XXXBSD: backport to 1.4.2 */
if (lockResult < 0 && errno == EBADF)
- lockResult = errno = 0;
-#endif
-#if defined(__NetBSD__)
- /* XXXNETBSD: The dup2 in preClose0 is being done onto 1 end of a
- socketpair which isn't a valid target for F_UNLCK. No good way to see
- this vs. a bad lock setup so just return errno = 0 there
- to pass JCK (lock will get removed once all fd's close anyways) */
- /* XXXNETBSD: backport to 1.4.2 */
- if (lockResult < 0 && errno == EINVAL)
lockResult = errno = 0;
#endif
if (lockResult < 0) {