aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2011-02-10 04:00:38 +0800
committerjkim <jkim@FreeBSD.org>2011-02-10 04:00:38 +0800
commit54ee6b66094ffe6e9fa5df74fbb0000b8a4b5b9d (patch)
tree762c210b739802b9b1a080a046f1aef9e429cd80 /java
parente4ddfbfefe0ca05674e6b664f0cb1c8ba731da4c (diff)
downloadfreebsd-ports-gnome-54ee6b66094ffe6e9fa5df74fbb0000b8a4b5b9d.tar.gz
freebsd-ports-gnome-54ee6b66094ffe6e9fa5df74fbb0000b8a4b5b9d.tar.zst
freebsd-ports-gnome-54ee6b66094ffe6e9fa5df74fbb0000b8a4b5b9d.zip
- Update to build 21.
- Improve Serviceability Agent. For example, the following should work now: jdb -connect sun.jvm.hotspot.jdi.SAPIDAttachingConnector:pid=<PID> jmap <PID> jsadebugd <PID> jstack -F <PID> jstack -m <PID> - Replace IcedTea6 1.9.x with IcedTea-Web 1.0 for web support. Note it is still tightly coupled with openjdk6 for now because we do not have proper infrastructure to decouple them yet. - Add itweb-settings (a Java Control Panel replacement for IcedTea-Web). - Add desktop integration files for web support (but not installed in default system-wide locations).
Diffstat (limited to 'java')
-rw-r--r--java/openjdk6/Makefile131
-rw-r--r--java/openjdk6/distinfo16
-rw-r--r--java/openjdk6/files/Makefile.plugin5
-rw-r--r--java/openjdk6/files/icedtea.patch121
-rw-r--r--java/openjdk6/files/patch-nio-kqueue697
-rw-r--r--java/openjdk6/files/patch-set5091
-rw-r--r--java/openjdk6/files/plugin.patch31
7 files changed, 3507 insertions, 2585 deletions
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile
index b49caca9b7fa..208598b37731 100644
--- a/java/openjdk6/Makefile
+++ b/java/openjdk6/Makefile
@@ -6,19 +6,18 @@
#
PORTNAME= openjdk6
-PORTVERSION= b20
-PORTREVISION= 8
+PORTVERSION= b21
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
- https://jaxp.dev.java.net/files/documents/913/150648/:jaxp \
- https://jax-ws.dev.java.net/files/documents/4202/150724/:jaxws \
- https://jax-ws.dev.java.net/files/documents/4202/150725/:jaf \
+ https://java.net/downloads/jaxp/jdk7/:jaxp \
+ https://java.net/downloads/jax-ws/OpenJDK6/:jaxws \
+ https://java.net/downloads/jax-ws/OpenJDK6/:jaf \
http://icedtea.classpath.org/builds/icedtea6/src/ \
- http://icedtea.classpath.org/builds/icedtea6/src/drops/:jaxp \
- http://icedtea.classpath.org/builds/icedtea6/src/drops/:jaxws \
- http://icedtea.classpath.org/builds/icedtea6/src/drops/:jaf \
+ http://icedtea.classpath.org/download/drops/:jaxp \
+ http://icedtea.classpath.org/download/drops/:jaxws \
+ http://icedtea.classpath.org/download/drops/:jaf \
${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \
- http://icedtea.classpath.org/download/source/:icedtea \
+ http://icedtea.classpath.org/download/source/:itweb \
http://download.java.net/openjdk/jtreg/promoted/${JTREGVERSION}/:jtreg
DISTNAME= openjdk-6-src-${PORTVERSION}-${OPENJDK_BUILDDATE}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
@@ -40,7 +39,7 @@ RUN_DEPENDS= javavm:${PORTSDIR}/java/javavmwrapper \
LICENSE= GPLv2
-OPENJDK_BUILDDATE= 21_jun_2010
+OPENJDK_BUILDDATE= 20_jan_2011
OPTIONS= DEBUG "Enable legacy debugging support" off \
FASTDEBUG "Include fastdebug build" off \
@@ -57,16 +56,16 @@ USE_MOTIF= yes
USE_XORG= xtst xi xt x11
MAKE_JOBS_UNSAFE= yes
-JAXP_BUILD= b20
-JAXPFILE= jdk6-jaxp-${JAXP_BUILD}.zip
+JAXP_BUILD= 1_4_4
+JAXPFILE= jaxp-${JAXP_BUILD}.zip
JAXWS_BUILD= b20
JAXWSFILE= jdk6-jaxws-${JAXWS_BUILD}.zip
JAF_BUILD= b20
JAFFILE= jdk6-jaf-${JAF_BUILD}.zip
-ICEDTEAVERSION= 1.9.4
-ICEDTEAFILE= icedtea6-${ICEDTEAVERSION}${EXTRACT_SUFX}
-JTREGVERSION= b03
-JTREGFILE= jtreg-4_0-bin-${JTREGVERSION}-31_mar_2009.zip
+ITWEBVERSION= 1.0
+ITWEBFILE= icedtea-web-${ITWEBVERSION}${EXTRACT_SUFX}
+JTREGVERSION= b02
+JTREGFILE= jtreg-4.1-bin-${JTREGVERSION}_21_may_2010.zip
# do not depend on devel/apache-ant to avoid circular dependency, but
# use .tar.bz2 distfile to avoid duplicated downloads
@@ -145,20 +144,20 @@ OPENJDK_OSARCH= bsd-${ARCH:S/i386/i586/}
.endif
.if defined(WITH_WEB)
-DISTFILES+= ${ICEDTEAFILE}:icedtea
-EXTRACT_ONLY+= ${ICEDTEAFILE}
-EXTRA_PATCHES+= ${FILESDIR}/icedtea.patch ${FILESDIR}/plugin.patch
+DISTFILES+= ${ITWEBFILE}:itweb
+EXTRACT_ONLY+= ${ITWEBFILE}
+EXTRA_PATCHES+= ${FILESDIR}/plugin.patch
BUILD_DEPENDS+= ${LOCALBASE}/bin/pkg-config:${PORTSDIR}/devel/pkg-config \
${LOCALBASE}/libdata/pkgconfig/glib-2.0.pc:${PORTSDIR}/devel/glib20 \
${LOCALBASE}/libdata/pkgconfig/gtk+-2.0.pc:${PORTSDIR}/x11-toolkits/gtk20 \
${LOCALBASE}/libdata/pkgconfig/mozilla-plugin.pc:${PORTSDIR}/www/libxul
-ICEDTEADIR= ${WRKDIR}/icedtea6-${ICEDTEAVERSION}
-ICEDTEA_JAVAC= ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/bin/javac
-ICEDTEA_JAR= ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/bin/jar
+ITWEBDIR= ${WRKDIR}/icedtea-web-${ITWEBVERSION}
+ITWEB_JAVAC= ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/bin/javac
+ITWEB_JAR= ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/bin/jar
.if defined(WITH_DEBUG)
-ICEDTEA_DEBUG_FLAGS=-g
+ITWEB_DEBUG_FLAGS=-g
.endif
-ICEDTEA_JAVAC_FLAGS=${ICEDTEA_DEBUG_FLAGS} -encoding utf-8 -J-Xmx1024m -source 6 -target 6
+ITWEB_JAVAC_FLAGS=${ITWEB_DEBUG_FLAGS} -encoding utf-8 -J-Xmx1024m -source 6 -target 6
.endif
.if defined(WITH_TEST)
@@ -245,63 +244,71 @@ post-patch:
.if defined(WITH_WEB) || defined(WITH_TEST)
post-build:
.if defined(WITH_WEB)
- @${MKDIR} ${ICEDTEADIR}/build/lib
+ @${MKDIR} ${ITWEBDIR}/build/lib
@( \
- cd ${ICEDTEADIR}/plugin/icedteanp; \
+ cd ${ITWEBDIR}/plugin/icedteanp; \
${MAKE} -f ${FILESDIR}/Makefile.plugin depend all install \
- DEBUG_FLAGS="${ICEDTEA_DEBUG_FLAGS}" \
- LIBDIR=${ICEDTEADIR}/build/lib \
+ DEBUG_FLAGS="${ITWEB_DEBUG_FLAGS}" \
+ LIBDIR=${ITWEBDIR}/build/lib \
LIBOWN=${UID} \
LIBGRP=`${ID} -g` \
LOCALBASE=${LOCALBASE} \
JDK_UPDATE_VERSION=${PORTVERSION:S/^b//} \
- PLUGIN_VERSION="OpenJDK6 ${PORTVERSION}" \
+ PLUGIN_VERSION="IcedTea-Web ${ITWEBVERSION}" \
)
- @${FIND} -s ${ICEDTEADIR}/netx -name '*.java' > \
- ${ICEDTEADIR}/netx-source-files.txt
- @${MKDIR} ${ICEDTEADIR}/netx.build/lib
- @${ICEDTEA_JAVAC} ${ICEDTEA_JAVAC_FLAGS} -d ${ICEDTEADIR}/netx.build \
- @${ICEDTEADIR}/netx-source-files.txt
- @${CP} -r ${ICEDTEADIR}/netx/net/sourceforge/jnlp/resources \
- ${ICEDTEADIR}/netx.build/net/sourceforge/jnlp
+ @${FIND} -s ${ITWEBDIR}/netx -name '*.java' > \
+ ${ITWEBDIR}/netx-source-files.txt
+ @${MKDIR} ${ITWEBDIR}/netx.build/lib
+ @${ITWEB_JAVAC} ${ITWEB_JAVAC_FLAGS} -d ${ITWEBDIR}/netx.build \
+ @${ITWEBDIR}/netx-source-files.txt
+ @${CP} -r ${ITWEBDIR}/netx/net/sourceforge/jnlp/resources \
+ ${ITWEBDIR}/netx.build/net/sourceforge/jnlp
@( \
- cd ${ICEDTEADIR}/netx.build; \
- ${ICEDTEA_JAR} cf ${ICEDTEADIR}/build/lib/netx.jar \
+ cd ${ITWEBDIR}/netx.build; \
+ ${ITWEB_JAR} cf ${ITWEBDIR}/build/lib/netx.jar \
javax/jnlp net \
)
@( \
- cd ${ICEDTEADIR}/netx; \
- ${ICEDTEA_JAR} uf ${ICEDTEADIR}/build/lib/netx.jar \
+ cd ${ITWEBDIR}/netx; \
+ ${ITWEB_JAR} uf ${ITWEBDIR}/build/lib/netx.jar \
`${FIND} . -type f -not -name '*.java'` \
)
- @${CP} ${ICEDTEADIR}/netx/net/sourceforge/jnlp/resources/about.jnlp \
- ${ICEDTEADIR}/build/lib
- @${FIND} -s ${ICEDTEADIR}/plugin/icedteanp/java -name '*.java' > \
- ${ICEDTEADIR}/liveconnect-source-files.txt
- @${MKDIR} ${ICEDTEADIR}/liveconnect/lib
- @${ICEDTEA_JAVAC} ${ICEDTEA_JAVAC_FLAGS} -d ${ICEDTEADIR}/liveconnect \
- -classpath ${ICEDTEADIR}/netx.build \
- @${ICEDTEADIR}/liveconnect-source-files.txt
+ @${CP} ${ITWEBDIR}/netx/net/sourceforge/jnlp/resources/about.jnlp \
+ ${ITWEBDIR}/build/lib
+ @${FIND} -s ${ITWEBDIR}/plugin/icedteanp/java -name '*.java' > \
+ ${ITWEBDIR}/liveconnect-source-files.txt
+ @${MKDIR} ${ITWEBDIR}/liveconnect/lib
+ @${ITWEB_JAVAC} ${ITWEB_JAVAC_FLAGS} -d ${ITWEBDIR}/liveconnect \
+ -classpath ${ITWEBDIR}/netx.build \
+ @${ITWEBDIR}/liveconnect-source-files.txt
@( \
- cd ${ICEDTEADIR}/liveconnect; \
- ${ICEDTEA_JAR} cf ${ICEDTEADIR}/build/lib/plugin.jar \
+ cd ${ITWEBDIR}/liveconnect; \
+ ${ITWEB_JAR} cf ${ITWEBDIR}/build/lib/plugin.jar \
netscape sun/applet \
)
- @${FIND} -s ${ICEDTEADIR}/extra -name '*.java' > \
- ${ICEDTEADIR}/extra-source-files.txt
- @${MKDIR} ${ICEDTEADIR}/extra-lib
- @${ICEDTEA_JAVAC} ${ICEDTEA_JAVAC_FLAGS} -d ${ICEDTEADIR}/extra-lib \
- -classpath ${ICEDTEADIR}/netx.build \
- @${ICEDTEADIR}/extra-source-files.txt
- @${CP} -r ${ICEDTEADIR}/extra/net/sourceforge/jnlp/about/resources \
- ${ICEDTEADIR}/extra-lib/net/sourceforge/jnlp/about
+ @${FIND} -s ${ITWEBDIR}/extra -name '*.java' > \
+ ${ITWEBDIR}/extra-source-files.txt
+ @${MKDIR} ${ITWEBDIR}/extra-lib
+ @${ITWEB_JAVAC} ${ITWEB_JAVAC_FLAGS} -d ${ITWEBDIR}/extra-lib \
+ -classpath ${ITWEBDIR}/netx.build \
+ @${ITWEBDIR}/extra-source-files.txt
+ @${CP} -r ${ITWEBDIR}/extra/net/sourceforge/jnlp/about/resources \
+ ${ITWEBDIR}/extra-lib/net/sourceforge/jnlp/about
@( \
- cd ${ICEDTEADIR}/extra-lib; \
- ${ICEDTEA_JAR} cf ${ICEDTEADIR}/build/lib/about.jar net \
+ cd ${ITWEBDIR}/extra-lib; \
+ ${ITWEB_JAR} cf ${ITWEBDIR}/build/lib/about.jar net \
)
- @${CP} -Rp ${ICEDTEADIR}/build/lib \
+ @${MKDIR} ${ITWEBDIR}/build/lib/desktop
+ @${SED} 's|PATH_TO_ITWEB_SETTINGS|${PREFIX}/openjdk6/bin/itweb-settings|' \
+ ${ITWEBDIR}/itweb-settings.desktop.in > \
+ ${ITWEBDIR}/build/lib/desktop/itweb-settings.desktop
+ @${SED} 's|PATH_TO_JAVAWS|${PREFIX}/openjdk6/bin/javaws|' \
+ ${ITWEBDIR}/javaws.desktop.in > \
+ ${ITWEBDIR}/build/lib/desktop/javaws.desktop
+ @${CP} ${ITWEBDIR}/javaws.png ${ITWEBDIR}/build/lib/desktop
+ @${CP} -Rp ${ITWEBDIR}/build/lib \
${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre
- @${CP} ${ICEDTEADIR}/netx/javaws.1 \
+ @${CP} ${ITWEBDIR}/netx/javaws.1 \
${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/man/man1/javaws.1
.endif
.if defined(WITH_TEST)
diff --git a/java/openjdk6/distinfo b/java/openjdk6/distinfo
index 51eaf645ae57..d53f1c4d80da 100644
--- a/java/openjdk6/distinfo
+++ b/java/openjdk6/distinfo
@@ -1,14 +1,14 @@
-SHA256 (openjdk-6-src-b20-21_jun_2010.tar.gz) = fcf8f1d614e5965e90ef1b1a6d5eecc2bcc3078eaffbb62b83dfba52da62e54b
-SIZE (openjdk-6-src-b20-21_jun_2010.tar.gz) = 45078703
-SHA256 (jdk6-jaxp-b20.zip) = d097627d4059d488c5a09d4e33cec275a193d4d8bc0fea8ef4f1337170904156
-SIZE (jdk6-jaxp-b20.zip) = 5944804
+SHA256 (openjdk-6-src-b21-20_jan_2011.tar.gz) = 0315750fc914a18827dfee2d274ec8936b6f11540b46c046bc2944502cd9127f
+SIZE (openjdk-6-src-b21-20_jan_2011.tar.gz) = 45268227
+SHA256 (jaxp-1_4_4.zip) = 10b203bec5b7d3dd8f515a9e098f80abc316faf977bcc220b56efe3dc6e9e5e9
+SIZE (jaxp-1_4_4.zip) = 5972577
SHA256 (jdk6-jaxws-b20.zip) = 0c460583898b968a58bf88eb53f90a0e34369e2562d65fb3a143512dfcaeb3eb
SIZE (jdk6-jaxws-b20.zip) = 5513069
SHA256 (jdk6-jaf-b20.zip) = 78c7b5c9d6271e88ee46abadd018a61f1e9645f8936cc8df1617e5f4f5074012
SIZE (jdk6-jaf-b20.zip) = 71243
SHA256 (apache-ant-1.8.1-bin.tar.bz2) = e0c4e1133b0cb80dc4b29fc48f11b8f57e845e16474472f2749625be5cc66ca9
SIZE (apache-ant-1.8.1-bin.tar.bz2) = 6702817
-SHA256 (icedtea6-1.9.4.tar.gz) = 2194b59d8c17ad6ff2fb495e10f9e6023993df5f8ce8a3739bf057f6562ef077
-SIZE (icedtea6-1.9.4.tar.gz) = 6501091
-SHA256 (jtreg-4_0-bin-b03-31_mar_2009.zip) = 919b3da574a8bfb96a53d9550a0cb2482dc08df6ce3e7042235e0e9067c832e6
-SIZE (jtreg-4_0-bin-b03-31_mar_2009.zip) = 4824967
+SHA256 (icedtea-web-1.0.tar.gz) = e33413768cdf2ffce66aaff00fed5dd06deb09ed7eb28e522cdad4f29b78e594
+SIZE (icedtea-web-1.0.tar.gz) = 816184
+SHA256 (jtreg-4.1-bin-b02_21_may_2010.zip) = 9a9ca107e8004e8d29e6c708e03e347c38ac4d7fdfd1930a25d6dc5cf61ad0f4
+SIZE (jtreg-4.1-bin-b02_21_may_2010.zip) = 5038412
diff --git a/java/openjdk6/files/Makefile.plugin b/java/openjdk6/files/Makefile.plugin
index be3f8994866e..900845191796 100644
--- a/java/openjdk6/files/Makefile.plugin
+++ b/java/openjdk6/files/Makefile.plugin
@@ -33,6 +33,9 @@ STRIP= -s
.error "PLUGIN_VERSION not defined"
.endif
+PLUGIN_NAME=IcedTea-Web Plugin
+PACKAGE_URL=http://icedtea.classpath.org/wiki/IcedTea-Web
+
MOZILLA_VERSION!=${LOCALBASE}/bin/pkg-config --modversion mozilla-plugin
MOZILLA_VERSION2!=/usr/bin/printf "%d%02d%02d%02d" ${MOZILLA_VERSION:C/\./ /g}
@@ -42,7 +45,9 @@ PLUGIN_CFLAGS!= ${LOCALBASE}/bin/pkg-config --cflags ${PLUGIN_PKG_INC}
PLUGIN_LIBS!= ${LOCALBASE}/bin/pkg-config --libs ${PLUGIN_PKG_LIB}
CFLAGS+= -DJDK_UPDATE_VERSION="\"${JDK_UPDATE_VERSION}\"" \
+ -DPLUGIN_NAME="\"${PLUGIN_NAME}\"" \
-DPLUGIN_VERSION="\"${PLUGIN_VERSION}\"" \
+ -DPACKAGE_URL="\"${PACKAGE_URL}\"" \
-DMOZILLA_VERSION_COLLAPSED="${MOZILLA_VERSION2}" \
${PLUGIN_CFLAGS}
LDFLAGS+= ${PLUGIN_LIBS}
diff --git a/java/openjdk6/files/icedtea.patch b/java/openjdk6/files/icedtea.patch
deleted file mode 100644
index 571171c5a218..000000000000
--- a/java/openjdk6/files/icedtea.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-$FreeBSD$
-
-PR552: Support for FreeBSD's pthread implementation
-http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=552
-
-PR593: Increment of invalidated iterator in IcedTeaPluginUtils
-http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=593
-
---- icedtea6-1.9.4/plugin/icedteanp/IcedTeaNPPlugin.cc.orig 2010-10-04 17:26:45.636097000 -0400
-+++ icedtea6-1.9.4/plugin/icedteanp/IcedTeaNPPlugin.cc 2010-10-13 14:23:10.000000000 -0400
-@@ -2355,6 +2355,10 @@ NP_Shutdown (void)
- pthread_cancel(plugin_request_processor_thread2);
- pthread_cancel(plugin_request_processor_thread3);
-
-+ pthread_join(plugin_request_processor_thread1, NULL);
-+ pthread_join(plugin_request_processor_thread2, NULL);
-+ pthread_join(plugin_request_processor_thread3, NULL);
-+
- java_to_plugin_bus->unSubscribe(plugin_req_proc);
- plugin_to_java_bus->unSubscribe(java_req_proc);
- //internal_bus->unSubscribe(java_req_proc);
---- icedtea6-1.9.4/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc.orig 2010-08-06 07:05:21.996828000 -0400
-+++ icedtea6-1.9.4/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc 2010-10-13 14:23:10.000000000 -0400
-@@ -63,6 +63,12 @@ PluginRequestProcessor::PluginRequestPro
- this->pendingRequests = new std::map<pthread_t, uintmax_t>();
-
- internal_req_ref_counter = 0;
-+
-+ pthread_mutex_init(&message_queue_mutex, NULL);
-+ pthread_mutex_init(&syn_write_mutex, NULL);
-+ pthread_mutex_init(&tc_mutex, NULL);
-+
-+ pthread_cond_init(&cond_message_available, NULL);
- }
-
- /**
-@@ -77,6 +83,12 @@ PluginRequestProcessor::~PluginRequestPr
-
- if (pendingRequests)
- delete pendingRequests;
-+
-+ pthread_mutex_destroy(&message_queue_mutex);
-+ pthread_mutex_destroy(&syn_write_mutex);
-+ pthread_mutex_destroy(&tc_mutex);
-+
-+ pthread_cond_destroy(&cond_message_available);
- }
-
- /**
-@@ -701,6 +713,14 @@ PluginRequestProcessor::finalize(std::ve
- plugin_to_java_bus->post(response.c_str());
- }
-
-+static void
-+queue_cleanup(void* data)
-+{
-+
-+ pthread_mutex_destroy((pthread_mutex_t*) data);
-+
-+ PLUGIN_DEBUG("Queue processing stopped.\n");
-+}
-
- void*
- queue_processor(void* data)
-@@ -709,10 +729,14 @@ queue_processor(void* data)
- PluginRequestProcessor* processor = (PluginRequestProcessor*) data;
- std::vector<std::string*>* message_parts = NULL;
- std::string command;
-- pthread_mutex_t wait_mutex = PTHREAD_MUTEX_INITIALIZER; // This is needed for API compat. and is unused
-+ pthread_mutex_t wait_mutex = PTHREAD_MUTEX_INITIALIZER;
-
- PLUGIN_DEBUG("Queue processor initialized. Queue = %p\n", message_queue);
-
-+ pthread_mutex_init(&wait_mutex, NULL);
-+
-+ pthread_cleanup_push(queue_cleanup, (void*) &wait_mutex);
-+
- while (true)
- {
- pthread_mutex_lock(&message_queue_mutex);
-@@ -780,14 +804,17 @@ queue_processor(void* data)
-
- } else
- {
-- pthread_cond_wait(&cond_message_available, &wait_mutex);
-- pthread_testcancel();
-+ pthread_mutex_lock(&wait_mutex);
-+ pthread_cond_wait(&cond_message_available, &wait_mutex);
-+ pthread_mutex_unlock(&wait_mutex);
- }
-
- message_parts = NULL;
-+
-+ pthread_testcancel();
- }
-
-- PLUGIN_DEBUG("Queue processing stopped.\n");
-+ pthread_cleanup_pop(1);
- }
-
- /******************************************
---- icedtea6-1.9.4/plugin/icedteanp/IcedTeaPluginUtils.cc Tue Oct 19 17:55:59 2010 +0100
-+++ icedtea6-1.9.4/plugin/icedteanp/IcedTeaPluginUtils.cc Wed Nov 24 15:22:03 2010 -0500
-@@ -510,11 +510,15 @@ IcedTeaPluginUtilities::invalidateInstan
-
- std::map<void*,NPP>::iterator iterator;
-
-- for (iterator = instance_map->begin(); iterator != instance_map->end(); iterator++)
-+ for (iterator = instance_map->begin(); iterator != instance_map->end(); )
- {
- if ((*iterator).second == instance)
- {
-- instance_map->erase((*iterator).first);
-+ instance_map->erase(iterator++);
-+ }
-+ else
-+ {
-+ ++iterator;
- }
- }
- }
diff --git a/java/openjdk6/files/patch-nio-kqueue b/java/openjdk6/files/patch-nio-kqueue
deleted file mode 100644
index f24f731f1e28..000000000000
--- a/java/openjdk6/files/patch-nio-kqueue
+++ /dev/null
@@ -1,697 +0,0 @@
-$FreeBSD: /tmp/pcvs/ports/java/openjdk6/files/Attic/patch-nio-kqueue,v 1.1 2010-08-15 05:23:07 glewis Exp $
-
---- jdk/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java (revision 0)
-+++ jdk/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java (revision 0)
-@@ -0,0 +1,17 @@
-+package sun.nio.ch;
-+
-+import java.io.IOException;
-+import java.nio.channels.*;
-+import java.nio.channels.spi.*;
-+
-+public class KqueueSelectorProvider
-+ extends SelectorProviderImpl
-+{
-+ public AbstractSelector openSelector() throws IOException {
-+ return new KqueueSelectorImpl(this);
-+ }
-+
-+ public Channel inheritedChannel() throws IOException {
-+ return InheritedChannel.getChannel();
-+ }
-+}
---- jdk/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c (revision 0)
-+++ jdk/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c (revision 6)
-@@ -0,0 +1,186 @@
-+/*
-+ * Scratched by davidxu@freebsd.org
-+ */
-+
-+#include "jni.h"
-+#include "jni_util.h"
-+#include "jvm.h"
-+#include "jlong.h"
-+
-+#include "sun_nio_ch_KqueueArrayWrapper.h"
-+
-+#include <errno.h>
-+#include <sys/types.h>
-+#include <sys/event.h>
-+#include <sys/time.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+static int
-+restartable_kevent(int kqfd, struct kevent *changelist, int nchanges,
-+ struct kevent *eventlist, int nevents);
-+
-+static int
-+timeout_kevent(int kqfd, struct kevent *changelist, int nchanges,
-+ struct kevent *eventlist, int nevents, int timo);
-+
-+JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_kqueue
-+ (JNIEnv *env, jclass cls)
-+{
-+ int kqfd = kqueue();
-+ if (kqfd < 0) {
-+ JNU_ThrowIOExceptionWithLastError(env, "Error creating kqueue");
-+ return -1;
-+ }
-+ return kqfd;
-+}
-+
-+JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_register
-+ (JNIEnv *env, jclass cls, jint kqfd, jint fd, jshort filter)
-+{
-+ struct kevent ev;
-+ struct timespec ts;
-+
-+ ev.ident = fd;
-+ ev.filter = filter;
-+ ev.flags = EV_ADD;
-+ ev.fflags = 0;
-+ ev.data = 0;
-+ ev.udata = NULL;
-+ ts.tv_sec = 0;
-+ ts.tv_nsec = 0;
-+ if (kevent(kqfd, &ev, 1, NULL, 0, &ts) < 0) {
-+ JNU_ThrowIOExceptionWithLastError(env, "Error register kqueue event");
-+ }
-+}
-+
-+JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_kevent
-+ (JNIEnv *env, jclass cls, jint kqfd, jlong changelist_addr, jint nchanges,
-+ jlong eventlist_addr, jint nevents, jlong timeout)
-+{
-+ struct kevent *changelist = (struct kevent *)jlong_to_ptr(changelist_addr);
-+ struct kevent *eventlist = (struct kevent *)jlong_to_ptr(eventlist_addr);
-+ int result;
-+
-+ if (timeout < 0) {
-+ result = restartable_kevent(kqfd, changelist, nchanges,
-+ eventlist, nevents);
-+ } else {
-+ result = timeout_kevent(kqfd, changelist, nchanges, eventlist,
-+ nevents, timeout);
-+ }
-+
-+ if (result < 0) {
-+ JNU_ThrowIOExceptionWithLastError(env, "Error polling kevent");
-+ return -1;
-+ }
-+ return result;
-+}
-+
-+static int
-+restartable_kevent(int kqfd, struct kevent *changelist, int nchanges,
-+ struct kevent *eventlist, int nevents)
-+{
-+ int result;
-+
-+ for (;;) {
-+ result = kevent(kqfd, changelist, nchanges, eventlist,
-+ nevents, NULL);
-+ if (result == -1 && errno == EINTR) {
-+ continue;
-+ } else {
-+ return result;
-+ }
-+ }
-+}
-+
-+static int
-+timeout_kevent(int kqfd, struct kevent *changelist, int nchanges,
-+ struct kevent *eventlist, int nevents, int timo)
-+{
-+ struct timeval timeout, now, end;
-+ int result;
-+
-+ timeout.tv_sec = timo / 1000;
-+ timeout.tv_usec = (timo % 1000) * 1000;
-+ gettimeofday(&now, NULL);
-+ timeradd(&now, &timeout, &end);
-+
-+ for (;;) {
-+ struct timespec ts;
-+
-+ ts.tv_sec = timeout.tv_sec;
-+ ts.tv_nsec = timeout.tv_usec * 1000;
-+ result = kevent(kqfd, changelist, nchanges, eventlist, nevents,
-+ &ts);
-+ if (result == -1 && (errno == EINTR)) {
-+ gettimeofday(&now, NULL);
-+ if (timercmp(&now, &end, >=))
-+ return 0;
-+ timersub(&end, &now, &timeout);
-+ } else {
-+ return result;
-+ }
-+ }
-+}
-+
-+JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_keventSize
-+ (JNIEnv *env, jclass cls)
-+{
-+ return sizeof(struct kevent);
-+}
-+
-+JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_interrupt
-+ (JNIEnv *env, jclass cls, jint fd)
-+{
-+ int fakebuf[1];
-+
-+ fakebuf[0] = 1;
-+ if (write(fd, fakebuf, 1) < 0) {
-+ JNU_ThrowIOExceptionWithLastError(env,
-+ "Write to interrupt fd failed");
-+ }
-+}
-+
-+JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_putKevent
-+ (JNIEnv *env, jclass cls, jlong address, jint index, jint fd, jshort flags, jshort filter)
-+{
-+ struct kevent *ev = (struct kevent *)jlong_to_ptr(address);
-+
-+ ev[index].ident = fd;
-+ ev[index].flags = flags;
-+ ev[index].filter = filter;
-+ ev[index].fflags = 0;
-+ ev[index].data = 0;
-+ ev[index].udata = NULL;
-+}
-+
-+JNIEXPORT jshort JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventFilter
-+ (JNIEnv *env, jclass cls, jlong address, jint index)
-+{
-+ struct kevent *ev = (struct kevent *)jlong_to_ptr(address);
-+
-+ return ev[index].filter;
-+}
-+
-+JNIEXPORT jshort JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventFlags
-+ (JNIEnv *env, jclass cls, jlong address, jint index)
-+{
-+ struct kevent *ev = (struct kevent *)jlong_to_ptr(address);
-+
-+ return ev[index].flags;
-+}
-+
-+JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventIdent
-+ (JNIEnv *env, jclass cls, jlong address, jint index)
-+{
-+ struct kevent *ev = (struct kevent *)jlong_to_ptr(address);
-+
-+ return (int)ev[index].ident;
-+}
-+
-+#ifdef __cplusplus
-+}
-+#endif
---- jdk/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java (revision 0)
-+++ jdk/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java (revision 6)
-@@ -0,0 +1,231 @@
-+/*
-+ * Scratched by davidxu@freebsd.org
-+ */
-+
-+package sun.nio.ch;
-+
-+import sun.misc.*;
-+import java.io.IOException;
-+import java.util.HashMap;
-+import java.util.Set;
-+import java.util.Arrays;
-+
-+class KqueueArrayWrapper {
-+
-+ // Event masks copied from class AbstractPollArrayWrapper
-+ static final short POLLIN = 0x0001;
-+ static final short POLLOUT = 0x0004;
-+ static final short POLLERR = 0x0008;
-+ static final short POLLHUP = 0x0010;
-+ static final short POLLNVAL = 0x0020;
-+ static final short POLLREMOVE = 0x0800;
-+
-+ // Kevent filters
-+ static final short EVFILT_READ = -1;
-+ static final short EVFILT_WRITE = -2;
-+
-+ // Kevent flags
-+ static final short EV_ADD = 0x0001;
-+ static final short EV_DELETE = 0x0002;
-+ static final short EV_ERROR = 0x4000;
-+
-+ // Miscellaneous constants
-+ static final int SIZE_KEVENT = keventSize();
-+
-+ // Zero mask to unregister events from kqueue
-+ static final Integer ZERO_MASK = new Integer(0);
-+
-+ // Capacity increment of some arrays
-+ static final int capacityIncr = 100;
-+
-+ KqueueArrayWrapper() {
-+ int allocationSize;
-+
-+ // initial size of event array
-+ pollKeventSize = capacityIncr * 2;
-+ allocationSize = pollKeventSize * SIZE_KEVENT;
-+ pollKeventArray = new AllocatedNativeObject(allocationSize, true);
-+ kqfd = kqueue();
-+ }
-+
-+ // Machinery for remembering fd registration changes
-+ private HashMap<Integer, Integer> updateMap = new HashMap<Integer, Integer>();
-+ private int[] oldMasks = new int[capacityIncr];
-+
-+ // kevent array to receive
-+ private AllocatedNativeObject pollKeventArray;
-+
-+ // current size of pollKeventArray
-+ int pollKeventSize;
-+
-+ // the pollKeventSize should be larger than this
-+ int nextKeventSize;
-+
-+ // The fd of the kqueue()
-+ int kqfd;
-+
-+ // The fd of the interrupt line going out
-+ int outgoingInterruptFD;
-+
-+ // The fd of the interrupt line coming in
-+ int incomingInterruptFD;
-+
-+ // The index of the interrupt FD
-+ int interruptedIndex;
-+
-+ // Number of updated kevent entries
-+ int updated;
-+
-+ // ensure some array sizes are large enough with a given file handle
-+ void ensureFd(int fd) {
-+ ensureNextEventFd(fd);
-+ if (oldMasks.length < fd+1)
-+ oldMasks = Arrays.copyOf(oldMasks, fd + capacityIncr);
-+ }
-+
-+ void ensureNextEventFd(int fd) {
-+ // each file handle may have two filters, read and write.
-+ if (nextKeventSize / 2 < fd+1)
-+ nextKeventSize = (fd+1) * 2;
-+ }
-+
-+ void resizeEventBuffer() {
-+ if (nextKeventSize > pollKeventSize) {
-+ pollKeventArray.free();
-+ pollKeventSize = nextKeventSize + capacityIncr * 2;
-+ int allocationSize = pollKeventSize * SIZE_KEVENT;
-+ pollKeventArray = new AllocatedNativeObject(allocationSize, true);
-+ }
-+ }
-+
-+ void initInterrupt(int fd0, int fd1) {
-+ outgoingInterruptFD = fd1;
-+ incomingInterruptFD = fd0;
-+ ensureFd(fd0);
-+ register(kqfd, fd0, EVFILT_READ);
-+ }
-+
-+ int getReventOps(int i) {
-+ short filter = getKeventFilter(pollKeventArray.address(), i);
-+ short flags = getKeventFlags(pollKeventArray.address(), i);
-+ if ((flags & EV_ERROR) != 0)
-+ return POLLERR;
-+ if (filter == EVFILT_READ)
-+ return POLLIN;
-+ if (filter == EVFILT_WRITE)
-+ return POLLOUT;
-+ return (0);
-+ }
-+
-+ int getDescriptor(int i) {
-+ return getKeventIdent(pollKeventArray.address(), i);
-+ }
-+
-+ void setInterest(int fd, int mask) {
-+ if (fd <0)
-+ throw new IndexOutOfBoundsException("file handle less than 0");
-+ synchronized (updateMap) {
-+ ensureFd(fd);
-+ updateMap.put(new Integer(fd), new Integer(mask));
-+ }
-+ }
-+
-+ void release(int fd) {
-+ synchronized (updateMap) {
-+ updateMap.put(new Integer(fd), ZERO_MASK);
-+ }
-+ }
-+
-+ void closeKqueueFD() throws IOException {
-+ FileDispatcher.closeIntFD(kqfd);
-+ pollKeventArray.free();
-+ }
-+
-+ int poll(long timeout) {
-+ int changeCount = updateRegistrations();
-+ updated = kevent(kqfd, pollKeventArray.address(), changeCount,
-+ pollKeventArray.address(), pollKeventSize, timeout);
-+ for (int i = 0; i < updated; i++) {
-+ if (getDescriptor(i) == incomingInterruptFD) {
-+ interruptedIndex = i;
-+ interrupted = true;
-+ break;
-+ }
-+ }
-+ return updated;
-+ }
-+
-+ int updateRegistrations() {
-+ int index = 0;
-+ synchronized (updateMap) {
-+ resizeEventBuffer();
-+
-+ Set<Integer> s = updateMap.keySet();
-+ /*
-+ * Because resizeEventBuffer may reallocate event buffer,
-+ * we must retrieve fresh address here.
-+ */
-+ long address = pollKeventArray.address();
-+
-+ for (Integer fd : s) {
-+ Integer newmask = updateMap.get(fd);
-+ int oldmask = oldMasks[fd];
-+ if ((oldmask & POLLIN) != 0) {
-+ if ((newmask & POLLIN) == 0) {
-+ putKevent(address, index, fd.intValue(), EV_DELETE, EVFILT_READ);
-+ index++;
-+ }
-+ } else {
-+ if ((newmask & POLLIN) != 0) {
-+ putKevent(address, index, fd.intValue(), EV_ADD, EVFILT_READ);
-+ index++;
-+ }
-+ }
-+
-+ if ((oldmask & POLLOUT) != 0) {
-+ if ((newmask & POLLOUT) == 0) {
-+ putKevent(address, index, fd.intValue(), EV_DELETE, EVFILT_WRITE);
-+ index++;
-+ }
-+ } else {
-+ if ((newmask & POLLOUT) != 0) {
-+ putKevent(address, index, fd.intValue(), EV_ADD, EVFILT_WRITE);
-+ index++;
-+ }
-+ }
-+ oldMasks[fd] = newmask;
-+ }
-+ updateMap.clear();
-+ }
-+ return index;
-+ }
-+
-+ boolean interrupted = false;
-+
-+ public void interrupt() {
-+ interrupt(outgoingInterruptFD);
-+ }
-+
-+ public int interruptedIndex() {
-+ return interruptedIndex;
-+ }
-+
-+ boolean interrupted() {
-+ return interrupted;
-+ }
-+
-+ void clearInterrupted() {
-+ interrupted = false;
-+ }
-+
-+ private static native int kqueue();
-+ private static native void register(int kqfd, int fd, short filter);
-+ private static native int kevent(int kqfd, long changeList, int nchanges, long eventList,
-+ int nevents, long timeout);
-+ private static native int keventSize();
-+ private static native void interrupt(int fd);
-+ private static native void putKevent(long address, int index, int fd, short flag, short filter);
-+ private static native short getKeventFilter(long address, int index);
-+ private static native short getKeventFlags(long address, int index);
-+ private static native int getKeventIdent(long address, int index);
-+}
---- jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java (revision 0)
-+++ jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java (revision 6)
-@@ -0,0 +1,205 @@
-+/*
-+ * scratched by davidxu@freebsd.org
-+ */
-+
-+package sun.nio.ch;
-+
-+import java.io.IOException;
-+import java.nio.channels.*;
-+import java.nio.channels.spi.*;
-+import java.util.*;
-+import sun.misc.*;
-+
-+
-+/**
-+ * An implementation of Selector for FreeBSD.
-+ */
-+class KqueueSelectorImpl
-+ extends SelectorImpl
-+{
-+
-+ // File descriptors used for interrupt
-+ protected int fd0;
-+ protected int fd1;
-+
-+ // The kqueue object
-+ KqueueArrayWrapper kqueueWrapper;
-+
-+ // The number of valid channels in this Selector's poll array
-+ private int totalChannels;
-+
-+ // Maps from file descriptors to keys
-+ private HashMap fdToKey;
-+
-+ // True if this Selector has been closed
-+ private boolean closed = false;
-+
-+ // Lock for interrupt triggering and clearing
-+ private Object interruptLock = new Object();
-+ private boolean interruptTriggered = false;
-+
-+ // Trace number of file handles are updated.
-+ private BitSet updatedSet;
-+
-+ /**
-+ * Package private constructor called by factory method in
-+ * the abstract superclass Selector.
-+ */
-+ KqueueSelectorImpl(SelectorProvider sp) {
-+ super(sp);
-+ int[] fdes = new int[2];
-+ IOUtil.initPipe(fdes, false);
-+ fd0 = fdes[0];
-+ fd1 = fdes[1];
-+ kqueueWrapper = new KqueueArrayWrapper();
-+ totalChannels = 1;
-+ kqueueWrapper.initInterrupt(fd0, fd1);
-+ updatedSet = new BitSet();
-+ fdToKey = new HashMap();
-+ }
-+
-+ protected int doSelect(long timeout)
-+ throws IOException
-+ {
-+ if (closed)
-+ throw new ClosedSelectorException();
-+ processDeregisterQueue();
-+ try {
-+ begin();
-+ kqueueWrapper.poll(timeout);
-+ } finally {
-+ end();
-+ }
-+ processDeregisterQueue();
-+ int numKeysUpdated = updateSelectedKeys();
-+ if (kqueueWrapper.interrupted()) {
-+ // Clear the wakeup pipe
-+ synchronized (interruptLock) {
-+ kqueueWrapper.clearInterrupted();
-+ IOUtil.drain(fd0);
-+ interruptTriggered = false;
-+ }
-+ }
-+ return numKeysUpdated;
-+ }
-+
-+ /**
-+ * Update the keys whose fd's have been selected by the kqueue.
-+ * Add the ready keys to the ready queue.
-+ */
-+ private int updateSelectedKeys() {
-+ int entries = kqueueWrapper.updated;
-+ int numKeysUpdated = 0;
-+ SelectionKeyImpl ski;
-+ int fd;
-+ int i;
-+
-+ updatedSet.clear();
-+ for (i = 0; i < entries; i++) {
-+ fd = kqueueWrapper.getDescriptor(i);
-+ ski = (SelectionKeyImpl) fdToKey.get(new Integer(fd));
-+ // ski is null in the case of an interrupt
-+ if (ski != null)
-+ ski.nioReadyOps(0);
-+ }
-+
-+ for (i = 0; i < entries; i++) {
-+ fd = kqueueWrapper.getDescriptor(i);
-+ ski = (SelectionKeyImpl) fdToKey.get(new Integer(fd));
-+ // ski is null in the case of an interrupt
-+ if (ski != null) {
-+ int rOps = kqueueWrapper.getReventOps(i);
-+ if (selectedKeys.contains(ski)) {
-+ if (ski.channel.translateAndUpdateReadyOps(rOps, ski)) {
-+ if (!updatedSet.get(fd)) {
-+ updatedSet.set(fd);
-+ numKeysUpdated++;
-+ }
-+ }
-+ } else {
-+ ski.channel.translateAndUpdateReadyOps(rOps, ski);
-+ if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
-+ selectedKeys.add(ski);
-+ if (!updatedSet.get(fd)) {
-+ updatedSet.set(fd);
-+ numKeysUpdated++;
-+ }
-+ }
-+ }
-+ }
-+ }
-+ return numKeysUpdated;
-+ }
-+
-+ protected void implClose() throws IOException {
-+ if (!closed) {
-+ closed = true;
-+ FileDispatcher.closeIntFD(fd0);
-+ FileDispatcher.closeIntFD(fd1);
-+ if (kqueueWrapper != null) {
-+ kqueueWrapper.release(fd0);
-+ kqueueWrapper.closeKqueueFD();
-+ kqueueWrapper = null;
-+ selectedKeys = null;
-+
-+ // Deregister channels
-+ Iterator i = keys.iterator();
-+ while (i.hasNext()) {
-+ SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
-+ deregister(ski);
-+ SelectableChannel selch = ski.channel();
-+ if (!selch.isOpen() && !selch.isRegistered())
-+ ((SelChImpl)selch).kill();
-+ i.remove();
-+ }
-+ totalChannels = 0;
-+
-+ }
-+ fd0 = -1;
-+ fd1 = -1;
-+ }
-+ }
-+
-+ protected void implRegister(SelectionKeyImpl ski) {
-+ int fd = IOUtil.fdVal(ski.channel.getFD());
-+ fdToKey.put(new Integer(fd), ski);
-+ totalChannels++;
-+ keys.add(ski);
-+ }
-+
-+ protected void implDereg(SelectionKeyImpl ski) throws IOException {
-+ int i = ski.getIndex();
-+ assert (i >= 0);
-+ int fd = ski.channel.getFDVal();
-+ fdToKey.remove(new Integer(fd));
-+ kqueueWrapper.release(fd);
-+ totalChannels--;
-+ ski.setIndex(-1);
-+ keys.remove(ski);
-+ selectedKeys.remove(ski);
-+ deregister((AbstractSelectionKey)ski);
-+ SelectableChannel selch = ski.channel();
-+ if (!selch.isOpen() && !selch.isRegistered())
-+ ((SelChImpl)selch).kill();
-+ }
-+
-+ void putEventOps(SelectionKeyImpl sk, int ops) {
-+ int fd = IOUtil.fdVal(sk.channel.getFD());
-+ kqueueWrapper.setInterest(fd, ops);
-+ }
-+
-+ public Selector wakeup() {
-+ synchronized (interruptLock) {
-+ if (!interruptTriggered) {
-+ kqueueWrapper.interrupt();
-+ interruptTriggered = true;
-+ }
-+ }
-+ return this;
-+ }
-+
-+ static {
-+ Util.load();
-+ }
-+
-+}
---- jdk/make/java/nio/Makefile
-+++ jdk/make/java/nio/Makefile
-@@ -104,6 +104,28 @@
- sun/nio/ch/NativeThread.java
- endif # PLATFORM = linux
-
-+ifeq ($(PLATFORM), bsd)
-+FILES_java += \
-+ sun/nio/ch/AbstractPollSelectorImpl.java \
-+ sun/nio/ch/InheritedChannel.java \
-+ sun/nio/ch/KqueueArrayWrapper.java \
-+ sun/nio/ch/KqueueSelectorProvider.java \
-+ sun/nio/ch/KqueueSelectorImpl.java \
-+ sun/nio/ch/PollSelectorProvider.java \
-+ sun/nio/ch/PollSelectorImpl.java
-+
-+FILES_c += \
-+ KqueueArrayWrapper.c \
-+ PollArrayWrapper.c \
-+ InheritedChannel.c \
-+ NativeThread.c
-+
-+FILES_export += \
-+ sun/nio/ch/KqueueArrayWrapper.java \
-+ sun/nio/ch/InheritedChannel.java \
-+ sun/nio/ch/NativeThread.java
-+endif # PLATFORM = bsd
-+
- # Find platform-specific C source files
- #
- vpath %.c $(PLATFORM_SRC)/native/sun/nio/ch
---- jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java
-+++ jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java
-@@ -47,6 +47,10 @@
- public static SelectorProvider create() {
- String osname = AccessController.doPrivileged(
- new GetPropertyAction("os.name"));
-+ if ("FreeBSD".equals(osname)) {
-+ return new sun.nio.ch.KqueueSelectorProvider();
-+ }
-+
- if ("SunOS".equals(osname)) {
- return new sun.nio.ch.DevPollSelectorProvider();
- }
diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set
index eb525a21e2b8..c06da0870858 100644
--- a/java/openjdk6/files/patch-set
+++ b/java/openjdk6/files/patch-set
@@ -1,5 +1,5 @@
---- Makefile 2010-06-21 14:11:11.000000000 -0700
-+++ Makefile 2010-06-20 21:56:15.000000000 -0700
+--- Makefile 2011-01-20 18:50:10.000000000 -0500
++++ Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -236,6 +236,18 @@
clean: clobber
@@ -19,8 +19,8 @@
#
# Dev builds
#
---- corba/make/common/Defs-bsd.gmk 2010-06-27 11:37:43.000000000 -0700
-+++ corba/make/common/Defs-bsd.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/Defs-bsd.gmk 2011-02-01 17:20:23.000000000 -0500
++++ corba/make/common/Defs-bsd.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -40,18 +40,12 @@
# Get shared JDK settings
include $(BUILDDIR)/common/shared/Defs.gmk
@@ -142,8 +142,8 @@
override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
override SUN_CMM_SUBDIR =
override THREADS_FLAG = native
---- corba/make/common/Defs-linux.gmk 2010-06-21 14:11:20.000000000 -0700
-+++ corba/make/common/Defs-linux.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/Defs-linux.gmk 2011-01-20 18:50:17.000000000 -0500
++++ corba/make/common/Defs-linux.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -290,7 +290,7 @@
override LIBTHREAD =
override MOOT_PRIORITIES = true
@@ -153,8 +153,8 @@
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else
---- corba/make/common/Defs.gmk 2010-06-21 14:11:20.000000000 -0700
-+++ corba/make/common/Defs.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/Defs.gmk 2011-01-20 18:50:17.000000000 -0500
++++ corba/make/common/Defs.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -53,6 +53,24 @@
_OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH)
@@ -190,8 +190,8 @@
endif # PROGRAM
LDLIBS_COMMON += $(EXTRA_LIBS)
---- corba/make/common/Mapfile-vers.gmk 2010-06-21 14:11:20.000000000 -0700
-+++ corba/make/common/Mapfile-vers.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/Mapfile-vers.gmk 2011-01-20 18:50:17.000000000 -0500
++++ corba/make/common/Mapfile-vers.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -77,7 +77,7 @@
endif # PLATFORM
@@ -201,8 +201,8 @@
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?
---- corba/make/common/shared/Compiler-gcc.gmk 2010-06-21 14:11:20.000000000 -0700
-+++ corba/make/common/shared/Compiler-gcc.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/shared/Compiler-gcc.gmk 2011-01-20 18:50:17.000000000 -0500
++++ corba/make/common/shared/Compiler-gcc.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -100,6 +100,24 @@
endif
@@ -228,8 +228,8 @@
ifeq ($(PLATFORM), solaris)
# Settings specific to Solaris
---- corba/make/common/shared/Compiler.gmk 2010-06-21 14:11:20.000000000 -0700
-+++ corba/make/common/shared/Compiler.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/shared/Compiler.gmk 2011-01-20 18:50:17.000000000 -0500
++++ corba/make/common/shared/Compiler.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -42,6 +42,11 @@
override CC_VERSION = gcc
endif
@@ -242,8 +242,8 @@
# Get the compiler specific settings
include $(BUILDDIR)/common/shared/Compiler-$(CC_VERSION).gmk
---- corba/make/common/shared/Defs-bsd.gmk 2010-06-27 11:37:43.000000000 -0700
-+++ corba/make/common/shared/Defs-bsd.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/shared/Defs-bsd.gmk 2011-02-01 17:20:23.000000000 -0500
++++ corba/make/common/shared/Defs-bsd.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -54,7 +54,7 @@
endef
@@ -262,8 +262,8 @@
endif
# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
---- corba/make/common/shared/Defs-java.gmk 2010-06-21 14:11:20.000000000 -0700
-+++ corba/make/common/shared/Defs-java.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/shared/Defs-java.gmk 2011-01-20 18:50:17.000000000 -0500
++++ corba/make/common/shared/Defs-java.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -38,7 +38,7 @@
# Suspect this may not be needed anymore.
JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
@@ -273,8 +273,8 @@
endif
#
---- corba/make/common/shared/Defs-utils.gmk 2010-06-21 14:11:20.000000000 -0700
-+++ corba/make/common/shared/Defs-utils.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/shared/Defs-utils.gmk 2011-01-20 18:50:17.000000000 -0500
++++ corba/make/common/shared/Defs-utils.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -53,6 +53,13 @@
UTILS_DEVTOOL_PATH=$(USRBIN_PATH)
endif
@@ -322,8 +322,8 @@
+ TAR = $(UTILS_USR_BIN_PATH)tar
+ endif
+endif
---- corba/make/common/shared/Platform.gmk 2010-06-21 14:11:20.000000000 -0700
-+++ corba/make/common/shared/Platform.gmk 2010-06-20 21:56:15.000000000 -0700
+--- corba/make/common/shared/Platform.gmk 2011-01-20 18:50:17.000000000 -0500
++++ corba/make/common/shared/Platform.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -261,6 +261,76 @@
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
endif
@@ -426,8 +426,8 @@
fi)
MIN_VM_MEMORY := $(shell \
if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
---- hotspot/agent/make/Makefile 2010-06-21 14:12:09.000000000 -0700
-+++ hotspot/agent/make/Makefile 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/make/Makefile 2011-01-20 18:51:10.000000000 -0500
++++ hotspot/agent/make/Makefile 2011-02-01 18:02:44.000000000 -0500
@@ -52,6 +52,9 @@
sun.jvm.hotspot.compiler \
sun.jvm.hotspot.debugger \
@@ -468,8 +468,8 @@
sun/jvm/hotspot/runtime/ia64/*.java \
sun/jvm/hotspot/runtime/linux/*.java \
sun/jvm/hotspot/runtime/linux_amd64/*.java \
---- hotspot/agent/src/os/bsd/BsdDebuggerLocal.c 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/BsdDebuggerLocal.c 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/BsdDebuggerLocal.c 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/BsdDebuggerLocal.c 2011-02-01 17:46:59.000000000 -0500
@@ -22,6 +22,7 @@
*
*/
@@ -509,7 +509,7 @@
struct ps_prochandle* ph = get_proc_handle(env, this_obj);
if (get_lwp_regs(ph, lwp_id, &gregs) != true) {
-@@ -317,21 +317,21 @@
+@@ -317,26 +317,27 @@
#ifdef i386
#define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
@@ -546,7 +546,13 @@
#endif /* i386 */
-@@ -345,31 +345,31 @@
+ #if ia64
+ regs = (*env)->GetLongArrayElements(env, array, &isCopy);
++ int i;
+ for (i = 0; i < NPRGREG; i++ ) {
+ regs[i] = 0xDEADDEAD;
+ }
+@@ -345,31 +346,31 @@
#ifdef amd64
#define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg
@@ -603,8 +609,8 @@
#endif /* amd64 */
---- hotspot/agent/src/os/bsd/Makefile 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/Makefile 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/Makefile 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/Makefile 2011-02-01 17:46:59.000000000 -0500
@@ -22,7 +22,7 @@
#
#
@@ -614,7 +620,7 @@
GCC = gcc
JAVAH = ${JAVA_HOME}/bin/javah
-@@ -32,15 +32,16 @@
+@@ -32,25 +32,25 @@
libproc_impl.c \
ps_proc.c \
ps_core.c \
@@ -635,9 +641,11 @@
LIBSA = $(ARCH)/libsaproc.so
-@@ -49,8 +50,7 @@
+ all: $(LIBSA)
+
BsdDebuggerLocal.o: BsdDebuggerLocal.c
- $(JAVAH) -jni -classpath ../../../build/classes \
+- $(JAVAH) -jni -classpath ../../../build/classes \
++ $(JAVAH) -jni -classpath ../../../../../build/bsd-i586/hotspot/outputdir/bsd_i486_compiler2/generated/saclasses \
sun.jvm.hotspot.debugger.x86.X86ThreadContext \
- sun.jvm.hotspot.debugger.sparc.SPARCThreadContext \
- sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
@@ -645,7 +653,19 @@
$(GCC) $(CFLAGS) $<
.c.obj:
-@@ -72,14 +72,15 @@
+@@ -60,26 +60,19 @@
+ LFLAGS_LIBSA = -Xlinker --version-script=mapfile
+ endif
+
+-# If this is a --hash-style=gnu system, use --hash-style=both
+-# The gnu .hash section won't work on some Bsd systems like SuSE 10.
+-_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu')
+-ifneq ($(_HAS_HASH_STYLE_GNU),)
+- LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
+-endif
+-LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE)
+-
+ $(LIBSA): $(OBJS) mapfile
if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi
$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
@@ -665,13 +685,13 @@
+ rm -f test.o
+ -rmdir $(ARCH)
---- hotspot/agent/src/os/bsd/elfmacros.h 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/elfmacros.h 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/elfmacros.h 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/elfmacros.h 2011-02-01 17:46:59.000000000 -0500
@@ -25,16 +25,19 @@
#ifndef _ELFMACROS_H_
#define _ELFMACROS_H_
-+#define ELF_NHDR Elf_Note
++#define ELF_NHDR Elf_Note
+
#if defined(_LP64)
#define ELF_EHDR Elf64_Ehdr
@@ -702,8 +722,8 @@
#endif
---- hotspot/agent/src/os/bsd/hsearch_r.c 1969-12-31 16:00:00.000000000 -0800
-+++ hotspot/agent/src/os/bsd/hsearch_r.c 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/hsearch_r.c 1969-12-31 19:00:00.000000000 -0500
++++ hotspot/agent/src/os/bsd/hsearch_r.c 2011-02-01 17:46:59.000000000 -0500
@@ -0,0 +1,217 @@
+/* Copyright (C) 1993,1995-1997,2002,2005,2007,2008
+ Free Software Foundation, Inc.
@@ -922,8 +942,8 @@
+ *retval = NULL;
+ return 0;
+}
---- hotspot/agent/src/os/bsd/hsearch_r.h 1969-12-31 16:00:00.000000000 -0800
-+++ hotspot/agent/src/os/bsd/hsearch_r.h 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/hsearch_r.h 1969-12-31 19:00:00.000000000 -0500
++++ hotspot/agent/src/os/bsd/hsearch_r.h 2011-02-01 17:46:59.000000000 -0500
@@ -0,0 +1,42 @@
+/* Declarations for System V style searching functions.
+ Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
@@ -967,8 +987,8 @@
+extern void hdestroy_r (struct hsearch_data *__htab);
+
+#endif /* _HSEARCH_R_H_ */
---- hotspot/agent/src/os/bsd/libproc.h 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/libproc.h 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/libproc.h 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/libproc.h 2011-02-01 17:46:59.000000000 -0500
@@ -27,7 +27,8 @@
#include <unistd.h>
@@ -998,7 +1018,7 @@
unique again. We therefore use OSThread::_thread_id as unique identifier.
3. There is a unique LWP id under both thread libraries. libthread_db maps pthread_id
-@@ -74,19 +72,6 @@
+@@ -74,20 +72,7 @@
*************************************************************************************/
@@ -1015,9 +1035,11 @@
-#define user_regs_struct pt_regs
-#endif
-
- // This C bool type must be int for compatibility with Bsd calls and
+-// This C bool type must be int for compatibility with Bsd calls and
++// This C bool type must be int for compatibility with BSD calls and
// it would be a mistake to equivalence it to C++ bool on many platforms
+ typedef int bool;
@@ -118,7 +103,7 @@
lwpid_t get_lwp_id(struct ps_prochandle* ph, int index);
@@ -1027,30 +1049,76 @@
// get number of shared objects
int get_num_libs(struct ps_prochandle* ph);
---- hotspot/agent/src/os/bsd/libproc_impl.c 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/libproc_impl.c 2010-06-20 21:56:15.000000000 -0700
-@@ -177,8 +177,11 @@
- newlib->symtab = build_symtab(newlib->fd);
+--- hotspot/agent/src/os/bsd/libproc_impl.c 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/libproc_impl.c 2011-02-04 18:25:14.000000000 -0500
+@@ -174,10 +174,13 @@
+ return NULL;
+ }
+
+- newlib->symtab = build_symtab(newlib->fd, libname);
++ newlib->symtab = build_symtab(newlib->fd);
if (newlib->symtab == NULL) {
print_debug("symbol table build failed for %s\n", newlib->name);
-+ } else {
-+ print_debug("built symbol table for %s\n", newlib->name);
}
++ else {
++ print_debug("built symbol table for %s\n", newlib->name);
++ }
-+
// even if symbol table building fails, we add the lib_info.
// This is because we may need to read from the ELF file for core file
- // address read functionality. lookup_symbol checks for NULL symtab.
-@@ -272,7 +275,7 @@
+@@ -232,6 +235,24 @@
+ }
+ // add a thread to ps_prochandle
++#ifdef __FreeBSD__
++thread_info* add_thread_info(struct ps_prochandle* ph, lwpid_t lwp_id) {
++ thread_info* newthr;
++ if ( (newthr = (thread_info*) calloc(1, sizeof(thread_info))) == NULL) {
++ print_debug("can't allocate memory for thread_info\n");
++ return NULL;
++ }
++
++ // initialize thread info
++ newthr->lwp_id = lwp_id;
++
++ // add new thread to the list
++ newthr->next = ph->threads;
++ ph->threads = newthr;
++ ph->num_threads++;
++ return newthr;
++}
++#else
+ thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id) {
+ thread_info* newthr;
+ if ( (newthr = (thread_info*) calloc(1, sizeof(thread_info))) == NULL) {
+@@ -249,6 +270,7 @@
+ ph->num_threads++;
+ return newthr;
+ }
++#endif
+
+
+ // struct used for client data from thread_db callback
+@@ -270,10 +292,17 @@
+ return err;
+ }
+
++#ifdef __FreeBSD__
++ print_debug("thread_db : lwp %d\n", ti.ti_lid);
++
++ if (ptr->callback(ptr->ph, ti.ti_lid) != true)
++ return TD_ERR;
++#else
print_debug("thread_db : pthread %d (lwp %d)\n", ti.ti_tid, ti.ti_lid);
- if (ptr->callback(ptr->ph, ti.ti_tid, ti.ti_lid) != true)
+ if (ptr->callback(ptr->ph, (pthread_t)ti.ti_tid, ti.ti_lid) != true)
return TD_ERR;
++#endif
return TD_OK;
-@@ -324,7 +327,7 @@
+ }
+@@ -324,7 +353,7 @@
}
// get regs for a given lwp
@@ -1059,20 +1127,34 @@
return ph->ops->get_lwp_regs(ph, lwp_id, regs);
}
-@@ -376,9 +379,9 @@
+@@ -375,11 +404,6 @@
+ //--------------------------------------------------------------------------
// proc service functions
- // get process id
+-// get process id
-pid_t ps_getpid(struct ps_prochandle *ph) {
- return ph->pid;
-}
-+// pid_t ps_getpid(struct ps_prochandle *ph) {
-+// return ph->pid;
-+// }
-
+-
// ps_pglobal_lookup() looks up the symbol sym_name in the symbol table
// of the load object object_name in the target process identified by ph.
-@@ -403,6 +406,24 @@
+ // It returns the symbol's value as an address in the target process in
+@@ -392,17 +416,33 @@
+ }
+
+ // read "size" bytes info "buf" from address "addr"
+-ps_err_e ps_pdread(struct ps_prochandle *ph, psaddr_t addr,
+- void *buf, size_t size) {
++ps_err_e ps_pread(struct ps_prochandle *ph, psaddr_t addr,
++ void *buf, size_t size) {
+ return ph->ops->p_pread(ph, (uintptr_t) addr, buf, size)? PS_OK: PS_ERR;
+ }
+
+ // write "size" bytes of data to debuggee at address "addr"
+-ps_err_e ps_pdwrite(struct ps_prochandle *ph, psaddr_t addr,
+- const void *buf, size_t size) {
++ps_err_e ps_pwrite(struct ps_prochandle *ph, psaddr_t addr,
++ const void *buf, size_t size) {
return ph->ops->p_pwrite(ph, (uintptr_t)addr, buf, size)? PS_OK: PS_ERR;
}
@@ -1092,22 +1174,16 @@
+ va_end(alist);
+}
+
-+
-+
// ------------------------------------------------------------------------
// Functions below this point are not yet implemented. They are here only
// to make the linker happy.
-@@ -428,7 +449,18 @@
+@@ -427,8 +467,12 @@
+ return PS_OK;
}
- // new libthread_db of NPTL seem to require this symbol
+-// new libthread_db of NPTL seem to require this symbol
-ps_err_e ps_get_thread_area() {
- print_debug("ps_get_thread_area not implemented\n");
-+//ps_err_e ps_get_thread_area() {
-+// print_debug("ps_get_thread_area not implemented\n");
-+// return PS_OK;
-+//}
-+
+ps_err_e ps_lstop(struct ps_prochandle *ph, lwpid_t lid) {
+ print_debug("ps_lstop not implemented\n");
+ return PS_OK;
@@ -1117,9 +1193,8 @@
+ print_debug("ps_pcontinue not implemented\n");
return PS_OK;
}
-+
---- hotspot/agent/src/os/bsd/libproc_impl.h 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/libproc_impl.h 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/libproc_impl.h 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/libproc_impl.h 2011-02-07 16:41:58.000000000 -0500
@@ -47,7 +47,7 @@
typedef struct thread_info {
lwpid_t lwp_id;
@@ -1140,61 +1215,143 @@
} ps_prochandle_ops;
// the ps_prochandle
---- hotspot/agent/src/os/bsd/mapfile 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/mapfile 2010-06-20 21:56:15.000000000 -0700
-@@ -41,15 +41,21 @@
- Java_sun_jvm_hotspot_debugger_bsd_BsdDebuggerLocal_getThreadIntegerRegisterSet0;
-
+@@ -79,7 +81,7 @@
+ struct core_data {
+ int core_fd; // file descriptor of core file
+ int exec_fd; // file descriptor of exec file
+- int interp_fd; // file descriptor of interpreter (ld-bsd.so.2)
++ int interp_fd; // file descriptor of interpreter (ld-elf.so.1)
+ // part of the class sharing workaround
+ int classes_jsa_fd; // file descriptor of class share archive
+ uintptr_t dynamic_addr; // address of dynamic section of a.out
+@@ -107,7 +109,11 @@
+ void print_debug(const char* format,...);
+ bool is_debug();
+
++#ifdef __FreeBSD__
++typedef bool (*thread_info_callback)(struct ps_prochandle* ph, lwpid_t lwpid);
++#else
+ typedef bool (*thread_info_callback)(struct ps_prochandle* ph, pthread_t pid, lwpid_t lwpid);
++#endif
+
+ // reads thread info using libthread_db and calls above callback for each thread
+ bool read_thread_info(struct ps_prochandle* ph, thread_info_callback cb);
+@@ -120,7 +126,11 @@
+ uintptr_t base);
+
+ // adds a new thread to threads list, returns NULL on failure
++#ifdef __FreeBSD__
++thread_info* add_thread_info(struct ps_prochandle* ph, lwpid_t lwp_id);
++#else
+ thread_info* add_thread_info(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id);
++#endif
+
+ // a test for ELF signature without using libelf
+ bool is_elf_file(int fd);
+--- hotspot/agent/src/os/bsd/mapfile 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/mapfile 2011-02-01 17:46:59.000000000 -0500
+@@ -43,13 +43,17 @@
# proc_service.h functions - to be used by libthread_db
-- ps_getpid;
+ ps_getpid;
ps_pglobal_lookup;
- ps_pdread;
- ps_pdwrite;
+ ps_pread;
+ ps_pwrite;
-+ ps_linfo;
-+ ps_plog;
-+
-+ # dummy implementations of proc_service.h functions
-+ # presumably unused but needed to avoid undefined symbols
-+ # export LIBSAPROC_DEBUG=1 to see if actually used
ps_lsetfpregs;
ps_lsetregs;
ps_lgetfpregs;
ps_lgetregs;
- ps_get_thread_area;
-+ ps_lstop;
+ ps_lcontinue;
++ ps_lgetxmmregs;
++ ps_lsetxmmregs;
++ ps_lstop;
++ ps_linfo;
# used by attach test program
init_libproc;
---- hotspot/agent/src/os/bsd/proc_service.h 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/proc_service.h 2010-06-20 21:56:15.000000000 -0700
-@@ -22,6 +22,8 @@
- *
- */
-
-+#error Should be using system proc_service.h
-+
- #ifndef _PROC_SERVICE_H_
- #define _PROC_SERVICE_H_
-
-@@ -55,11 +57,11 @@
- const char *sym_name, psaddr_t *sym_addr);
-
- // read "size" bytes of data from debuggee at address "addr"
+--- hotspot/agent/src/os/bsd/proc_service.h 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/proc_service.h 2011-02-01 17:46:59.000000000 -0500
+@@ -1,76 +0,0 @@
+-/*
+- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- *
+- */
+-
+-#ifndef _PROC_SERVICE_H_
+-#define _PROC_SERVICE_H_
+-
+-#include <stdio.h>
+-#include <thread_db.h>
+-
+-// Bsd does not have the proc service library, though it does provide the
+-// thread_db library which can be used to manipulate threads without having
+-// to know the details of BsdThreads or NPTL
+-
+-// copied from Solaris "proc_service.h"
+-typedef enum {
+- PS_OK, /* generic "call succeeded" */
+- PS_ERR, /* generic error */
+- PS_BADPID, /* bad process handle */
+- PS_BADLID, /* bad lwp identifier */
+- PS_BADADDR, /* bad address */
+- PS_NOSYM, /* p_lookup() could not find given symbol */
+- PS_NOFREGS /* FPU register set not available for given lwp */
+-} ps_err_e;
+-
+-// ps_getpid() is only defined on Bsd to return a thread's process ID
+-pid_t ps_getpid(struct ps_prochandle *ph);
+-
+-// ps_pglobal_lookup() looks up the symbol sym_name in the symbol table
+-// of the load object object_name in the target process identified by ph.
+-// It returns the symbol's value as an address in the target process in
+-// *sym_addr.
+-
+-ps_err_e ps_pglobal_lookup(struct ps_prochandle *ph, const char *object_name,
+- const char *sym_name, psaddr_t *sym_addr);
+-
+-// read "size" bytes of data from debuggee at address "addr"
-ps_err_e ps_pdread(struct ps_prochandle *ph, psaddr_t addr,
-+ps_err_e ps_pread(struct ps_prochandle *ph, psaddr_t addr,
- void *buf, size_t size);
-
- // write "size" bytes of data to debuggee at address "addr"
+- void *buf, size_t size);
+-
+-// write "size" bytes of data to debuggee at address "addr"
-ps_err_e ps_pdwrite(struct ps_prochandle *ph, psaddr_t addr,
-+ps_err_e ps_pwrite(struct ps_prochandle *ph, psaddr_t addr,
- const void *buf, size_t size);
-
- ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, const prfpregset_t *fpregs);
---- hotspot/agent/src/os/bsd/ps_core.c 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/ps_core.c 2010-06-20 21:56:15.000000000 -0700
+- const void *buf, size_t size);
+-
+-ps_err_e ps_lsetfpregs(struct ps_prochandle *ph, lwpid_t lid, const prfpregset_t *fpregs);
+-
+-ps_err_e ps_lsetregs(struct ps_prochandle *ph, lwpid_t lid, const prgregset_t gregset);
+-
+-ps_err_e ps_lgetfpregs(struct ps_prochandle *ph, lwpid_t lid, prfpregset_t *fpregs);
+-
+-ps_err_e ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset);
+-
+-// new libthread_db of NPTL seem to require this symbol
+-ps_err_e ps_get_thread_area();
+-
+-#endif /* _PROC_SERVICE_H_ */
+--- hotspot/agent/src/os/bsd/ps_core.c 2011-02-04 17:40:15.000000000 -0500
++++ hotspot/agent/src/os/bsd/ps_core.c 2011-02-04 18:22:28.000000000 -0500
@@ -142,6 +142,7 @@
map->next = ph->core->class_share_maps;
@@ -1203,6 +1360,17 @@
}
// Return the map_info for the given virtual address. We keep a sorted
+@@ -228,8 +229,8 @@
+
+ // 4991491 NOTICE These are C++ bool's in filemap.hpp and must match up with
+ // the C type matching the C++ bool type on any given platform. For
+- // Hotspot on Bsd we assume the corresponding C type is char but
+- // licensees on Bsd versions may need to adjust the type of these fields.
++ // Hotspot on BSD we assume the corresponding C type is char but
++ // licensees on BSD versions may need to adjust the type of these fields.
+ char _read_only; // read only space?
+ char _allow_exec; // executable code in space?
+
@@ -240,7 +241,7 @@
static bool read_jboolean(struct ps_prochandle* ph, uintptr_t addr, jboolean* pvalue) {
@@ -1230,7 +1398,28 @@
return false;
if (i < size - 1)
buf[i] = c;
-@@ -507,12 +508,12 @@
+@@ -296,7 +297,6 @@
+ uintptr_t base = 0, useSharedSpacesAddr = 0;
+ uintptr_t sharedArchivePathAddrAddr = 0, sharedArchivePathAddr = 0;
+ jboolean useSharedSpaces = 0;
+- map_info* mi = 0;
+
+ memset(classes_jsa, 0, sizeof(classes_jsa));
+ jvm_name = lib->name;
+@@ -306,9 +306,9 @@
+ return false;
+ }
+
+- // Hotspot vm types are not exported to build this library. So
+- // using equivalent type jboolean to read the value of
+- // UseSharedSpaces which is same as hotspot type "bool".
++ // Hotspot vm types are not exported to build this library. So
++ // using equivalent type jboolean to read the value of
++ // UseSharedSpaces which is same as hotspot type "bool".
+ if (read_jboolean(ph, useSharedSpacesAddr, &useSharedSpaces) != true) {
+ print_debug("can't read the value of 'UseSharedSpaces' flag\n");
+ return false;
+@@ -507,12 +507,12 @@
}
static bool core_get_lwp_regs(struct ps_prochandle* ph, lwpid_t lwp_id,
@@ -1245,22 +1434,37 @@
return true;
}
thr = thr->next;
-@@ -520,6 +521,13 @@
+@@ -520,11 +520,17 @@
return false;
}
-+
+static bool core_get_lwp_info(struct ps_prochandle *ph, lwpid_t lwp_id, void *linfo) {
+ print_debug("core_get_lwp_info not implemented\n");
+ return false;
+}
+
-+
static ps_prochandle_ops core_ops = {
.release= core_release,
.p_pread= core_read_data,
-@@ -539,52 +547,52 @@
+ .p_pwrite= core_write_data,
+- .get_lwp_regs= core_get_lwp_regs
++ .get_lwp_regs= core_get_lwp_regs,
++ .get_lwp_info= core_get_lwp_info
+ };
+
+ // read regs and create thread from NT_PRSTATUS entries from core file
+@@ -534,57 +540,62 @@
+ prstatus_t* prstat = (prstatus_t*) buf;
+ thread_info* newthr;
+ print_debug("got integer regset for lwp %d\n", prstat->pr_pid);
++#ifdef __FreeBSD__
++ if((newthr = add_thread_info(ph, prstat->pr_pid)) == NULL)
++ return false;
++#else
+ // we set pthread_t to -1 for core dump
+ if((newthr = add_thread_info(ph, (pthread_t) -1, prstat->pr_pid)) == NULL)
return false;
++#endif
// copy regs
- memcpy(&newthr->regs, prstat->pr_reg, sizeof(struct user_regs_struct));
@@ -1349,7 +1553,39 @@
#endif
}
-@@ -826,7 +834,7 @@
+@@ -656,7 +667,7 @@
+ * contains a set of saved /proc structures), and PT_LOAD (which
+ * represents a memory mapping from the process's address space).
+ *
+- * Difference b/w Solaris PT_NOTE and Bsd PT_NOTE:
++ * Difference b/w Solaris PT_NOTE and BSD PT_NOTE:
+ *
+ * In Solaris there are two PT_NOTE segments the first PT_NOTE (if present)
+ * contains /proc structs in the pre-2.6 unstructured /proc format. the last
+@@ -666,10 +677,10 @@
+ * integer register set among other stuff. For each LWP, we have one lwpstatus
+ * entry that has integer regset for that LWP.
+ *
+- * Bsd threads are actually 'clone'd processes. To support core analysis
+- * of "multithreaded" process, Bsd creates more than one pstatus (called
++ * Linux threads are actually 'clone'd processes. To support core analysis
++ * of "multithreaded" process, Linux creates more than one pstatus (called
+ * "prstatus") entry in PT_NOTE. Each prstatus entry has integer regset for one
+- * "thread". Please refer to Bsd kernel src file 'fs/binfmt_elf.c', in particular
++ * "thread". Please refer to Linux kernel src file 'fs/binfmt_elf.c', in particular
+ * function "elf_core_dump".
+ */
+
+@@ -725,7 +736,7 @@
+ return false;
+ }
+
+-// process segments from interpreter (ld.so or ld-bsd.so)
++// process segments from interpreter (ld-elf.so.1)
+ static bool read_interp_segments(struct ps_prochandle* ph) {
+ ELF_EHDR interp_ehdr;
+
+@@ -826,7 +837,7 @@
dyn.d_tag = DT_NULL;
while (dyn.d_tag != DT_DEBUG) {
@@ -1358,12 +1594,12 @@
print_debug("can't read debug info from _DYNAMIC\n");
return false;
}
-@@ -836,19 +844,23 @@
+@@ -836,23 +847,27 @@
// we have got Dyn entry with DT_DEBUG
debug_base = dyn.d_un.d_ptr;
// at debug_base we have struct r_debug. This has first link map in r_map field
- if (ps_pdread(ph, (psaddr_t) debug_base + FIRST_LINK_MAP_OFFSET,
-+ if (ps_pread(ph, (psaddr_t) debug_base + FIRST_LINK_MAP_OFFSET,
++ if (ps_pread(ph, (psaddr_t) debug_base + FIRST_LINK_MAP_OFFSET,
&first_link_map_addr, sizeof(uintptr_t)) != PS_OK) {
print_debug("can't read first link map address\n");
return false;
@@ -1373,7 +1609,7 @@
- if (ps_pdread(ph, (psaddr_t) debug_base + LD_BASE_OFFSET, &ld_base_addr,
+ // XXX: There is no r_ldbase member on BSD
+/*
-+ if (ps_pread(ph, (psaddr_t) debug_base + LD_BASE_OFFSET, &ld_base_addr,
++ if (ps_pread(ph, (psaddr_t) debug_base + LD_BASE_OFFSET, &ld_base_addr,
sizeof(uintptr_t)) != PS_OK) {
print_debug("can't read ld base address\n");
return false;
@@ -1384,7 +1620,12 @@
print_debug("interpreter base address is 0x%lx\n", ld_base_addr);
-@@ -870,14 +882,14 @@
+- // now read segments from interp (i.e ld.so or ld-bsd.so)
++ // now read segments from interp (i.e ld-elf.so.1)
+ if (read_interp_segments(ph) != true)
+ return false;
+
+@@ -870,26 +885,23 @@
// address mentioned in shared object and the actual virtual base where runtime
// linker loaded it. We use "base diff" in read_lib_segments call below.
@@ -1397,11 +1638,25 @@
// read address of the name
- if (ps_pdread(ph, (psaddr_t) link_map_addr + LINK_MAP_NAME_OFFSET,
-+ if (ps_pread(ph, (psaddr_t) link_map_addr + LINK_MAP_NAME_OFFSET,
++ if (ps_pread(ph, (psaddr_t) link_map_addr + LINK_MAP_NAME_OFFSET,
&lib_name_addr, sizeof(uintptr_t)) != PS_OK) {
print_debug("can't read address of shared object name\n");
return false;
-@@ -921,7 +933,7 @@
+ }
+
+ // read name of the shared object
+- lib_name[0] = '\0';
+- if (lib_name_addr != 0 &&
+- read_string(ph, (uintptr_t) lib_name_addr, lib_name, sizeof(lib_name)) != true) {
++ if (read_string(ph, (uintptr_t) lib_name_addr, lib_name, sizeof(lib_name)) != true) {
+ print_debug("can't read shared object name\n");
+- // don't let failure to read the name stop opening the file. If something is really wrong
+- // it will fail later.
++ return false;
+ }
+
+ if (lib_name[0] != '\0') {
+@@ -924,7 +936,7 @@
}
// read next link_map address
@@ -1410,7 +1665,7 @@
&link_map_addr, sizeof(uintptr_t)) != PS_OK) {
print_debug("can't read next link in link_map\n");
return false;
-@@ -935,7 +947,6 @@
+@@ -938,7 +950,6 @@
struct ps_prochandle* Pgrab_core(const char* exec_file, const char* core_file) {
ELF_EHDR core_ehdr;
ELF_EHDR exec_ehdr;
@@ -1418,8 +1673,8 @@
struct ps_prochandle* ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle));
if (ph == NULL) {
---- hotspot/agent/src/os/bsd/ps_proc.c 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/ps_proc.c 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/ps_proc.c 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/ps_proc.c 2011-02-04 18:23:14.000000000 -0500
@@ -22,20 +22,22 @@
*
*/
@@ -1451,7 +1706,12 @@
// This file has the libproc implementation specific to live process
// For core files, refer to ps_core.c
-@@ -54,46 +56,46 @@
+@@ -50,255 +52,365 @@
+
+ // read "size" bytes of data from "addr" within the target process.
+ // unlike the standard ptrace() function, process_read_data() can handle
+-// unaligned address - alignment check, if required, should be done
++// unaligned address - alignment check, if required, should be done
// before calling process_read_data.
static bool process_read_data(struct ps_prochandle* ph, uintptr_t addr, char *buf, size_t size) {
@@ -1474,8 +1734,9 @@
}
for (; aligned_addr != addr; aligned_addr++, ptr++);
- for (; ((intptr_t)aligned_addr % sizeof(long)) && aligned_addr < end_addr;
+- aligned_addr++)
+ for (; ((intptr_t)aligned_addr % sizeof(int)) && aligned_addr < end_addr;
- aligned_addr++)
++ aligned_addr++)
*(buf++) = *(ptr++);
}
@@ -1511,8 +1772,17 @@
+ print_debug("ptrace(PT_READ_D, ..) failed for %d bytes @ %lx\n", size, addr);
return false;
}
- for (; aligned_addr != end_addr; aligned_addr++)
-@@ -108,45 +110,28 @@
+- for (; aligned_addr != end_addr; aligned_addr++)
++ for (; aligned_addr != end_addr; aligned_addr++)
+ *(buf++) = *(ptr++);
+ }
+ return true;
+ }
+
+ // null implementation for write
+-static bool process_write_data(struct ps_prochandle* ph,
++static bool process_write_data(struct ps_prochandle* ph,
+ uintptr_t addr, const char *buf , size_t size) {
return false;
}
@@ -1553,12 +1823,12 @@
- return false;
-#endif
+}
-+
+
+// fill in ptrace_lwpinfo for lid
+static bool process_get_lwp_info(struct ps_prochandle *ph, lwpid_t lwp_id, void *linfo) {
+ errno = 0;
+ ptrace(PT_LWPINFO, lwp_id, linfo, sizeof(struct ptrace_lwpinfo));
-
++
+ return (errno == 0)? true: false;
}
@@ -1569,18 +1839,66 @@
print_debug("ptrace(PTRACE_ATTACH, ..) failed for %d\n", pid);
return false;
} else {
-@@ -155,10 +140,6 @@
+ int ret;
+ int status;
do {
- // Wait for debuggee to stop.
+- // Wait for debuggee to stop.
++ // Wait for debuggee to stop.
ret = waitpid(pid, &status, 0);
- if (ret == -1 && errno == ECHILD) {
- // try cloned process.
- ret = waitpid(pid, &status, __WALL);
- }
if (ret >= 0) {
- if (WIFSTOPPED(status)) {
- // Debuggee stopped.
-@@ -191,85 +172,222 @@
+- if (WIFSTOPPED(status)) {
+- // Debuggee stopped.
+- return true;
++ if (WIFSTOPPED(status)) {
++ // Debuggee stopped.
++ return true;
+ } else {
+- print_debug("waitpid(): Child process exited/terminated (status = 0x%x)\n", status);
+- return false;
+- }
++ print_debug("waitpid(): Child process exited/terminated (status = 0x%x)\n", status);
++ return false;
++ }
+ } else {
+- switch (errno) {
+- case EINTR:
++ switch (errno) {
++ case EINTR:
+ continue;
+- break;
+- case ECHILD:
+- print_debug("waitpid() failed. Child process pid (%d) does not exist \n", pid);
+- break;
+- case EINVAL:
+- print_debug("waitpid() failed. Invalid options argument.\n");
+- break;
+- default:
+- print_debug("waitpid() failed. Unexpected error %d\n",errno);
++ break;
++ case ECHILD:
++ print_debug("waitpid() failed. Child process pid (%d) does not exist \n", pid);
++ break;
++ case EINVAL:
++ print_debug("waitpid() failed. Invalid options argument.\n");
++ break;
++ default:
++ print_debug("waitpid() failed. Unexpected error %d\n",errno);
+ }
+ return false;
+- }
++ }
+ } while(true);
+- }
+-}
+-
++ }
++}
++
+ // -------------------------------------------------------
// functions for obtaining library information
// -------------------------------------------------------
@@ -1609,9 +1927,15 @@
-
- return i;
+// callback for read_thread_info
++#ifdef __FreeBSD__
++static bool add_new_thread(struct ps_prochandle* ph, lwpid_t lwp_id) {
++ return add_thread_info(ph, lwp_id) != NULL;
++}
++#else
+static bool add_new_thread(struct ps_prochandle* ph, pthread_t pthread_id, lwpid_t lwp_id) {
+ return add_thread_info(ph, pthread_id, lwp_id) != NULL;
}
++#endif
+#if defined(__FreeBSD__) && __FreeBSD_version < 701000
/*
@@ -1767,7 +2091,11 @@
- if (nwords > 5 && find_lib(ph, word[5]) == false) {
- intptr_t base;
- lib_info* lib;
+-#ifdef _LP64
- sscanf(word[0], "%lx", &base);
+-#else
+- sscanf(word[0], "%x", &base);
+-#endif
- if ((lib = add_lib_info(ph, word[5], (uintptr_t)base)) == NULL)
+ for (i = 0; i < cnt; i++) {
+ kve = &freep[i];
@@ -1863,10 +2191,10 @@
print_debug("ptrace(PTRACE_DETACH, ..) failed for %d\n", pid);
return false;
} else {
-@@ -277,17 +395,8 @@
- }
- }
-
+ return true;
+- }
+-}
+-
-// detach all pids of a ps_prochandle
-static void detach_all_pids(struct ps_prochandle* ph) {
- thread_info* thr = ph->threads;
@@ -1874,25 +2202,36 @@
- ptrace_detach(thr->lwp_id);
- thr = thr->next;
- }
--}
--
++ }
+ }
+
static void process_cleanup(struct ps_prochandle* ph) {
- detach_all_pids(ph);
+ ptrace_detach(ph->pid);
}
static ps_prochandle_ops process_ops = {
-@@ -321,21 +430,14 @@
+ .release= process_cleanup,
+ .p_pread= process_read_data,
+ .p_pwrite= process_write_data,
+- .get_lwp_regs= process_get_lwp_regs
++ .get_lwp_regs= process_get_lwp_regs,
++ .get_lwp_info= process_get_lwp_info
+ };
+
+ // attach to the process. One and only one exposed stuff
+@@ -325,21 +437,14 @@
// read library info and symbol tables, must do this before attaching threads,
// as the symbols in the pthread library will be used to figure out
// the list of threads within the same process.
- read_lib_info(ph);
+-
+ if (read_lib_info(ph) != true) {
+ ptrace_detach(pid);
+ free(ph);
+ return NULL;
+ }
-
++
// read thread info
read_thread_info(ph, add_new_thread);
@@ -1909,8 +2248,8 @@
- }
return ph;
}
---- hotspot/agent/src/os/bsd/salibelf.c 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/salibelf.c 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/os/bsd/salibelf.c 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/salibelf.c 2011-02-01 17:46:59.000000000 -0500
@@ -25,6 +25,7 @@
#include "salibelf.h"
#include <stdlib.h>
@@ -1919,9 +2258,9 @@
extern void print_debug(const char*,...);
---- hotspot/agent/src/os/bsd/symtab.c 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/symtab.c 2010-06-20 21:56:15.000000000 -0700
-@@ -23,13 +23,14 @@
+--- hotspot/agent/src/os/bsd/symtab.c 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/symtab.c 2011-02-01 17:46:59.000000000 -0500
+@@ -23,10 +23,10 @@
*/
#include <unistd.h>
@@ -1933,66 +2272,321 @@
#include "symtab.h"
#include "salibelf.h"
-+extern void print_debug(const char*,...);
+@@ -53,276 +53,9 @@
+ struct hsearch_data *hash_table;
+ } symtab_t;
- // ----------------------------------------------------
- // functions for symbol lookups
-@@ -56,7 +57,6 @@
- // read symbol table from given fd.
- struct symtab* build_symtab(int fd) {
+-
+-// Directory that contains global debuginfo files. In theory it
+-// should be possible to change this, but in a Java environment there
+-// is no obvious place to put a user interface to do it. Maybe this
+-// could be set with an environment variable.
+-static const char debug_file_directory[] = "/usr/lib/debug";
+-
+-/* The CRC used in gnu_debuglink, retrieved from
+- http://sourceware.org/gdb/current/onlinedocs/gdb/Separate-Debug-Files.html#Separate-Debug-Files. */
+-unsigned int gnu_debuglink_crc32 (unsigned int crc,
+- unsigned char *buf, size_t len)
+-{
+- static const unsigned int crc32_table[256] =
+- {
+- 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+- 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+- 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+- 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+- 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+- 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+- 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+- 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+- 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+- 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+- 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+- 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+- 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+- 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+- 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+- 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+- 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+- 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+- 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+- 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+- 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+- 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+- 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+- 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+- 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+- 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+- 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+- 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+- 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+- 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+- 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+- 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+- 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+- 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+- 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+- 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+- 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+- 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+- 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+- 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+- 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+- 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+- 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+- 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+- 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+- 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+- 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+- 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+- 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+- 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+- 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+- 0x2d02ef8d
+- };
+- unsigned char *end;
+-
+- crc = ~crc & 0xffffffff;
+- for (end = buf + len; buf < end; ++buf)
+- crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+- return ~crc & 0xffffffff;
+-}
+-
+-/* Open a debuginfo file and check its CRC. If it exists and the CRC
+- matches return its fd. */
+-static int
+-open_debug_file (const char *pathname, unsigned int crc)
+-{
+- unsigned int file_crc = 0;
+- unsigned char buffer[8 * 1024];
+-
+- int fd = pathmap_open(pathname);
+-
+- if (fd < 0)
+- return -1;
+-
+- lseek(fd, 0, SEEK_SET);
+-
+- for (;;) {
+- int len = read(fd, buffer, sizeof buffer);
+- if (len <= 0)
+- break;
+- file_crc = gnu_debuglink_crc32(file_crc, buffer, len);
+- }
+-
+- if (crc == file_crc)
+- return fd;
+- else {
+- close(fd);
+- return -1;
+- }
+-}
+-
+-/* Find an ELF section. */
+-static struct elf_section *find_section_by_name(char *name,
+- int fd,
+- ELF_EHDR *ehdr,
+- ELF_SHDR *shbuf,
+- struct elf_section *scn_cache)
+-{
+- ELF_SHDR* cursct = NULL;
+- char *strtab;
+- int cnt;
+-
+- if (scn_cache[ehdr->e_shstrndx].c_data == NULL) {
+- if ((scn_cache[ehdr->e_shstrndx].c_data
+- = read_section_data(fd, ehdr, cursct)) == NULL) {
+- return NULL;
+- }
+- }
+-
+- strtab = scn_cache[ehdr->e_shstrndx].c_data;
+-
+- for (cursct = shbuf, cnt = 0;
+- cnt < ehdr->e_shnum;
+- cnt++, cursct++) {
+- if (strcmp(cursct->sh_name + strtab, name) == 0) {
+- scn_cache[cnt].c_data = read_section_data(fd, ehdr, cursct);
+- return &scn_cache[cnt];
+- }
+- }
+-
+- return NULL;
+-}
+-
+-/* Look for a ".gnu_debuglink" section. If one exists, try to open a
+- suitable debuginfo file. */
+-static int open_file_from_debug_link(const char *name,
+- int fd,
+- ELF_EHDR *ehdr,
+- ELF_SHDR *shbuf,
+- struct elf_section *scn_cache)
+-{
+- int debug_fd;
+- struct elf_section *debug_link = find_section_by_name(".gnu_debuglink", fd, ehdr,
+- shbuf, scn_cache);
+- if (debug_link == NULL)
+- return -1;
+- char *debug_filename = debug_link->c_data;
+- int offset = (strlen(debug_filename) + 4) >> 2;
+- static unsigned int crc;
+- crc = ((unsigned int*)debug_link->c_data)[offset];
+- char *debug_pathname = malloc(strlen(debug_filename)
+- + strlen(name)
+- + strlen(".debug/")
+- + strlen(debug_file_directory)
+- + 2);
+- strcpy(debug_pathname, name);
+- char *last_slash = strrchr(debug_pathname, '/');
+- if (last_slash == NULL)
+- return -1;
+-
+- /* Look in the same directory as the object. */
+- strcpy(last_slash+1, debug_filename);
+-
+- debug_fd = open_debug_file(debug_pathname, crc);
+- if (debug_fd >= 0) {
+- free(debug_pathname);
+- return debug_fd;
+- }
+-
+- /* Look in a subdirectory named ".debug". */
+- strcpy(last_slash+1, ".debug/");
+- strcat(last_slash, debug_filename);
+-
+- debug_fd = open_debug_file(debug_pathname, crc);
+- if (debug_fd >= 0) {
+- free(debug_pathname);
+- return debug_fd;
+- }
+-
+- /* Look in /usr/lib/debug + the full pathname. */
+- strcpy(debug_pathname, debug_file_directory);
+- strcat(debug_pathname, name);
+- last_slash = strrchr(debug_pathname, '/');
+- strcpy(last_slash+1, debug_filename);
+-
+- debug_fd = open_debug_file(debug_pathname, crc);
+- if (debug_fd >= 0) {
+- free(debug_pathname);
+- return debug_fd;
+- }
+-
+- free(debug_pathname);
+- return -1;
+-}
+-
+-static struct symtab* build_symtab_internal(int fd, const char *filename, bool try_debuginfo);
+-
+-/* Look for a ".gnu_debuglink" section. If one exists, try to open a
+- suitable debuginfo file and read a symbol table from it. */
+-static struct symtab *build_symtab_from_debug_link(const char *name,
+- int fd,
+- ELF_EHDR *ehdr,
+- ELF_SHDR *shbuf,
+- struct elf_section *scn_cache)
+-{
+- fd = open_file_from_debug_link(name, fd, ehdr, shbuf, scn_cache);
+-
+- if (fd >= 0) {
+- struct symtab *symtab = build_symtab_internal(fd, NULL, /* try_debuginfo */ false);
+- close(fd);
+- return symtab;
+- }
+-
+- return NULL;
+-}
+-
+-// Given a build_id, find the associated debuginfo file
+-static char *
+-build_id_to_debug_filename (size_t size, unsigned char *data)
+-{
+- char *filename, *s;
+-
+- filename = malloc(strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
+- + 2 * size + (sizeof ".debug" - 1) + 1);
+- s = filename + sprintf (filename, "%s/.build-id/", debug_file_directory);
+- if (size > 0)
+- {
+- size--;
+- s += sprintf (s, "%02x", *data++);
+- }
+- if (size > 0)
+- *s++ = '/';
+- while (size-- > 0)
+- s += sprintf (s, "%02x", *data++);
+- strcpy (s, ".debug");
+-
+- return filename;
+-}
+-
+-// Read a build ID note. Try to open any associated debuginfo file
+-// and return its symtab
+-static struct symtab* build_symtab_from_build_id(Elf64_Nhdr *note)
+-{
+- int fd;
+- struct symtab *symtab = NULL;
+-
+- unsigned char *bytes
+- = (unsigned char*)(note+1) + note->n_namesz;
+- unsigned char *filename
+- = (build_id_to_debug_filename (note->n_descsz, bytes));
+-
+- fd = pathmap_open(filename);
+- if (fd >= 0) {
+- symtab = build_symtab_internal(fd, NULL, /* try_debuginfo */ false);
+- close(fd);
+- }
+- free(filename);
+-
+- return symtab;
+-}
+-
+-// read symbol table from given fd. If try_debuginfo) is true, also
+-// try to open an associated debuginfo file
+-static struct symtab* build_symtab_internal(int fd, const char *filename, bool try_debuginfo) {
++// read symbol table from given fd.
++struct symtab* build_symtab(int fd) {
ELF_EHDR ehdr;
- char *names = NULL;
struct symtab* symtab = NULL;
// Reading of elf header
-@@ -65,18 +65,22 @@
+@@ -331,8 +64,9 @@
ELF_SHDR* shbuf = NULL;
ELF_SHDR* cursct = NULL;
ELF_PHDR* phbuf = NULL;
- ELF_PHDR* phdr = NULL;
+- int sym_section = SHT_DYNSYM;
+ int symtab_found = 0;
+ int dynsym_found = 0;
+ uint32_t symsection = SHT_SYMTAB;
uintptr_t baseaddr = (uintptr_t)-1;
- lseek(fd, (off_t)0L, SEEK_SET);
- if (! read_elf_header(fd, &ehdr)) {
-+ print_debug("not an ELF header\n");
- // not an elf
- return NULL;
- }
-
- // read ELF header
- if ((shbuf = read_section_header_table(fd, &ehdr)) == NULL) {
-+ print_debug("can't read section header\n");
- goto quit;
- }
-
-@@ -85,23 +89,35 @@
- scn_cache = (struct elf_section *)
- calloc(ehdr.e_shnum * sizeof(struct elf_section), 1);
- if (scn_cache == NULL) {
-+ print_debug("can't read scn_cache\n");
- goto quit;
- }
+@@ -357,23 +91,30 @@
for (cursct = shbuf, cnt = 0; cnt < ehdr.e_shnum; cnt++) {
scn_cache[cnt].c_shdr = cursct;
-- if (cursct->sh_type == SHT_SYMTAB || cursct->sh_type == SHT_STRTAB) {
+- if (cursct->sh_type == SHT_SYMTAB || cursct->sh_type == SHT_STRTAB
+- || cursct->sh_type == SHT_NOTE || cursct->sh_type == SHT_DYNSYM) {
+ if (cursct->sh_type == SHT_SYMTAB ||
+ cursct->sh_type == SHT_STRTAB ||
+ cursct->sh_type == SHT_DYNSYM) {
if ( (scn_cache[cnt].c_data = read_section_data(fd, &ehdr, cursct)) == NULL) {
-+ print_debug("can't read section_data\n");
goto quit;
}
}
+- if (cursct->sh_type == SHT_SYMTAB) {
+- // Full symbol table available so use that
+- sym_section = cursct->sh_type;
+- }
++
+ if (cursct->sh_type == SHT_SYMTAB)
-+ symtab_found++;
++ symtab_found++;
+
+ if (cursct->sh_type == SHT_DYNSYM)
-+ dynsym_found++;
++ dynsym_found++;
++
cursct++;
}
@@ -2002,32 +2596,237 @@
for (cnt = 1; cnt < ehdr.e_shnum; cnt++) {
ELF_SHDR *shdr = scn_cache[cnt].c_shdr;
-- if (shdr->sh_type == SHT_SYMTAB) {
+- if (shdr->sh_type == sym_section) {
+ if (shdr->sh_type == symsection) {
ELF_SYM *syms;
int j, n, rslt;
size_t size;
-@@ -113,6 +129,7 @@
- // guarantee(symtab == NULL, "multiple symtab");
- symtab = (struct symtab*)calloc(1, sizeof(struct symtab));
- if (symtab == NULL) {
-+ print_debug("can't allocate symtab\n");
- goto quit;
- }
- // the symbol table
---- hotspot/agent/src/os/bsd/test.c 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/os/bsd/test.c 2010-06-20 21:56:15.000000000 -0700
+@@ -435,45 +176,6 @@
+ }
+ }
+
+- // Look for a separate debuginfo file.
+- if (try_debuginfo) {
+-
+- // We prefer a debug symtab to an object's own symtab, so look in
+- // the debuginfo file. We stash a copy of the old symtab in case
+- // there is no debuginfo.
+- struct symtab* prev_symtab = symtab;
+- symtab = NULL;
+-
+-#ifdef NT_GNU_BUILD_ID
+- // First we look for a Build ID
+- for (cursct = shbuf, cnt = 0;
+- symtab == NULL && cnt < ehdr.e_shnum;
+- cnt++) {
+- if (cursct->sh_type == SHT_NOTE) {
+- Elf64_Nhdr *note = (Elf64_Nhdr *)scn_cache[cnt].c_data;
+- if (note->n_type == NT_GNU_BUILD_ID) {
+- symtab = build_symtab_from_build_id(note);
+- }
+- }
+- cursct++;
+- }
+-#endif
+-
+- // Then, if that doesn't work, the debug link
+- if (symtab == NULL) {
+- symtab = build_symtab_from_debug_link(filename, fd, &ehdr, shbuf,
+- scn_cache);
+- }
+-
+- // If we still haven't found a symtab, use the object's own symtab.
+- if (symtab != NULL) {
+- if (prev_symtab != NULL)
+- destroy_symtab(prev_symtab);
+- } else {
+- symtab = prev_symtab;
+- }
+- }
+-
+ quit:
+ if (shbuf) free(shbuf);
+ if (phbuf) free(phbuf);
+@@ -488,11 +190,6 @@
+ return symtab;
+ }
+
+-struct symtab* build_symtab(int fd, const char *filename) {
+- return build_symtab_internal(fd, filename, /* try_debuginfo */ true);
+-}
+-
+-
+ void destroy_symtab(struct symtab* symtab) {
+ if (!symtab) return;
+ if (symtab->strs) free(symtab->strs);
+--- hotspot/agent/src/os/bsd/symtab.h 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/symtab.h 2011-02-01 17:46:59.000000000 -0500
+@@ -32,7 +32,7 @@
+ struct symtab;
+
+ // build symbol table for a given ELF file descriptor
+-struct symtab* build_symtab(int fd, const char *filename);
++struct symtab* build_symtab(int fd);
+
+ // destroy the symbol table
+ void destroy_symtab(struct symtab* symtab);
+--- hotspot/agent/src/os/bsd/test.c 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/os/bsd/test.c 2011-02-01 17:46:59.000000000 -0500
@@ -44,7 +44,7 @@
}
default: {
- printf("usage %s <pid> or %s <exec file> <core file>\n");
-+ fprintf(stderr, "usage %s <pid> or %s <exec file> <core file>\n");
++ fprintf(stderr, "usage %s <pid> or %s <exec file> <core file>\n", argv[0], argv[0]);
return 1;
}
}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2011-01-20 18:51:10.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2011-02-01 17:46:59.000000000 -0500
+@@ -28,6 +28,7 @@
+ import java.net.*;
+ import java.rmi.*;
+ import sun.jvm.hotspot.debugger.*;
++import sun.jvm.hotspot.debugger.bsd.*;
+ import sun.jvm.hotspot.debugger.dbx.*;
+ import sun.jvm.hotspot.debugger.proc.*;
+ import sun.jvm.hotspot.debugger.remote.*;
+@@ -337,6 +338,8 @@
+ setupDebuggerWin32();
+ } else if (os.equals("linux")) {
+ setupDebuggerLinux();
++ } else if (os.equals("bsd")) {
++ setupDebuggerBsd();
+ } else {
+ // Add support for more operating systems here
+ throw new DebuggerException("Operating system " + os + " not yet supported");
+@@ -392,6 +395,10 @@
+ db = new HotSpotTypeDataBase(machDesc,
+ new LinuxVtblAccess(debugger, jvmLibNames),
+ debugger, jvmLibNames);
++ } else if (os.equals("bsd")) {
++ db = new HotSpotTypeDataBase(machDesc,
++ new BsdVtblAccess(debugger, jvmLibNames),
++ debugger, jvmLibNames);
+ } else {
+ throw new DebuggerException("OS \"" + os + "\" not yet supported (no VtblAccess yet)");
+ }
+@@ -557,6 +564,8 @@
+ setupJVMLibNamesWin32();
+ } else if (os.equals("linux")) {
+ setupJVMLibNamesLinux();
++ } else if (os.equals("bsd")) {
++ setupJVMLibNamesBsd();
+ } else {
+ throw new RuntimeException("Unknown OS type");
+ }
+@@ -638,6 +647,31 @@
+ jvmLibNames = new String[] { "libjvm.so", "libjvm_g.so" };
+ }
+
++ //
++ // BSD
++ //
++
++ private void setupDebuggerBsd() {
++ setupJVMLibNamesBsd();
++
++ if (cpu.equals("x86")) {
++ machDesc = new MachineDescriptionIntelX86();
++ } else if (cpu.equals("amd64")) {
++ machDesc = new MachineDescriptionAMD64();
++ } else {
++ throw new DebuggerException("BSD only supported on x86/amd64");
++ }
++
++ BsdDebuggerLocal dbg = new BsdDebuggerLocal(machDesc, !isServer);
++ debugger = dbg;
++
++ attachDebugger();
++ }
++
++ private void setupJVMLibNamesBsd() {
++ jvmLibNames = new String[] { "libjvm.so", "libjvm_g.so" };
++ }
++
+ /** Convenience routine which should be called by per-platform
+ debugger setup. Should not be called when startupMode is
+ REMOTE_MODE. */
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2011-01-20 18:51:11.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2011-02-01 17:46:59.000000000 -0500
+@@ -29,6 +29,7 @@
+ import java.rmi.*;
+ import sun.jvm.hotspot.*;
+ import sun.jvm.hotspot.debugger.*;
++import sun.jvm.hotspot.debugger.bsd.*;
+ import sun.jvm.hotspot.debugger.dbx.*;
+ import sun.jvm.hotspot.debugger.proc.*;
+ import sun.jvm.hotspot.debugger.cdbg.*;
+@@ -516,6 +517,8 @@
+ setupDebuggerWin32();
+ } else if (os.equals("linux")) {
+ setupDebuggerLinux();
++ } else if (os.equals("bsd")) {
++ setupDebuggerBsd();
+ } else {
+ // Add support for more operating systems here
+ throw new DebuggerException("Operating system " + os + " not yet supported");
+@@ -567,6 +570,9 @@
+ } else if (os.equals("linux")) {
+ db = new HotSpotTypeDataBase(machDesc, new LinuxVtblAccess(debugger, jvmLibNames),
+ debugger, jvmLibNames);
++ } else if (os.equals("bsd")) {
++ db = new HotSpotTypeDataBase(machDesc, new BsdVtblAccess(debugger, jvmLibNames),
++ debugger, jvmLibNames);
+ } else {
+ throw new DebuggerException("OS \"" + os + "\" not yet supported (no VtblAccess implemented yet)");
+ }
+@@ -739,6 +745,8 @@
+ setupJVMLibNamesWin32();
+ } else if (os.equals("linux")) {
+ setupJVMLibNamesLinux();
++ } else if (os.equals("bsd")) {
++ setupJVMLibNamesBsd();
+ } else {
+ throw new RuntimeException("Unknown OS type");
+ }
+@@ -822,6 +830,34 @@
+ setupJVMLibNamesSolaris();
+ }
+
++ //
++ // BSD
++ //
++
++ private void setupDebuggerBsd() {
++ setupJVMLibNamesBsd();
++
++ if (cpu.equals("x86")) {
++ machDesc = new MachineDescriptionIntelX86();
++ } else if (cpu.equals("amd64")) {
++ machDesc = new MachineDescriptionAMD64();
++ } else {
++ throw new DebuggerException("BSD only supported on x86/amd64");
++ }
++
++ // Note we do not use a cache for the local debugger in server
++ // mode; it will be taken care of on the client side (once remote
++ // debugging is implemented).
++
++ debugger = new BsdDebuggerLocal(machDesc, !isServer);
++ attachDebugger();
++ }
++
++ private void setupJVMLibNamesBsd() {
++ // same as solaris
++ setupJVMLibNamesSolaris();
++ }
++
+ /** Convenience routine which should be called by per-platform
+ debugger setup. Should not be called when startupMode is
+ REMOTE_MODE. */
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java 2011-02-01 17:46:59.000000000 -0500
@@ -30,10 +30,8 @@
import sun.jvm.hotspot.debugger.cdbg.*;
import sun.jvm.hotspot.debugger.x86.*;
@@ -2053,8 +2852,8 @@
} else {
throw new DebuggerException(cpu + " is not yet supported");
}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java 2010-06-27 11:37:43.000000000 -0700
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java 2011-02-01 17:46:59.000000000 -0500
@@ -26,9 +26,7 @@
import sun.jvm.hotspot.debugger.*;
@@ -2076,190 +2875,30 @@
} else {
throw new RuntimeException("cpu " + cpu + " is not yet supported");
}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/ia64/BsdIA64ThreadContext.java 1969-12-31 16:00:00.000000000 -0800
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/ia64/BsdIA64ThreadContext.java 2010-06-20 21:56:06.000000000 -0700
-@@ -0,0 +1,46 @@
-+/*
-+ * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ *
-+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-+ * or visit www.oracle.com if you need additional information or have any
-+ * questions.
-+ *
-+ */
-+
-+package sun.jvm.hotspot.debugger.bsd.ia64;
-+
-+import sun.jvm.hotspot.debugger.*;
-+import sun.jvm.hotspot.debugger.ia64.*;
-+import sun.jvm.hotspot.debugger.bsd.*;
-+
-+public class BsdIA64ThreadContext extends IA64ThreadContext {
-+ private BsdDebugger debugger;
-+
-+ public BsdIA64ThreadContext(BsdDebugger debugger) {
-+ super();
-+ this.debugger = debugger;
-+ }
-+
-+ public void setRegisterAsAddress(int index, Address value) {
-+ setRegister(index, debugger.getAddressValue(value));
-+ }
-+
-+ public Address getRegisterAsAddress(int index) {
-+ return debugger.newAddress(getRegister(index));
-+ }
-+}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/sparc/BsdSPARCCFrame.java 1969-12-31 16:00:00.000000000 -0800
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/sparc/BsdSPARCCFrame.java 2010-06-20 21:56:06.000000000 -0700
-@@ -0,0 +1,81 @@
-+/*
-+ * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ *
-+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-+ * or visit www.oracle.com if you need additional information or have any
-+ * questions.
-+ *
-+ */
-+
-+package sun.jvm.hotspot.debugger.bsd.sparc;
-+
-+import sun.jvm.hotspot.debugger.*;
-+import sun.jvm.hotspot.debugger.sparc.*;
-+import sun.jvm.hotspot.debugger.bsd.*;
-+import sun.jvm.hotspot.debugger.cdbg.*;
-+import sun.jvm.hotspot.debugger.cdbg.basic.*;
-+
-+final public class BsdSPARCCFrame extends BasicCFrame {
-+ // package/class internals only
-+
-+ public BsdSPARCCFrame(BsdDebugger dbg, Address sp, Address pc, int address_size) {
-+ super(dbg.getCDebugger());
-+ this.sp = sp;
-+ this.pc = pc;
-+ this.dbg = dbg;
-+ this.address_size=address_size;
-+ if (address_size==8) SPARC_STACK_BIAS = 0x7ff;
-+ else SPARC_STACK_BIAS = 0x0;
-+ }
-+
-+ // override base class impl to avoid ELF parsing
-+ public ClosestSymbol closestSymbolToPC() {
-+ // try native lookup in debugger.
-+ return dbg.lookup(dbg.getAddressValue(pc()));
-+ }
-+
-+ public Address pc() {
-+ return pc;
-+ }
-+
-+ public Address localVariableBase() {
-+ return sp;
-+ }
-+
-+ public CFrame sender() {
-+ if (sp == null) {
-+ return null;
-+ }
-+
-+ Address nextSP = sp.getAddressAt( SPARCThreadContext.R_SP * address_size + SPARC_STACK_BIAS);
-+ if (nextSP == null) {
-+ return null;
-+ }
-+ Address nextPC = sp.getAddressAt(SPARCThreadContext.R_O7 * address_size + SPARC_STACK_BIAS);
-+ if (nextPC == null) {
-+ return null;
-+ }
-+ return new BsdSPARCCFrame(dbg, nextSP, nextPC,address_size);
-+ }
-+
-+ public static int SPARC_STACK_BIAS;
-+ private static int address_size;
-+ private Address pc;
-+ private Address sp;
-+ private BsdDebugger dbg;
-+}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/sparc/BsdSPARCThreadContext.java 1969-12-31 16:00:00.000000000 -0800
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/sparc/BsdSPARCThreadContext.java 2010-06-20 21:56:06.000000000 -0700
-@@ -0,0 +1,46 @@
-+/*
-+ * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-+ *
-+ * This code is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 only, as
-+ * published by the Free Software Foundation.
-+ *
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-+ * version 2 for more details (a copy is included in the LICENSE file that
-+ * accompanied this code).
-+ *
-+ * You should have received a copy of the GNU General Public License version
-+ * 2 along with this work; if not, write to the Free Software Foundation,
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-+ *
-+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-+ * or visit www.oracle.com if you need additional information or have any
-+ * questions.
-+ *
-+ */
-+
-+package sun.jvm.hotspot.debugger.bsd.sparc;
-+
-+import sun.jvm.hotspot.debugger.*;
-+import sun.jvm.hotspot.debugger.sparc.*;
-+import sun.jvm.hotspot.debugger.bsd.*;
-+
-+public class BsdSPARCThreadContext extends SPARCThreadContext {
-+ private BsdDebugger debugger;
-+
-+ public BsdSPARCThreadContext(BsdDebugger debugger) {
-+ super();
-+ this.debugger = debugger;
-+ }
-+
-+ public void setRegisterAsAddress(int index, Address value) {
-+ setRegister(index, debugger.getAddressValue(value));
-+ }
-+
-+ public Address getRegisterAsAddress(int index) {
-+ return debugger.newAddress(getRegister(index));
-+ }
-+}
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java 2010-06-21 14:12:12.000000000 -0700
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java 2011-01-20 18:51:12.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/ConnectorImpl.java 2011-02-07 13:53:33.000000000 -0500
+@@ -217,7 +217,7 @@
+ }
+
+ protected void checkNativeLink(SecurityManager sm, String os) {
+- if (os.equals("SunOS") || os.equals("Linux")) {
++ if (os.equals("SunOS") || os.equals("Linux") || os.equals("FreeBSD")) {
+ // link "saproc" - SA native library on SunOS and Linux?
+ sm.checkLink("saproc");
+ } else if (os.startsWith("Windows")) {
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAPIDAttachingConnector.java 2011-01-20 18:51:12.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SAPIDAttachingConnector.java 2011-02-07 13:46:44.000000000 -0500
+@@ -66,7 +66,7 @@
+ try {
+ // Whether the caller can perform link against SA native library?
+ checkNativeLink(sm, os);
+- if (os.equals("SunOS") || os.equals("Linux")) {
++ if (os.equals("SunOS") || os.equals("Linux") || os.equals("FreeBSD")) {
+ // Whether the caller can read /proc/<pid> file?
+ sm.checkRead("/proc/" + pid);
+ }
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java 2011-01-20 18:51:13.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java 2011-02-01 17:46:59.000000000 -0500
@@ -37,6 +37,8 @@
import sun.jvm.hotspot.runtime.linux_ia64.LinuxIA64JavaThreadPDAccess;
import sun.jvm.hotspot.runtime.linux_amd64.LinuxAMD64JavaThreadPDAccess;
@@ -2283,8 +2922,8 @@
}
if (access == null) {
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd/BsdSignals.java 2010-06-27 11:37:43.000000000 -0700
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd/BsdSignals.java 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd/BsdSignals.java 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd/BsdSignals.java 2011-02-01 17:46:59.000000000 -0500
@@ -28,37 +28,36 @@
private static String[] signalNames = {
"", /* No signal 0 */
@@ -2345,11 +2984,18 @@
};
public static String getSignalName(int sigNum) {
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd_x86/BsdSignals.java 2010-06-27 11:37:43.000000000 -0700
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd_x86/BsdSignals.java 2010-06-20 21:56:15.000000000 -0700
-@@ -32,33 +32,32 @@
- "SIGQUIT", /* quit (ASCII FS) */
- "SIGILL", /* illegal instruction (not reset when caught) */
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd_x86/BsdSignals.java 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/bsd_x86/BsdSignals.java 2011-02-01 17:46:59.000000000 -0500
+@@ -28,37 +28,36 @@
+ private static String[] signalNames = {
+ "", /* No signal 0 */
+ "SIGHUP", /* hangup */
+- "SIGINT", /* interrupt (rubout) */
+- "SIGQUIT", /* quit (ASCII FS) */
+- "SIGILL", /* illegal instruction (not reset when caught) */
++ "SIGINT", /* interrupt */
++ "SIGQUIT", /* quit */
++ "SIGILL", /* illegal instr. (not reset when caught) */
"SIGTRAP", /* trace trap (not reset when caught) */
- "SIGABRT", /* used by abort, replace SIGIOT in the future */
- "SIGIOT",
@@ -2400,8 +3046,8 @@
};
public static String getSignalName(int sigNum) {
---- hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java 2010-06-21 14:12:13.000000000 -0700
-+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java 2011-01-20 18:51:13.000000000 -0500
++++ hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java 2011-02-01 17:46:59.000000000 -0500
@@ -37,6 +37,14 @@
return "solaris";
} else if (os.equals("Linux")) {
@@ -2417,65 +3063,89 @@
} else if (os.startsWith("Windows")) {
return "win32";
} else {
---- hotspot/make/Makefile 2010-06-21 14:12:13.000000000 -0700
-+++ hotspot/make/Makefile 2010-06-26 22:18:02.000000000 -0700
-@@ -290,11 +290,32 @@
- # Shared Library
+--- hotspot/make/Makefile 2011-01-20 18:51:14.000000000 -0500
++++ hotspot/make/Makefile 2011-02-01 17:46:59.000000000 -0500
+@@ -321,28 +321,28 @@
ifneq ($(OSNAME),windows)
ifeq ($(ZERO_BUILD), true)
-+ ifeq ($(OSNAME),bsd)
-+# BSD-specific LIBRARY_SUFFIX build option
+ ifeq ($(SHARK_BUILD), true)
+-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(SHARK_DIR)/%.so
++$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX)
+ $(install-file)
+-$(EXPORT_SERVER_DIR)/%.so: $(SHARK_DIR)/%.so
++$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX)
+ $(install-file)
+ else
+-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(ZERO_DIR)/%.so
+$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX)
-+ $(install-file)
-+$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX)
-+ $(install-file)
-+ else
- $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(ZERO_DIR)/%.so
$(install-file)
- $(EXPORT_SERVER_DIR)/%.so: $(ZERO_DIR)/%.so
+-$(EXPORT_SERVER_DIR)/%.so: $(ZERO_DIR)/%.so
++$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file)
-+ endif
+ endif
else
-+ ifeq ($(OSNAME),bsd)
-+# BSD-specific LIBRARY_SUFFIX build option
+-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C1_DIR)/%.so
++$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX)
+ $(install-file)
+-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so
+$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
-+ $(install-file)
+ $(install-file)
+-$(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so
+$(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX)
-+ $(install-file)
+ $(install-file)
+-$(EXPORT_CLIENT_DIR)/64/%.so: $(C1_DIR)/%.so
+$(EXPORT_CLIENT_DIR)/64/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX)
-+ $(install-file)
-+$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
-+ $(install-file)
-+$(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
-+ $(install-file)
-+ else
- $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so
$(install-file)
- $(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so
-@@ -305,6 +326,7 @@
+-$(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so
++$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file)
- $(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so
+-$(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so
++$(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file)
-+ endif
endif
endif
+--- hotspot/make/bsd/Makefile 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/Makefile 2011-02-01 17:46:59.000000000 -0500
+@@ -39,11 +39,11 @@
+ # One can set ALT_BOOTDIR or BOOTDIR to point to a jdk that runs on
+ # an architecture that differs from the target architecture, as long
+ # as the bootstrap jdk runs under the same flavor of OS as the target
+-# (i.e., if the target is bsd, point to a jdk that runs on a bsd
++# (i.e., if the target is linux, point to a jdk that runs on a linux
+ # box). In order to use such a bootstrap jdk, set the make variable
+ # REMOTE to the desired remote command mechanism, e.g.,
+ #
+-# make REMOTE="rsh -l me myotherbsdbox"
++# make REMOTE="rsh -l me myotherlinuxbox"
---- hotspot/make/bsd/Makefile 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/Makefile 2010-06-20 21:56:15.000000000 -0700
-@@ -220,7 +220,10 @@
+ # Along with VM, Serviceability Agent (SA) is built for SA/JDI binding.
+ # JDI binding on SA produces two binaries:
+@@ -94,7 +94,7 @@
+ #
+ # We only do this on SunOS variants, for a couple of reasons:
+ # * It is extremely rare that source trees exist on other systems
+-# * It has been claimed that the Bsd automounter is flakey, so
++# * It has been claimed that the Linux automounter is flakey, so
+ # changing GAMMADIR in a way that exercises the automounter could
+ # prove to be a source of unreliability in the build process.
+ # Obviously, this Makefile is only relevant on SunOS boxes to begin
+@@ -226,11 +226,12 @@
+
+ checks: check_os_version check_j2se_version
+
+-# We do not want people accidentally building on old systems (e.g. Bsd 2.2.x,
++# We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
# Solaris 2.5.1, 2.6).
# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
-SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 2.7%
-+#SUPPORTED_OS_VERSION = 6.% 7.% 8.%
-+# Decided to allow all versions here, and limit using FreeBSD java/openjdk6
-+# Makefile
-+SUPPORTED_OS_VERSION = %
++#SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 2.7%
++DISABLE_HOTSPOT_OS_VERSION_CHECK = ok
OS_VERSION := $(shell uname -r)
EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
---- hotspot/make/bsd/makefiles/buildtree.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/buildtree.make 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/make/bsd/makefiles/buildtree.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/buildtree.make 2011-02-01 17:46:59.000000000 -0500
@@ -287,10 +287,11 @@
[ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \
{ \
@@ -2489,8 +3159,8 @@
) > $@
env.csh: env.sh
---- hotspot/make/bsd/makefiles/cscope.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/cscope.make 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/make/bsd/makefiles/cscope.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/cscope.make 2011-02-01 17:46:59.000000000 -0500
@@ -71,7 +71,7 @@
# OS-specific files for other systems are excluded by default. Use CS_OS=yes
# to include platform-specific files for other platforms.
@@ -2500,71 +3170,117 @@
CS_PRUNE_OS = $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS}))
endif
---- hotspot/make/bsd/makefiles/defs.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/defs.make 2010-06-22 07:49:14.000000000 -0700
-@@ -90,6 +90,31 @@
- endif
+--- hotspot/make/bsd/makefiles/defs.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/defs.make 2011-02-01 17:46:59.000000000 -0500
+@@ -72,8 +72,8 @@
+ HS_ARCH = sparc
endif
+-# x86_64
+-ifeq ($(ARCH), x86_64)
+# amd64
-+ifeq ($(ARCH), amd64)
-+ ARCH_DATA_MODEL = 64
-+ MAKE_ARGS += LP64=1
-+ PLATFORM = bsd-amd64
-+ VM_PLATFORM = bsd_amd64
-+ HS_ARCH = x86
-+endif
-+
++ifeq ($(ARCH), amd64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+ ARCH_DATA_MODEL = 64
+ MAKE_ARGS += LP64=1
+@@ -85,17 +85,27 @@
+ PLATFORM = bsd-i586
+ VM_PLATFORM = bsd_i486
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
++ # We have to reset ARCH to i386 since SRCARCH relies on it
++ ARCH = i386
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = bsd-i586
+- VM_PLATFORM = bsd_i486
+- HS_ARCH = x86
+# i386
+ifeq ($(ARCH), i386)
-+ ARCH_DATA_MODEL = 32
-+ PLATFORM = bsd-i586
-+ VM_PLATFORM = bsd_i486
-+ HS_ARCH = x86
-+endif
-+
-+# i486
-+ifeq ($(ARCH), i486)
-+ ARCH_DATA_MODEL = 32
-+ PLATFORM = bsd-i586
-+ VM_PLATFORM = bsd_i486
-+ HS_ARCH = x86
++ ifeq ($(ARCH_DATA_MODEL), 64)
++ ARCH_DATA_MODEL = 64
++ MAKE_ARGS += LP64=1
++ PLATFORM = bsd-amd64
++ VM_PLATFORM = bsd_amd64
++ HS_ARCH = x86
++ # We have to reset ARCH to amd64 since SRCARCH relies on it
++ ARCH = amd64
++ else
++ ARCH_DATA_MODEL = 32
++ PLATFORM = bsd-i586
++ VM_PLATFORM = bsd_i486
++ HS_ARCH = x86
++ endif
+ endif
+
+ # ARM
+@@ -116,39 +126,45 @@
+
+ JDK_INCLUDE_SUBDIR=bsd
+
++# Library suffix
++OS_VENDOR:=$(shell uname -s)
++ifeq ($(OS_VENDOR),Darwin)
++ LIBRARY_SUFFIX=dylib
++else
++ LIBRARY_SUFFIX=so
+endif
+
- # i686
- ifeq ($(ARCH), i686)
- ARCH_DATA_MODEL = 32
-@@ -106,22 +131,22 @@
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+ VM_DEBUG=jvmg
+
EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
# client and server subdirectories have symbolic links to ../libjsig.so
-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.so
+EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
-
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
+
+ ifndef BUILD_CLIENT_ONLY
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so
+EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
+ endif
+
ifneq ($(ZERO_BUILD), true)
ifeq ($(ARCH_DATA_MODEL), 32)
EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.so
-- EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
-+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX)
- EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar
- else
- ifeq ($(ARCH),ia64)
- else
-- EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so
-+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX)
- EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar
- endif
endif
---- hotspot/make/bsd/makefiles/gcc.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/gcc.make 2010-06-20 21:56:15.000000000 -0700
-@@ -22,12 +22,15 @@
+ endif
+
+ # Serviceability Binaries
+ # No SA Support for PPC, IA64, ARM or zero
+-ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
+- $(EXPORT_LIB_DIR)/sa-jdi.jar
+-ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
+- $(EXPORT_LIB_DIR)/sa-jdi.jar
+-ADD_SA_BINARIES/ppc =
+-ADD_SA_BINARIES/ia64 =
+-ADD_SA_BINARIES/arm =
+-ADD_SA_BINARIES/zero =
++ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
++ $(EXPORT_LIB_DIR)/sa-jdi.jar
++ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
++ $(EXPORT_LIB_DIR)/sa-jdi.jar
++ADD_SA_BINARIES/ppc =
++ADD_SA_BINARIES/ia64 =
++ADD_SA_BINARIES/arm =
++ADD_SA_BINARIES/zero =
+
+ EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
+-
+-
+--- hotspot/make/bsd/makefiles/gcc.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/gcc.make 2011-02-01 17:46:59.000000000 -0500
+@@ -22,18 +22,22 @@
#
#
@@ -2573,17 +3289,24 @@
#------------------------------------------------------------------------
# CC, CPP & AS
+ ifdef ALT_COMPILER_PATH
++CXX = $(ALT_COMPILER_PATH)/g++
+ CPP = $(ALT_COMPILER_PATH)/g++
+ CC = $(ALT_COMPILER_PATH)/gcc
+ else
-CPP = g++
-CC = gcc
--AS = $(CC) -c
+CXX ?= g++
-+CPP = $(CXX)
++CPP = $(CXX)
+CC ?= gcc
+ endif
+
+-AS = $(CC) -c
+AS = $(CC) -c -x assembler-with-cpp
# -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only
# prints the numbers (e.g. "2.95", "3.2.1")
-@@ -58,7 +61,7 @@
+@@ -67,7 +71,7 @@
CFLAGS += $(VM_PICFLAG)
CFLAGS += -fno-rtti
CFLAGS += -fno-exceptions
@@ -2592,23 +3315,23 @@
CFLAGS += -fcheck-new
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
-@@ -69,6 +72,15 @@
+@@ -76,10 +80,12 @@
+ ARCHFLAG/ia64 =
+ ARCHFLAG/sparc = -m32 -mcpu=v9
ARCHFLAG/sparcv9 = -m64 -mcpu=v9
+-ARCHFLAG/arm = -fsigned-char
ARCHFLAG/zero = $(ZERO_ARCHFLAG)
-
+-ifndef E500V2
+-ARCHFLAG/ppc = -mcpu=powerpc
++
+# Darwin-specific build flags
+ifeq ($(OS_VENDOR), Darwin)
+ # Ineffecient 16-byte stack re-alignment on Darwin/IA32
+ ARCHFLAG/i486 += -mstackrealign
-+
-+ # -arch compiler flag required for x64_64
-+ ARCHFLAGS/amd64 += -arch x86_64
-+endif
-+
+ endif
+
CFLAGS += $(ARCHFLAG)
- AOUT_FLAGS += $(ARCHFLAG)
- LFLAGS += $(ARCHFLAG)
-@@ -102,6 +114,11 @@
+@@ -124,6 +130,11 @@
CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
# Special cases
CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
@@ -2620,17 +3343,21 @@
# The flags to use for an Optimized g++ build
OPT_CFLAGS += -O3
-@@ -137,9 +154,6 @@
+@@ -159,28 +170,40 @@
LFLAGS += -Wl,-relax
endif
-# Enable linker optimization
-LFLAGS += -Xlinker -O1
-
- # If this is a --hash-style=gnu system, use --hash-style=both
- # The gnu .hash section won't work on some Bsd systems like SuSE 10.
- _HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu')
-@@ -151,14 +165,37 @@
+-# If this is a --hash-style=gnu system, use --hash-style=both
+-# The gnu .hash section won't work on some Bsd systems like SuSE 10.
+-_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | grep -- '--hash-style=gnu')
+-ifneq ($(_HAS_HASH_STYLE_GNU),)
+- LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
+-endif
+-LFLAGS += $(LDFLAGS_HASH_STYLE)
+-
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
MAPFLAG = -Xlinker --version-script=FILENAME
@@ -2674,22 +3401,39 @@
#------------------------------------------------------------------------
# Debug flags
---- hotspot/make/bsd/makefiles/jsig.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/jsig.make 2010-06-22 05:33:30.000000000 -0700
-@@ -26,10 +26,10 @@
+--- hotspot/make/bsd/makefiles/jsig.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/jsig.make 2011-02-01 17:46:59.000000000 -0500
+@@ -25,11 +25,16 @@
+ # Rules to build signal interposition library, used by vm.make
# libjsig[_g].so: signal interposition library
- JSIG = jsig
+-JSIG = jsig
-LIBJSIG = lib$(JSIG).so
-+LIBJSIG = lib$(JSIG).$(LIBRARY_SUFFIX)
++JSIG = jsig
++JSIG_G = $(JSIG)$(G_SUFFIX)
- JSIG_G = $(JSIG)$(G_SUFFIX)
+-JSIG_G = $(JSIG)$(G_SUFFIX)
-LIBJSIG_G = lib$(JSIG_G).so
-+LIBJSIG_G = lib$(JSIG_G).$(LIBRARY_SUFFIX)
++ifeq ($(OS_VENDOR), Darwin)
++ LIBJSIG = lib$(JSIG).dylib
++ LIBJSIG_G = lib$(JSIG_G).dylib
++else
++ LIBJSIG = lib$(JSIG).so
++ LIBJSIG_G = lib$(JSIG_G).so
++endif
JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm
-@@ -57,7 +57,7 @@
+@@ -42,7 +47,7 @@
+ # cause problems with interposing. See CR: 6466665
+ # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
+
+-LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE)
++LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE)
+
+ # DEBUG_BINARIES overrides everything, use full -g debug information
+ ifeq ($(DEBUG_BINARIES), true)
+@@ -52,7 +57,7 @@
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
@@ -2698,8 +3442,8 @@
$(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); }
install_jsig: $(LIBJSIG)
---- hotspot/make/bsd/makefiles/launcher.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/launcher.make 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/make/bsd/makefiles/launcher.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/launcher.make 2011-02-01 17:46:59.000000000 -0500
@@ -46,7 +46,7 @@
LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
else
@@ -2709,9 +3453,9 @@
LIBS_LAUNCHER += -l$(JVM) $(LIBS)
endif
---- hotspot/make/bsd/makefiles/sa.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/sa.make 2010-06-20 21:56:15.000000000 -0700
-@@ -42,8 +42,8 @@
+--- hotspot/make/bsd/makefiles/sa.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/sa.make 2011-02-01 17:46:59.000000000 -0500
+@@ -45,8 +45,8 @@
# gnumake 3.78.1 does not accept the *s that
# are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them
@@ -2722,61 +3466,62 @@
SA_CLASSDIR = $(GENERATED)/saclasses
---- hotspot/make/bsd/makefiles/saproc.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/saproc.make 2010-06-20 22:47:34.000000000 -0700
-@@ -27,10 +27,10 @@
- # libsaproc[_g].so: serviceability agent
+--- hotspot/make/bsd/makefiles/saproc.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/saproc.make 2011-02-01 17:46:59.000000000 -0500
+@@ -25,23 +25,34 @@
+ # Rules to build serviceability agent library, used by vm.make
- SAPROC = saproc
+ # libsaproc[_g].so: serviceability agent
+-
+-SAPROC = saproc
-LIBSAPROC = lib$(SAPROC).so
-+LIBSAPROC = lib$(SAPROC).$(LIBRARY_SUFFIX)
-
+-
++SAPROC = saproc
SAPROC_G = $(SAPROC)$(G_SUFFIX)
-LIBSAPROC_G = lib$(SAPROC_G).so
-+LIBSAPROC_G = lib$(SAPROC_G).$(LIBRARY_SUFFIX)
++
++ifeq ($(OS_VENDOR), Darwin)
++ LIBSAPROC = lib$(SAPROC).dylib
++ LIBSAPROC_G = lib$(SAPROC_G).dylib
++else
++ LIBSAPROC = lib$(SAPROC).so
++ LIBSAPROC_G = lib$(SAPROC_G).so
++endif
AGENT_DIR = $(GAMMADIR)/agent
-@@ -41,6 +41,7 @@
+ SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)
+
++ifeq ($(OS_VENDOR), FreeBSD)
+ SASRCFILES = $(SASRCDIR)/salibelf.c \
+ $(SASRCDIR)/symtab.c \
$(SASRCDIR)/libproc_impl.c \
$(SASRCDIR)/ps_proc.c \
$(SASRCDIR)/ps_core.c \
+ $(SASRCDIR)/hsearch_r.c \
$(SASRCDIR)/BsdDebuggerLocal.c
++SALIBS = -lutil -lthread_db
++else
++SASRCFILES = $(SASRCDIR)/StubDebuggerLocal.c
++SALIBS =
++endif
SAMAPFILE = $(SASRCDIR)/mapfile
-@@ -62,6 +63,25 @@
- SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
+@@ -60,7 +71,10 @@
+ $(MAKE) -f vm.make $(LIBSAPROC); \
+ fi
-+# This is needed to avoid picking up the proc_service.h
-+# header in SASRCDIR. We want to use the system provided one.
-+ifeq ($(CC_VER_MAJOR), 3)
-+INCSASRCDIR=-I$(SASRCDIR) -I-
-+else
-+INCSASRCDIR=-iquote $(SASRCDIR)
-+endif
-+
-+LIBUTIL=
-+ifeq ($(OS_VENDOR), FreeBSD)
-+# 7.0 and 6.x use ptrace
-+# 7.1 and up use libutil for kinfo_getvmmap
-+PTRACE_OS_VERSIONS = 5.% 6.% 7.0%
-+EMPTY_IF_KINFO_GETVMMAP = $(filter $(PTRACE_OS_VERSIONS),$(shell uname -r))
-+ifeq ($(EMPTY_IF_KINFO_GETVMMAP),)
-+LIBUTIL=-lutil
+-SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
++ifneq ($(OS_VENDOR), Darwin)
++SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE))
+endif
-+endif
-+
++SA_LFLAGS += $(LDFLAGS_HASH_STYLE)
+
$(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
- echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
-@@ -70,14 +90,15 @@
- @echo Making SA debugger back-end...
- $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \
- $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
-- -I$(SASRCDIR) \
-+ $(INCSASRCDIR) \
+@@ -73,12 +87,12 @@
+ -I$(SASRCDIR) \
-I$(GENERATED) \
-I$(BOOT_JAVA_HOME)/include \
- -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
@@ -2785,47 +3530,101 @@
$(SA_LFLAGS) \
$(SA_DEBUG_CFLAGS) \
-o $@ \
-+ $(LIBUTIL) \
- -lthread_db
+- -lthread_db
++ $(SALIBS)
$(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
---- hotspot/make/bsd/makefiles/vm.make 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/makefiles/vm.make 2010-06-20 22:51:02.000000000 -0700
-@@ -99,7 +99,7 @@
- # Extra flags from gnumake's invocation or environment
+ install_saproc: checkAndBuildSA
+--- hotspot/make/bsd/makefiles/vm.make 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/makefiles/vm.make 2011-02-01 17:46:59.000000000 -0500
+@@ -90,6 +90,10 @@
+ ${JRE_VERSION} \
+ ${VM_DISTRO}
+
++ifdef DEFAULT_LIBPATH
++CPPFLAGS += -DDEFAULT_LIBPATH="\"$(DEFAULT_LIBPATH)\""
++endif
++
+ # CFLAGS_WARN holds compiler options to suppress/enable warnings.
+ CFLAGS += $(CFLAGS_WARN/BYFILE)
+
+@@ -100,7 +104,7 @@
CFLAGS += $(EXTRA_CFLAGS)
+ LFLAGS += $(EXTRA_CFLAGS)
-LIBS += -lm -ldl -lpthread
+LIBS += -lm -pthread
# By default, link the *.o into the library, not the executable.
LINK_INTO$(LINK_INTO) = LIBJVM
-@@ -114,8 +114,8 @@
+@@ -114,9 +118,15 @@
+ #----------------------------------------------------------------------
# JVM
- JVM = jvm
+-JVM = jvm
-LIBJVM = lib$(JVM).so
-LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
-+LIBJVM = lib$(JVM).$(LIBRARY_SUFFIX)
-+LIBJVM_G = lib$(JVM)$(G_SUFFIX).$(LIBRARY_SUFFIX)
++JVM = jvm
++ifeq ($(OS_VENDOR), Darwin)
++ LIBJVM = lib$(JVM).dylib
++ LIBJVM_G = lib$(JVM)$(G_SUFFIX).dylib
++ CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
++else
++ LIBJVM = lib$(JVM).so
++ LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
++endif
JVM_OBJ_FILES = $(Obj_Files)
-@@ -129,11 +129,8 @@
- rm -f $@
- cat $^ > $@
+@@ -137,15 +147,7 @@
+ vm.def: $(Res_Files) $(Obj_Files)
+ sh $(GAMMADIR)/make/bsd/makefiles/build_vm_def.sh *.o > $@
--ifeq ($(ZERO_LIBARCH), ppc64)
+-ifeq ($(SHARK_BUILD), true)
- STATIC_CXX = false
-else
-- STATIC_CXX = true
+- ifeq ($(ZERO_LIBARCH), ppc64)
+- STATIC_CXX = false
+- else
+- STATIC_CXX = true
+- endif
-endif
-+# On BSD shared object could not be linked with static libstd++
+STATIC_CXX = false
ifeq ($(LINK_INTO),AOUT)
LIBJVM.o =
-@@ -189,11 +186,6 @@
+@@ -157,14 +159,21 @@
+ LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
+ LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
+
++ ifeq ($(OS_VENDOR), Darwin)
++ LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
++ LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
++ LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
++ endif
++
+ # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
+ # get around library dependency and compatibility issues. Must use gcc not
+ # g++ to link.
+ ifeq ($(STATIC_CXX), true)
+ LFLAGS_VM += $(STATIC_LIBGCC)
+ LIBS_VM += $(STATIC_STDCXX)
++ LINK_VM = $(LINK_LIB.c)
+ else
+- LIBS_VM += -lstdc++
++ LINK_VM = $(LINK_LIB.CC)
+ endif
+
+ LIBS_VM += $(LIBS)
+@@ -177,7 +186,6 @@
+ LIBS_VM += $(LLVM_LIBS)
+ endif
+
+-LINK_VM = $(LINK_LIB.c)
+
+ # rule for building precompiled header
+ $(PRECOMPILED_HEADER): $(Precompiled_Files)
+@@ -205,11 +213,6 @@
LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
endif
@@ -2837,39 +3636,51 @@
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
$(QUIETLY) { \
echo Linking vm...; \
---- hotspot/make/bsd/platform_amd64 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/platform_amd64 2010-06-20 21:56:15.000000000 -0700
-@@ -12,4 +12,6 @@
+@@ -219,17 +222,6 @@
+ $(LINK_LIB.CC/POST_HOOK) \
+ rm -f $@.1; ln -s $@ $@.1; \
+ [ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
+- if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then \
+- if [ -x /usr/sbin/sebsdenabled ] ; then \
+- /usr/sbin/sebsdenabled; \
+- if [ $$? = 0 ] ; then \
+- /usr/bin/chcon -t textrel_shlib_t $@; \
+- if [ $$? != 0 ]; then \
+- echo "ERROR: Cannot chcon $@"; \
+- fi \
+- fi \
+- fi \
+- fi \
+ }
+
+ DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)
+--- hotspot/make/bsd/platform_amd64 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/platform_amd64 2011-02-01 17:46:59.000000000 -0500
+@@ -12,4 +12,4 @@
compiler = gcc
-sysdefs = -DLINUX -D_GNU_SOURCE -DAMD64
-+gnu_dis_arch = amd64
-+
+sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64
---- hotspot/make/bsd/platform_i486 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/make/bsd/platform_i486 2010-06-20 21:56:15.000000000 -0700
-@@ -12,4 +12,6 @@
+--- hotspot/make/bsd/platform_i486 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/make/bsd/platform_i486 2011-02-01 17:46:59.000000000 -0500
+@@ -12,4 +12,4 @@
compiler = gcc
-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
-+gnu_dis_arch = i386
-+
+sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA32
---- hotspot/make/defs.make 2010-06-21 14:12:13.000000000 -0700
-+++ hotspot/make/defs.make 2010-06-26 22:22:26.000000000 -0700
-@@ -119,18 +119,33 @@
+--- hotspot/make/defs.make 2011-01-20 18:51:14.000000000 -0500
++++ hotspot/make/defs.make 2011-02-01 17:46:59.000000000 -0500
+@@ -119,13 +119,23 @@
# Windows should have OS predefined
ifeq ($(OS),)
OS := $(shell uname -s)
+ ifneq ($(findstring BSD,$(OS)),)
+ OS=bsd
-+ LIBRARY_SUFFIX=so
+ endif
+ ifeq ($(OS), Darwin)
+ OS=bsd
-+ LIBRARY_SUFFIX=dylib
+ endif
HOST := $(shell uname -n)
endif
@@ -2881,40 +3692,24 @@
- OSNAME=windows
+ ifneq ($(OS), bsd)
+ OSNAME=windows
-+ LIBRARY_SUFFIX=dll
+ else
+ OSNAME=bsd
+ endif
else
OSNAME=solaris
-+ LIBRARY_SUFFIX=so
endif
- else
- OSNAME=linux
-+ LIBRARY_SUFFIX=so
- endif
-
- # Determinations of default make arguments and platform specific settings
-@@ -235,6 +250,7 @@
- MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
- MAKE_ARGS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION)
- MAKE_ARGS += JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
-+MAKE_ARGS += LIBRARY_SUFFIX=$(LIBRARY_SUFFIX)
-
- # Pass HOTSPOT_BUILD_VERSION as argument to OS specific Makefile
- # to overwrite the default definition since OS specific Makefile also
---- hotspot/make/sa.files 2010-06-21 14:12:13.000000000 -0700
-+++ hotspot/make/sa.files 2010-06-20 21:56:15.000000000 -0700
-@@ -59,6 +59,9 @@
- $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/dbx/x86/*.java \
- $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/dummy/*.java \
- $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/ia64/*.java \
+--- hotspot/make/sa.files 2011-01-20 18:51:14.000000000 -0500
++++ hotspot/make/sa.files 2011-02-01 17:46:59.000000000 -0500
+@@ -50,6 +50,9 @@
+ $(AGENT_SRC_DIR)/sun/jvm/hotspot/compiler/*.java \
+ $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/*.java \
+ $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/amd64/*.java \
+$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/bsd/*.java \
+$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/bsd/amd64/*.java \
+$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/bsd/x86/*.java \
- $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/linux/*.java \
- $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/linux/amd64/*.java \
- $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/linux/ia64/*.java \
+ $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/cdbg/*.java \
+ $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/cdbg/basic/*.java \
+ $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/cdbg/basic/x86/*.java \
@@ -95,6 +98,9 @@
AGENT_FILES2 = \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/*.java \
@@ -2925,8 +3720,41 @@
$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/ia64/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux/*.java \
$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux_amd64/*.java \
---- hotspot/src/cpu/x86/vm/jni_x86.h 2010-06-21 14:12:14.000000000 -0700
-+++ hotspot/src/cpu/x86/vm/jni_x86.h 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp 2011-01-20 18:51:15.000000000 -0500
++++ hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp 2011-02-01 17:46:59.000000000 -0500
+@@ -469,8 +469,8 @@
+ // Fetch the exception from TLS and clear out exception related thread state
+ __ get_thread(rsi);
+ __ movptr(rax, Address(rsi, JavaThread::exception_oop_offset()));
+- __ movptr(Address(rsi, JavaThread::exception_oop_offset()), (int32_t)NULL_WORD);
+- __ movptr(Address(rsi, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD);
++ __ movptr(Address(rsi, JavaThread::exception_oop_offset()), (intptr_t)NULL_WORD);
++ __ movptr(Address(rsi, JavaThread::exception_pc_offset()), (intptr_t)NULL_WORD);
+
+ __ bind(_unwind_handler_entry);
+ __ verify_not_null_oop(rax);
+--- hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp 2011-01-20 18:51:15.000000000 -0500
++++ hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp 2011-02-01 17:46:59.000000000 -0500
+@@ -1153,7 +1153,7 @@
+ int recvr_offset = in_bytes(VirtualCallData::receiver_offset(start_row));
+ set_mdp_data_at(mdp, recvr_offset, receiver);
+ int count_offset = in_bytes(VirtualCallData::receiver_count_offset(start_row));
+- movptr(reg2, (int32_t)DataLayout::counter_increment);
++ movptr(reg2, (intptr_t)DataLayout::counter_increment);
+ set_mdp_data_at(mdp, count_offset, reg2);
+ if (start_row > 0) {
+ jmp(done);
+@@ -1296,7 +1296,7 @@
+ test_method_data_pointer(mdp, profile_continue);
+
+ // Build the base (index * per_case_size_in_bytes()) + case_array_offset_in_bytes()
+- movptr(reg2, (int32_t)in_bytes(MultiBranchData::per_case_size()));
++ movptr(reg2, (intptr_t)in_bytes(MultiBranchData::per_case_size()));
+ // index is positive and so should have correct value if this code were
+ // used on 64bits
+ imulptr(index, reg2);
+--- hotspot/src/cpu/x86/vm/jni_x86.h 2011-01-20 18:51:15.000000000 -0500
++++ hotspot/src/cpu/x86/vm/jni_x86.h 2011-02-01 17:46:59.000000000 -0500
@@ -26,7 +26,7 @@
#ifndef _JAVASOFT_JNI_MD_H_
#define _JAVASOFT_JNI_MD_H_
@@ -2936,8 +3764,8 @@
#define JNIEXPORT
#define JNIIMPORT
#define JNICALL
---- hotspot/src/os/bsd/launcher/java_md.c 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/launcher/java_md.c 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/src/os/bsd/launcher/java_md.c 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os/bsd/launcher/java_md.c 2011-02-01 17:46:59.000000000 -0500
@@ -45,8 +45,15 @@
#include "version_comp.h"
#endif
@@ -2954,7 +3782,7 @@
#ifndef GAMMA /* launcher.make defines ARCH */
-@@ -112,7 +119,7 @@
+@@ -116,7 +123,7 @@
* A collection of useful strings. One should think of these as #define
* entries, but actual strings can be more efficient (with many compilers).
*/
@@ -2963,7 +3791,7 @@
static const char *system_dir = "/usr/java";
static const char *user_dir = "/java";
#else /* Solaris */
-@@ -456,10 +463,10 @@
+@@ -460,10 +467,10 @@
* If not on Solaris, assume only a single LD_LIBRARY_PATH
* variable.
*/
@@ -2976,7 +3804,34 @@
/*
* On bsd, if a binary is running as sgid or suid, glibc sets
* LD_LIBRARY_PATH to the empty string for security purposes. (In
-@@ -836,7 +843,7 @@
+@@ -476,7 +483,7 @@
+ * return from the function now. Getting the right libraries to
+ * be found must be handled through other mechanisms.
+ */
+- if((getgid() != getegid()) || (getuid() != geteuid()) ) {
++ if(issetugid()) {
+ return;
+ }
+ #endif
+@@ -487,7 +494,7 @@
+ new_runpath = MemAlloc( ((runpath!=NULL)?strlen(runpath):0) +
+ 2*strlen(jrepath) + 2*strlen(arch) +
+ strlen(jvmpath) + 52);
+- newpath = new_runpath + strlen("LD_LIBRARY_PATH=");
++ newpath = new_runpath + strlen(LD_LIBRARY_PATH "=");
+
+
+ /*
+@@ -502,7 +509,7 @@
+
+ /* jvmpath, ((running != wanted)?((wanted==64)?"/"BIG_ARCH:"/.."):""), */
+
+- sprintf(new_runpath, "LD_LIBRARY_PATH="
++ sprintf(new_runpath, LD_LIBRARY_PATH "="
+ "%s:"
+ "%s/lib/%s:"
+ "%s/../lib/%s",
+@@ -840,7 +847,7 @@
jboolean
GetApplicationHome(char *buf, jint bufsize)
{
@@ -2985,7 +3840,7 @@
char *execname = GetExecname();
if (execname) {
strncpy(buf, execname, bufsize-1);
-@@ -1005,7 +1012,7 @@
+@@ -1009,7 +1016,7 @@
}
}
}
@@ -2994,7 +3849,7 @@
{
const char* self = "/proc/self/exe";
char buf[PATH_MAX+1];
-@@ -1015,7 +1022,7 @@
+@@ -1019,7 +1026,7 @@
exec_path = strdup(buf);
}
}
@@ -3003,7 +3858,7 @@
{
/* Not implemented */
}
-@@ -1220,7 +1227,7 @@
+@@ -1224,7 +1231,7 @@
#endif /* __sun && i586 */
@@ -3012,7 +3867,7 @@
/*
* A utility method for asking the CPU about itself.
-@@ -1286,7 +1293,7 @@
+@@ -1290,7 +1297,7 @@
#endif
}
@@ -3021,7 +3876,7 @@
#ifdef i586
/*
-@@ -1465,7 +1472,7 @@
+@@ -1469,7 +1476,7 @@
#endif /* __sun && i586 */
@@ -3030,7 +3885,7 @@
/* The definition of a server-class machine for bsd-i586 */
jboolean
-@@ -1496,7 +1503,7 @@
+@@ -1500,7 +1507,7 @@
return result;
}
@@ -3039,7 +3894,7 @@
/* Dispatch to the platform-specific definition of "server-class" */
jboolean
-@@ -1506,7 +1513,7 @@
+@@ -1510,7 +1517,7 @@
result = solaris_sparc_ServerClassMachine();
#elif defined(__sun) && defined(i586)
result = solaris_i586_ServerClassMachine();
@@ -3048,32 +3903,46 @@
result = bsd_i586_ServerClassMachine();
#else
if (_launcher_debug) {
---- hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2010-06-20 21:56:15.000000000 -0700
-@@ -179,32 +179,20 @@
- struct sockaddr_un addr;
- addr.sun_family = AF_UNIX;
-
-- // FIXME: Prior to b39 the tool-side API expected to find the well
-- // known file in the working directory. To allow this libjvm.so work with
-- // a pre-b39 SDK we create it in the working directory if
-- // +StartAttachListener is used is used. All unit tests for this feature
-- // currently used this flag. Once b39 SDK has been promoted we can remove
-- // this code.
-- if (StartAttachListener) {
-- sprintf(path, ".java_pid%d", os::current_process_id());
-- strcpy(addr.sun_path, path);
-- ::unlink(path);
-- res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
+--- hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2011-02-02 01:08:04.000000000 -0500
+@@ -167,53 +167,41 @@
+ // Initialization - create a listener socket and bind it to a file
+
+ int BsdAttachListener::init() {
+- char path[UNIX_PATH_MAX]; // socket file
+- char initial_path[UNIX_PATH_MAX]; // socket file during setup
+- int listener; // listener socket (file descriptor)
++ char path[UNIX_PATH_MAX]; // socket file
++ int listener; // listener socket (file descriptor)
+
+ // register function to cleanup
+ ::atexit(listener_cleanup);
+
+- int n = snprintf(path, UNIX_PATH_MAX, "%s/.java_pid%d",
+- os::get_temp_directory(), os::current_process_id());
+- if (n <= (int)UNIX_PATH_MAX) {
+- n = snprintf(initial_path, UNIX_PATH_MAX, "%s.tmp", path);
- }
-- if (res == -1) {
-- sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id());
-- strcpy(addr.sun_path, path);
-- ::unlink(path);
-- res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
+- if (n > (int)UNIX_PATH_MAX) {
+- return -1;
- }
+-
+ // create the listener socket
+ listener = ::socket(PF_UNIX, SOCK_STREAM, 0);
+ if (listener == -1) {
+ return -1;
+ }
+
+- // bind socket
++ int res = -1;
+ struct sockaddr_un addr;
+ addr.sun_family = AF_UNIX;
+- strcpy(addr.sun_path, initial_path);
+- ::unlink(initial_path);
+- int res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
+
-+ sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id());
++ snprintf(path, UNIX_PATH_MAX, "%s/.java_pid%d",
++ os::get_temp_directory(), os::current_process_id());
+ strcpy(addr.sun_path, path);
+ ::unlink(path);
+ res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
@@ -3081,17 +3950,31 @@
RESTARTABLE(::close(listener), res);
return -1;
}
- set_path(path);
-
-- // put in listen mode and set permission
-- if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1)) {
++ set_path(path);
+
+- // put in listen mode, set permissions, and rename into place
+- res = ::listen(listener, 5);
+- if (res == 0) {
+- RESTARTABLE(::chmod(initial_path, S_IREAD|S_IWRITE), res);
+- if (res == 0) {
+- res = ::rename(initial_path, path);
+- }
+- }
+- if (res == -1) {
+ // put in listen mode and set permission and ownership
+ if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1) ||
+ (::chown(path, geteuid(), getegid()) == -1)) {
RESTARTABLE(::close(listener), res);
- ::unlink(path);
- set_path(NULL);
-@@ -330,6 +318,15 @@
+- ::unlink(initial_path);
++ ::unlink(path);
++ set_path(NULL);
+ return -1;
+ }
+- set_path(path);
+ set_listener(listener);
+
+ return 0;
+@@ -334,6 +322,15 @@
// get the credentials of the peer and check the effective uid/guid
// - check with jeff on this.
@@ -3107,7 +3990,7 @@
struct ucred cred_info;
socklen_t optlen = sizeof(cred_info);
if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) {
-@@ -337,10 +334,13 @@
+@@ -341,10 +338,13 @@
RESTARTABLE(::close(s), res);
continue;
}
@@ -3122,29 +4005,31 @@
int res;
RESTARTABLE(::close(s), res);
continue;
-@@ -460,15 +460,12 @@
+@@ -464,16 +464,13 @@
if (init_at_startup() || is_initialized()) {
return false; // initialized at startup or already initialized
}
-- char fn[32];
+- char fn[PATH_MAX+1];
- sprintf(fn, ".attach_pid%d", os::current_process_id());
+ char path[PATH_MAX + 1];
int ret;
- struct stat64 st;
- RESTARTABLE(::stat64(fn, &st), ret);
- if (ret == -1) {
-- sprintf(fn, "/tmp/.attach_pid%d", os::current_process_id());
+- snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
+- os::get_temp_directory(), os::current_process_id());
- RESTARTABLE(::stat64(fn, &st), ret);
- }
+ struct stat st;
+
-+ sprintf(path, "%s/.attach_pid%d", os::get_temp_directory(), os::current_process_id());
++ snprintf(path, PATH_MAX + 1, "%s/.attach_pid%d",
++ os::get_temp_directory(), os::current_process_id());
+ RESTARTABLE(::stat(path, &st), ret);
if (ret == 0) {
// simple check to avoid starting the attach mechanism when
// a bogus user creates the file
---- hotspot/src/os/bsd/vm/hpi_bsd.cpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/hpi_bsd.cpp 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/src/os/bsd/vm/hpi_bsd.cpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os/bsd/vm/hpi_bsd.cpp 2011-02-01 17:46:59.000000000 -0500
@@ -28,6 +28,14 @@
# include <sys/param.h>
# include <dlfcn.h>
@@ -3174,8 +4059,8 @@
#endif
*(strrchr(buf, '/')) = '\0'; /* get rid of /libjvm.so */
---- hotspot/src/os/bsd/vm/hpi_bsd.hpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/hpi_bsd.hpp 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/src/os/bsd/vm/hpi_bsd.hpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os/bsd/vm/hpi_bsd.hpp 2011-02-01 17:46:59.000000000 -0500
@@ -36,7 +36,7 @@
// HPI_FileInterface
@@ -3226,8 +4111,8 @@
}
---- hotspot/src/os/bsd/vm/jsig.c 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/jsig.c 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/src/os/bsd/vm/jsig.c 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os/bsd/vm/jsig.c 2011-02-01 17:46:59.000000000 -0500
@@ -143,7 +143,8 @@
}
@@ -3238,16 +4123,9 @@
}
static int call_os_sigaction(int sig, const struct sigaction *act,
---- hotspot/src/os/bsd/vm/jvm_bsd.cpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/jvm_bsd.cpp 2010-06-20 21:56:15.000000000 -0700
-@@ -138,44 +138,37 @@
-
- struct siglabel siglabels[] = {
- /* derived from /usr/include/bits/signum.h on RH7.2 */
-- "HUP", SIGHUP, /* Hangup (POSIX). */
-+ "HUP", SIGHUP, /* Hangup (POSIX). */
- "INT", SIGINT, /* Interrupt (ANSI). */
- "QUIT", SIGQUIT, /* Quit (POSIX). */
+--- hotspot/src/os/bsd/vm/jvm_bsd.cpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os/bsd/vm/jvm_bsd.cpp 2011-02-01 17:46:59.000000000 -0500
+@@ -144,38 +144,31 @@
"ILL", SIGILL, /* Illegal instruction (ANSI). */
"TRAP", SIGTRAP, /* Trace trap (POSIX). */
"ABRT", SIGABRT, /* Abort (ANSI). */
@@ -3296,8 +4174,8 @@
};
JVM_ENTRY_NO_ENV(jint, JVM_FindSignal(const char *name))
---- hotspot/src/os/bsd/vm/jvm_bsd.h 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/jvm_bsd.h 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/src/os/bsd/vm/jvm_bsd.h 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os/bsd/vm/jvm_bsd.h 2011-02-01 17:46:59.000000000 -0500
@@ -51,7 +51,11 @@
#define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
@@ -3331,103 +4209,94 @@
#endif /* JVM_MD_H */
// Reconciliation History
---- hotspot/src/os/bsd/vm/osThread_bsd.cpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/osThread_bsd.cpp 2010-06-20 21:56:15.000000000 -0700
-@@ -28,8 +28,8 @@
+--- hotspot/src/os/bsd/vm/osThread_bsd.cpp 2011-02-04 16:15:39.000000000 -0500
++++ hotspot/src/os/bsd/vm/osThread_bsd.cpp 2011-02-04 16:23:45.000000000 -0500
+@@ -31,8 +31,12 @@
void OSThread::pd_initialize() {
assert(this != NULL, "check");
-- _thread_id = 0;
++#ifdef __FreeBSD__
+ _thread_id = 0;
- _pthread_id = 0;
++#else
+ _thread_id = NULL;
++#endif
+ _pthread_id = NULL;
_siginfo = NULL;
_ucontext = NULL;
_expanding_stack = 0;
---- hotspot/src/os/bsd/vm/osThread_bsd.hpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/osThread_bsd.hpp 2010-06-20 21:56:15.000000000 -0700
-@@ -36,6 +36,12 @@
+--- hotspot/src/os/bsd/vm/osThread_bsd.hpp 2011-02-04 16:15:39.000000000 -0500
++++ hotspot/src/os/bsd/vm/osThread_bsd.hpp 2011-02-07 14:29:24.000000000 -0500
+@@ -36,6 +36,7 @@
private:
-+#ifdef _ALLBSD_SOURCE
-+ // _thread_id and _pthread_id are the same on BSD
-+ // keep both to minimize code divergence in os_bsd.cpp
-+ pthread_t _thread_id;
-+ pthread_t _pthread_id;
-+#else
++#ifdef __FreeBSD__
// _thread_id is kernel thread id (similar to LWP id on Solaris). Each
// thread has a unique thread_id (BsdThreads or NPTL). It can be used
// to access /proc.
-@@ -44,6 +50,7 @@
+@@ -44,6 +45,12 @@
// _pthread_id is the pthread id, which is used by library calls
// (e.g. pthread_kill).
pthread_t _pthread_id;
++#else
++ // _thread_id and _pthread_id are the same on BSD
++ // keep both to minimize code divergence in os_bsd.cpp
++ pthread_t _thread_id;
++ pthread_t _pthread_id;
+#endif
sigset_t _caller_sigmask; // Caller's signal mask
-@@ -53,12 +60,18 @@
+@@ -53,12 +60,22 @@
sigset_t caller_sigmask() const { return _caller_sigmask; }
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }
-+#ifdef _ALLBSD_SOURCE
-+ pthread_t thread_id() const {
-+ return _thread_id;
-+ }
-+#else
++#ifdef __FreeBSD__
pid_t thread_id() const {
return _thread_id;
}
++#else
++ pthread_t thread_id() const {
++ return _thread_id;
++ }
+#endif
#ifndef PRODUCT
// Used for debugging, return a unique integer for each thread.
-- int thread_identifier() const { return _thread_id; }
++#ifdef __FreeBSD__
+ int thread_identifier() const { return _thread_id; }
++#else
+ intptr_t thread_identifier() const { return (intptr_t)_pthread_id; }
++#endif
#endif
#ifdef ASSERT
// We expect no reposition failures so kill vm if we get one.
-@@ -67,9 +80,15 @@
+@@ -67,9 +84,15 @@
return false;
}
#endif // ASSERT
-+#ifdef _ALLBSD_SOURCE
-+ void set_thread_id(pthread_t id) {
-+ _thread_id = id;
-+ }
-+#else
++#ifdef __FreeBSD__
void set_thread_id(pid_t id) {
_thread_id = id;
}
++#else
++ void set_thread_id(pthread_t id) {
++ _thread_id = id;
++ }
+#endif
pthread_t pthread_id() const {
return _pthread_id;
}
-@@ -120,6 +139,9 @@
-
- private:
- Monitor* _startThread_lock; // sync parent and child in thread creation
-+#ifdef _ALLBSD_SOURCE
-+ JavaThreadState _saved_interrupt_thread_state; // the thread state before a system call -- restored afterward
-+#endif
-
- public:
-
-@@ -127,6 +149,11 @@
- return _startThread_lock;
- }
-
-+#ifdef _ALLBSD_SOURCE
-+ JavaThreadState saved_interrupt_thread_state() { return _saved_interrupt_thread_state; }
-+ void set_saved_interrupt_thread_state(JavaThreadState state) { _saved_interrupt_thread_state = state; }
-+#endif
-+
- // ***************************************************************
- // Platform dependent initialization and cleanup
- // ***************************************************************
---- hotspot/src/os/bsd/vm/os_bsd.cpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/os_bsd.cpp 2010-06-20 22:51:50.000000000 -0700
-@@ -42,17 +42,39 @@
+--- hotspot/src/os/bsd/vm/os_bsd.cpp 2011-02-04 16:00:23.000000000 -0500
++++ hotspot/src/os/bsd/vm/os_bsd.cpp 2011-02-08 11:38:39.000000000 -0500
+@@ -39,27 +39,56 @@
+ # include <stdio.h>
+ # include <unistd.h>
+ # include <sys/resource.h>
+-# include <pthread.h>
+ # include <sys/stat.h>
+ # include <sys/time.h>
+ # include <sys/times.h>
# include <sys/utsname.h>
# include <sys/socket.h>
# include <sys/wait.h>
@@ -3447,9 +4316,20 @@
+#endif
# include <sys/ipc.h>
# include <sys/shm.h>
+-# include <link.h>
+ # include <stdint.h>
+ # include <inttypes.h>
+
++#ifdef __FreeBSD__
++#if __FreeBSD_version > 900030
++#include <pthread_np.h>
++#else
++extern "C" int thr_self(long *); // XXX #include <sys/thr.h>
++#endif
++#endif
+
+#ifndef __APPLE__
- # include <link.h>
++# include <link.h>
+#endif
+
+#if defined(__FreeBSD__) || defined(__NetBSD__)
@@ -3464,10 +4344,11 @@
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
-
++
#define MAX_PATH (2 * K)
-@@ -64,19 +86,25 @@
+ // for timer info max values which include all bits
+@@ -70,19 +99,25 @@
// global variables
julong os::Bsd::_physical_memory = 0;
@@ -3493,7 +4374,7 @@
static jlong initial_time_count=0;
-@@ -94,8 +122,6 @@
+@@ -100,8 +135,6 @@
static int SR_signum = SIGUSR2;
sigset_t SR_sigset;
@@ -3502,7 +4383,7 @@
////////////////////////////////////////////////////////////////////////////////
// utility functions
-@@ -108,11 +134,16 @@
+@@ -114,11 +147,16 @@
}
julong os::Bsd::available_memory() {
@@ -3519,7 +4400,7 @@
}
julong os::physical_memory() {
-@@ -160,6 +191,7 @@
+@@ -166,6 +204,7 @@
}
@@ -3527,7 +4408,7 @@
#ifndef SYS_gettid
// i386: 224, ia64: 1105, amd64: 186, sparc 143
#ifdef __ia64__
-@@ -174,6 +206,7 @@
+@@ -180,6 +219,7 @@
#error define gettid for the arch
#endif
#endif
@@ -3535,20 +4416,40 @@
// Cpu architecture string
#if defined(ZERO)
-@@ -195,6 +228,7 @@
- #endif
-
-
-+#ifndef _ALLBSD_SOURCE
- // pid_t gettid()
- //
+@@ -210,28 +250,58 @@
// Returns the kernel thread id of the currently running thread. Kernel
-@@ -221,7 +255,47 @@
- static const char *unstable_chroot_error = "/proc file system not found.\n"
- "Java may be unstable running multithreaded in a chroot "
- "environment on Bsd when /proc filesystem is not mounted.";
+ // thread id is used to access /proc.
+ //
+-// (Note that getpid() on BsdThreads returns kernel thread id too; but
+-// on NPTL, it returns the same pid for all threads, as required by POSIX.)
+-//
++#ifdef __FreeBSD__
+ pid_t os::Bsd::gettid() {
+- int rslt = syscall(SYS_gettid);
+- if (rslt == -1) {
+- // old kernel, no NPTL support
+- return getpid();
+- } else {
+- return (pid_t)rslt;
+- }
++#if __FreeBSD_version > 900030
++ return pthread_getthreadid_np();
++#else
++ long tid;
++ thr_self(&tid);
++ return (pid_t)tid;
++#endif
+ }
+#endif
+-// Most versions of bsd have a bug where the number of processors are
+-// determined by looking at the /proc file system. In a chroot environment,
+-// the system call returns 1. This causes the VM to act as if it is
+-// a single processor and elide locking (see is_MP() call).
+-static bool unsafe_chroot_detected = false;
+-static const char *unstable_chroot_error = "/proc file system not found.\n"
+- "Java may be unstable running multithreaded in a chroot "
+- "environment on Bsd when /proc filesystem is not mounted.";
+#ifdef _ALLBSD_SOURCE
+void os::Bsd::initialize_system_info() {
+ int mib[2];
@@ -3560,12 +4461,13 @@
+ mib[0] = CTL_HW;
+ mib[1] = HW_NCPU;
+ len = sizeof(cpu_val);
-+ if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1)
-+ _processor_count = cpu_val;
-+
-+ if (_processor_count < 1)
-+ _processor_count = 1; // fallback
-+
++ if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1 && cpu_val >= 1) {
++ set_processor_count(cpu_val);
++ }
++ else {
++ set_processor_count(1); // fallback
++ }
+
+ /* get physical memory via hw.usermem sysctl (hw.usermem is used
+ * instead of hw.physmem because we need size of allocatable memory
+ */
@@ -3591,7 +4493,7 @@
void os::Bsd::initialize_system_info() {
set_processor_count(sysconf(_SC_NPROCESSORS_CONF));
if (processor_count() == 1) {
-@@ -238,6 +312,7 @@
+@@ -248,6 +318,7 @@
_physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE);
assert(processor_count() > 0, "bsd error");
}
@@ -3599,20 +4501,18 @@
void os::init_system_properties_values() {
// char arch[12];
-@@ -281,10 +356,8 @@
+@@ -291,9 +362,7 @@
* ...
* 7: The default directories, normally /lib and /usr/lib.
*/
-#if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390))
-#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
-#else
--#define DEFAULT_LIBPATH "/lib:/usr/lib"
+#ifndef DEFAULT_LIBPATH
-+#define DEFAULT_LIBPATH "/lib:/usr/lib"
+ #define DEFAULT_LIBPATH "/lib:/usr/lib"
#endif
- #define EXTENSIONS_DIR "/lib/ext"
-@@ -362,7 +435,11 @@
+@@ -372,7 +441,11 @@
* should always exist (until the legacy problem cited above is
* addressed).
*/
@@ -3624,7 +4524,7 @@
if (v != NULL) {
char *t = ld_library_path;
/* That's +1 for the colon and +1 for the trailing '\0' */
-@@ -521,6 +598,7 @@
+@@ -531,6 +604,7 @@
}
}
@@ -3632,26 +4532,7 @@
//////////////////////////////////////////////////////////////////////////////
// detecting pthread library
-@@ -573,15 +651,15 @@
- }
-
- if (strstr(libpthread_version(), "NPTL")) {
-- os::Bsd::set_is_NPTL();
-+ os::Bsd::set_is_NPTL();
- } else {
-- os::Bsd::set_is_BsdThreads();
-+ os::Bsd::set_is_BsdThreads();
- }
-
- // BsdThreads have two flavors: floating-stack mode, which allows variable
- // stack size; and fixed-stack mode. NPTL is always floating-stack.
- if (os::Bsd::is_NPTL() || os::Bsd::supports_variable_stack_size()) {
-- os::Bsd::set_is_floating_stack();
-+ os::Bsd::set_is_floating_stack();
- }
- }
-
-@@ -684,6 +762,7 @@
+@@ -694,6 +768,7 @@
}
return false;
}
@@ -3659,7 +4540,7 @@
//////////////////////////////////////////////////////////////////////////////
// create new thread
-@@ -692,6 +771,9 @@
+@@ -702,6 +777,9 @@
// check if it's safe to start a new thread
static bool _thread_safety_check(Thread* thread) {
@@ -3669,7 +4550,7 @@
if (os::Bsd::is_BsdThreads() && !os::Bsd::is_floating_stack()) {
// Fixed stack BsdThreads (SuSE Bsd/x86, and some versions of Redhat)
// Heap is mmap'ed at lower end of memory space. Thread stacks are
-@@ -725,6 +807,7 @@
+@@ -735,6 +813,7 @@
// here, that means enough space has been reserved for stack.
return true;
}
@@ -3677,18 +4558,22 @@
}
// Thread start routine for all newly created threads
-@@ -752,6 +835,10 @@
+@@ -762,15 +841,22 @@
return NULL;
}
-+#ifdef _ALLBSD_SOURCE
-+ // thread_id is pthread_id on BSD
-+ osthread->set_thread_id(::pthread_self());
-+#else
++#ifdef __FreeBSD__
// thread_id is kernel thread id (similar to Solaris LWP id)
osthread->set_thread_id(os::Bsd::gettid());
++#else
++ // thread_id is pthread_id on BSD
++ osthread->set_thread_id(::pthread_self());
++#endif
-@@ -761,6 +848,7 @@
++#ifndef _ALLBSD_SOURCE
+ if (UseNUMA) {
+ int lgrp_id = os::numa_get_group_id();
+ if (lgrp_id != -1) {
thread->set_lgrp_id(lgrp_id);
}
}
@@ -3696,7 +4581,7 @@
// initialize signal mask for this thread
os::Bsd::hotspot_sigmask(thread);
-@@ -841,17 +929,22 @@
+@@ -851,17 +937,22 @@
// let pthread_create() pick the default value.
}
@@ -3719,7 +4604,7 @@
pthread_t tid;
int ret = pthread_create(&tid, &attr, (void* (*)(void*)) java_start, thread);
-@@ -865,7 +958,9 @@
+@@ -875,7 +966,9 @@
// Need to clean up stuff we've allocated so far
thread->set_osthread(NULL);
delete osthread;
@@ -3729,7 +4614,7 @@
return false;
}
-@@ -881,9 +976,11 @@
+@@ -891,9 +984,11 @@
}
}
@@ -3741,19 +4626,19 @@
}
// Aborted due to thread limit being reached
-@@ -921,7 +1018,11 @@
+@@ -931,7 +1026,11 @@
}
// Store pthread info into the OSThread
-+#ifdef _ALLBSD_SOURCE
-+ osthread->set_thread_id(::pthread_self());
-+#else
++#ifdef __FreeBSD__
osthread->set_thread_id(os::Bsd::gettid());
++#else
++ osthread->set_thread_id(::pthread_self());
+#endif
osthread->set_pthread_id(::pthread_self());
// initialize floating point control register
-@@ -932,6 +1033,7 @@
+@@ -942,6 +1041,7 @@
thread->set_osthread(osthread);
@@ -3761,7 +4646,7 @@
if (UseNUMA) {
int lgrp_id = os::numa_get_group_id();
if (lgrp_id != -1) {
-@@ -958,6 +1060,7 @@
+@@ -968,6 +1068,7 @@
os::Bsd::manually_expand_stack(jt, addr);
osthread->clear_expanding_stack();
}
@@ -3769,7 +4654,7 @@
// initialize signal mask for this thread
// and save the caller's signal mask
-@@ -1016,6 +1119,7 @@
+@@ -1026,6 +1127,7 @@
//////////////////////////////////////////////////////////////////////////////
// initial thread
@@ -3777,7 +4662,7 @@
// Check if current thread is the initial thread, similar to Solaris thr_main.
bool os::Bsd::is_initial_thread(void) {
char dummy;
-@@ -1249,6 +1353,7 @@
+@@ -1262,6 +1364,7 @@
_initial_thread_stack_size = align_size_down(_initial_thread_stack_size, page_size());
_initial_thread_stack_bottom = (address)stack_top - _initial_thread_stack_size;
}
@@ -3785,7 +4670,7 @@
////////////////////////////////////////////////////////////////////////////////
// time support
-@@ -1270,9 +1375,7 @@
+@@ -1283,9 +1386,7 @@
return (1000 * 1000);
}
@@ -3796,7 +4681,7 @@
bool os::supports_vtime() { return false; }
bool os::enable_vtime() { return false; }
bool os::vtime_enabled() { return false; }
-@@ -1292,6 +1395,21 @@
+@@ -1305,6 +1406,21 @@
#define CLOCK_MONOTONIC (1)
#endif
@@ -3818,7 +4703,7 @@
void os::Bsd::clock_init() {
// we do dlopen's in this particular order due to bug in bsd
// dynamical loader (see 6348968) leading to crash on exit
-@@ -1327,7 +1445,9 @@
+@@ -1340,7 +1456,9 @@
}
}
}
@@ -3828,7 +4713,7 @@
#ifndef SYS_clock_getres
#if defined(IA32) || defined(AMD64)
-@@ -1366,6 +1486,7 @@
+@@ -1381,6 +1499,7 @@
_pthread_getcpuclockid = pthread_getcpuclockid_func;
}
}
@@ -3836,7 +4721,7 @@
jlong os::javaTimeNanos() {
if (Bsd::supports_monotonic_clock()) {
-@@ -1516,7 +1637,14 @@
+@@ -1531,7 +1650,14 @@
// DLL functions
@@ -3850,18 +4735,16 @@
+
+const char* os::dll_file_extension() { return JNI_LIB_SUFFIX; }
- const char* os::get_temp_directory() { return "/tmp/"; }
-
-@@ -1534,13 +1662,13 @@
+ // This must be hard coded because it's the system's temporary
+ // directory not the java application's temp directory, ala java.io.tmpdir.
+@@ -1551,13 +1677,13 @@
const size_t pnamelen = pname ? strlen(pname) : 0;
// Quietly truncate on buffer overflow. Should be an error.
- if (pnamelen + strlen(fname) + 10 > (size_t) buflen) {
-- *buffer = '\0';
-- return;
+ if (pnamelen + strlen(fname) + strlen(JNI_LIB_PREFIX) + strlen(JNI_LIB_SUFFIX) + 2 > buflen) {
-+ *buffer = '\0';
-+ return;
+ *buffer = '\0';
+ return;
}
if (pnamelen == 0) {
@@ -3870,7 +4753,7 @@
} else if (strchr(pname, *os::path_separator()) != NULL) {
int n;
char** pelements = split_path(pname, &n);
-@@ -1549,7 +1677,8 @@
+@@ -1566,7 +1692,8 @@
if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
continue; // skip the empty path values
}
@@ -3880,7 +4763,7 @@
if (file_exists(buffer)) {
break;
}
-@@ -1564,7 +1693,7 @@
+@@ -1581,7 +1708,7 @@
FREE_C_HEAP_ARRAY(char*, pelements);
}
} else {
@@ -3889,7 +4772,7 @@
}
}
-@@ -1605,6 +1734,23 @@
+@@ -1622,6 +1749,23 @@
}
}
@@ -3913,7 +4796,7 @@
struct _address_to_library_name {
address addr; // input : memory address
size_t buflen; // size of fname
-@@ -1679,11 +1825,27 @@
+@@ -1696,11 +1840,27 @@
return false;
}
}
@@ -3941,14 +4824,22 @@
void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
{
void * result= ::dlopen(filename, RTLD_LAZY);
-@@ -1736,6 +1898,18 @@
+@@ -1753,6 +1913,26 @@
#define EM_486 6 /* Intel 80486 */
#endif
++ #ifndef EM_MIPS_RS3_LE
++ #define EM_MIPS_RS3_LE 10 /* MIPS */
++ #endif
++
+ #ifndef EM_PPC64
+ #define EM_PPC64 21 /* PowerPC64 */
+ #endif
+
++ #ifndef EM_S390
++ #define EM_S390 22 /* IBM System/390 */
++ #endif
++
+ #ifndef EM_IA_64
+ #define EM_IA_64 50 /* HP/Intel IA-64 */
+ #endif
@@ -3960,7 +4851,7 @@
static const arch_t arch_array[]={
{EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
{EM_486, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
-@@ -1839,17 +2013,11 @@
+@@ -1856,17 +2036,11 @@
return NULL;
}
@@ -3981,7 +4872,7 @@
}
-@@ -1872,7 +2040,51 @@
+@@ -1889,7 +2063,51 @@
void os::print_dll_info(outputStream *st) {
st->print_cr("Dynamic libraries:");
@@ -4034,7 +4925,7 @@
char fname[32];
pid_t pid = os::Bsd::gettid();
-@@ -1881,6 +2093,7 @@
+@@ -1898,6 +2116,7 @@
if (!_print_ascii_file(fname, st)) {
st->print("Can not get library information for pid = %d\n", pid);
}
@@ -4042,7 +4933,7 @@
}
-@@ -1913,6 +2126,7 @@
+@@ -1932,6 +2151,7 @@
st->print(name.machine);
st->cr();
@@ -4050,7 +4941,7 @@
// Print warning if unsafe chroot environment detected
if (unsafe_chroot_detected) {
st->print("WARNING!! ");
-@@ -1927,6 +2141,7 @@
+@@ -1946,6 +2166,7 @@
st->print("(%s stack)", os::Bsd::is_floating_stack() ? "floating" : "fixed");
}
st->cr();
@@ -4058,7 +4949,7 @@
// rlimit
st->print("rlimit:");
-@@ -1952,6 +2167,7 @@
+@@ -1971,6 +2192,7 @@
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print("%d", rlim.rlim_cur);
@@ -4066,15 +4957,20 @@
st->print(", AS ");
getrlimit(RLIMIT_AS, &rlim);
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
-@@ -1964,6 +2180,7 @@
+@@ -1983,11 +2205,7 @@
os::loadavg(loadavg, 3);
st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]);
st->cr();
+-
+- // meminfo
+- st->print("\n/proc/meminfo:\n");
+- _print_ascii_file("/proc/meminfo", st);
+- st->cr();
+#endif
}
void os::print_memory_info(outputStream* st) {
-@@ -1971,18 +2188,22 @@
+@@ -1995,18 +2213,27 @@
st->print("Memory:");
st->print(" %dk page", os::vm_page_size()>>10);
@@ -4094,10 +4990,15 @@
st->print("(" UINT64_FORMAT "k free)",
((jlong)si.freeswap * si.mem_unit) >> 10);
+#endif
++ st->cr();
++
++ // meminfo
++ st->print("\n/proc/meminfo:\n");
++ _print_ascii_file("/proc/meminfo", st);
st->cr();
}
-@@ -2209,19 +2430,29 @@
+@@ -2249,19 +2476,29 @@
static volatile jint pending_signals[NSIG+1] = { 0 };
// Bsd(POSIX) specific hand shaking semaphore.
@@ -4129,7 +5030,7 @@
}
static int check_pending_signals(bool wait) {
-@@ -2243,7 +2474,7 @@
+@@ -2283,7 +2520,7 @@
do {
thread->set_suspend_equivalent();
// cleared by handle_special_suspend_equivalent_condition() or java_suspend_self()
@@ -4138,7 +5039,7 @@
// were we externally suspended while we were waiting?
threadIsSuspended = thread->handle_special_suspend_equivalent_condition();
-@@ -2254,7 +2485,7 @@
+@@ -2294,7 +2531,7 @@
// while suspended because that would surprise the thread that
// suspended us.
//
@@ -4147,15 +5048,23 @@
thread->java_suspend_self();
}
-@@ -2324,11 +2555,18 @@
- // All it does is to check if there are enough free pages
- // left at the time of mmap(). This could be a potential
+@@ -2338,10 +2575,10 @@
+ return;
+ }
+
+- char buf[PATH_MAX+1];
++ char buf[PATH_MAX + 1];
+ int num = Atomic::add(1, &cnt);
+
+- snprintf(buf, sizeof(buf), "%s/hs-vm-%d-%d",
++ snprintf(buf, PATH_MAX + 1, "%s/hs-vm-%d-%d",
+ os::get_temp_directory(), os::current_process_id(), num);
+ unlink(buf);
+
+@@ -2367,9 +2604,14 @@
// problem.
-+// modified to keep intact with openjdk6
bool os::commit_memory(char* addr, size_t size, bool exec) {
-- int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
-+// int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
-+ int prot = PROT_READ|PROT_WRITE|PROT_EXEC;
+ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
+#ifdef __OpenBSD__
+ // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD
+ return ::mprotect(addr, size, prot) == 0;
@@ -4167,7 +5076,7 @@
}
bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
-@@ -2344,36 +2582,27 @@
+@@ -2385,36 +2627,27 @@
}
void os::numa_make_global(char *addr, size_t bytes) {
@@ -4209,7 +5118,7 @@
}
bool os::get_page_info(char *start, page_info* info) {
-@@ -2384,6 +2613,7 @@
+@@ -2425,6 +2658,7 @@
return end;
}
@@ -4217,7 +5126,7 @@
extern "C" void numa_warn(int number, char *where, ...) { }
extern "C" void numa_error(char *where) { }
-@@ -2485,11 +2715,17 @@
+@@ -2526,104 +2760,26 @@
os::Bsd::numa_tonode_memory_func_t os::Bsd::_numa_tonode_memory;
os::Bsd::numa_interleave_memory_func_t os::Bsd::_numa_interleave_memory;
unsigned long* os::Bsd::_numa_all_nodes;
@@ -4228,14 +5137,108 @@
+ // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD
+ return ::mprotect(addr, size, PROT_NONE) == 0;
+#else
- return ::mmap(addr, size, PROT_NONE,
- MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0)
- != MAP_FAILED;
+ uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE,
+ MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0);
+ return res != (uintptr_t) MAP_FAILED;
+#endif
}
- static address _highest_vm_reserved_address = NULL;
-@@ -2593,6 +2829,9 @@
+-// Bsd uses a growable mapping for the stack, and if the mapping for
+-// the stack guard pages is not removed when we detach a thread the
+-// stack cannot grow beyond the pages where the stack guard was
+-// mapped. If at some point later in the process the stack expands to
+-// that point, the Bsd kernel cannot expand the stack any further
+-// because the guard pages are in the way, and a segfault occurs.
+-//
+-// However, it's essential not to split the stack region by unmapping
+-// a region (leaving a hole) that's already part of the stack mapping,
+-// so if the stack mapping has already grown beyond the guard pages at
+-// the time we create them, we have to truncate the stack mapping.
+-// So, we need to know the extent of the stack mapping when
+-// create_stack_guard_pages() is called.
+-
+-// Find the bounds of the stack mapping. Return true for success.
+-//
+-// We only need this for stacks that are growable: at the time of
+-// writing thread stacks don't use growable mappings (i.e. those
+-// creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this
+-// only applies to the main thread.
+-static bool
+-get_stack_bounds(uintptr_t *bottom, uintptr_t *top)
+-{
+- FILE *f = fopen("/proc/self/maps", "r");
+- if (f == NULL)
+- return false;
+-
+- while (!feof(f)) {
+- size_t dummy;
+- char *str = NULL;
+- ssize_t len = getline(&str, &dummy, f);
+- if (len == -1) {
+- fclose(f);
+- return false;
+- }
+-
+- if (len > 0 && str[len-1] == '\n') {
+- str[len-1] = 0;
+- len--;
+- }
+-
+- static const char *stack_str = "[stack]";
+- if (len > (ssize_t)strlen(stack_str)
+- && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) {
+- if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) {
+- uintptr_t sp = (uintptr_t)__builtin_frame_address(0);
+- if (sp >= *bottom && sp <= *top) {
+- free(str);
+- fclose(f);
+- return true;
+- }
+- }
+- }
+- free(str);
+- }
+- fclose(f);
+- return false;
+-}
+-
+-// If the (growable) stack mapping already extends beyond the point
+-// where we're going to put our guard pages, truncate the mapping at
+-// that point by munmap()ping it. This ensures that when we later
+-// munmap() the guard pages we don't leave a hole in the stack
+-// mapping. This only affects the main/initial thread, but guard
+-// against future OS changes
+ bool os::create_stack_guard_pages(char* addr, size_t size) {
+- uintptr_t stack_extent, stack_base;
+- bool chk_bounds = NOT_DEBUG(os::Bsd::is_initial_thread()) DEBUG_ONLY(true);
+- if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) {
+- assert(os::Bsd::is_initial_thread(),
+- "growable stack in non-initial thread");
+- if (stack_extent < (uintptr_t)addr)
+- ::munmap((void*)stack_extent, (uintptr_t)addr - stack_extent);
+- }
+-
+ return os::commit_memory(addr, size);
+ }
+
+ // If this is a growable mapping, remove the guard pages entirely by
+-// munmap()ping them. If not, just call uncommit_memory(). This only
+-// affects the main/initial thread, but guard against future OS changes
++// munmap()ping them. If not, just call uncommit_memory().
+ bool os::remove_stack_guard_pages(char* addr, size_t size) {
+- uintptr_t stack_extent, stack_base;
+- bool chk_bounds = NOT_DEBUG(os::Bsd::is_initial_thread()) DEBUG_ONLY(true);
+- if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) {
+- assert(os::Bsd::is_initial_thread(),
+- "growable stack in non-initial thread");
+-
+- return ::munmap(addr, size) == 0;
+- }
+-
+ return os::uncommit_memory(addr, size);
+ }
+
+@@ -2728,6 +2884,9 @@
static size_t _large_page_size = 0;
bool os::large_page_init() {
@@ -4245,7 +5248,7 @@
if (!UseLargePages) return false;
if (LargePageSizeInBytes) {
-@@ -2649,6 +2888,7 @@
+@@ -2785,6 +2944,7 @@
// We optimistically assume the support is available. If later it turns out
// not true, VM will automatically switch to use regular page size.
return true;
@@ -4253,7 +5256,7 @@
}
#ifndef SHM_HUGETLB
-@@ -2825,7 +3065,7 @@
+@@ -2961,7 +3121,7 @@
}
size_t os::read(int fd, void *buf, unsigned int nBytes) {
@@ -4262,7 +5265,7 @@
}
// TODO-FIXME: reconcile Solaris' os::sleep with the bsd variation.
-@@ -2961,6 +3201,44 @@
+@@ -3097,6 +3257,44 @@
// this reason, the code should not be used as default (ThreadPriorityPolicy=0).
// It is only used when ThreadPriorityPolicy=1 and requires root privilege.
@@ -4307,7 +5310,7 @@
int os::java_to_os_priority[MaxPriority + 1] = {
19, // 0 Entry should never be used
-@@ -2978,6 +3256,7 @@
+@@ -3114,6 +3312,7 @@
-5 // 10 MaxPriority
};
@@ -4315,7 +5318,7 @@
static int prio_init() {
if (ThreadPriorityPolicy == 1) {
-@@ -2997,8 +3276,28 @@
+@@ -3133,8 +3332,28 @@
OSReturn os::set_native_priority(Thread* thread, int newpri) {
if ( !UseThreadPriorities || ThreadPriorityPolicy == 0 ) return OS_OK;
@@ -4344,7 +5347,7 @@
}
OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) {
-@@ -3008,7 +3307,17 @@
+@@ -3144,7 +3363,17 @@
}
errno = 0;
@@ -4362,7 +5365,7 @@
return (*priority_ptr != -1 || errno == 0 ? OS_OK : OS_ERR);
}
-@@ -3118,7 +3427,7 @@
+@@ -3254,7 +3483,7 @@
/* Get signal number to use for suspend/resume */
if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) {
int sig = ::strtol(s, 0, 10);
@@ -4371,7 +5374,7 @@
SR_signum = sig;
}
}
-@@ -3461,6 +3770,28 @@
+@@ -3598,6 +3827,28 @@
set_signal_handler(SIGFPE, true);
set_signal_handler(SIGXFSZ, true);
@@ -4400,7 +5403,7 @@
if (libjsig_is_loaded) {
// Tell libjsig jvm finishes setting signal handlers
(*end_signal_setting)();
-@@ -3481,6 +3812,7 @@
+@@ -3618,6 +3869,7 @@
}
}
@@ -4408,7 +5411,7 @@
// This is the fastest way to get thread cpu time on Bsd.
// Returns cpu time (user+sys) for any thread, not only for current.
// POSIX compliant clocks are implemented in the kernels 2.6.16+.
-@@ -3495,6 +3827,7 @@
+@@ -3632,6 +3884,7 @@
return (tp.tv_sec * SEC_IN_NANOSECS) + tp.tv_nsec;
}
@@ -4416,7 +5419,7 @@
/////
// glibc on Bsd platform uses non-documented flag
-@@ -3716,13 +4049,13 @@
+@@ -3853,13 +4106,13 @@
_initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
@@ -4430,9 +5433,9 @@
- Bsd::set_page_size(sysconf(_SC_PAGESIZE));
+ Bsd::set_page_size(getpagesize());
if (Bsd::page_size() == -1) {
- fatal1("os_bsd.cpp: os::init: sysconf failed (%s)", strerror(errno));
- }
-@@ -3735,7 +4068,16 @@
+ fatal(err_msg("os_bsd.cpp: os::init: sysconf failed (%s)",
+ strerror(errno)));
+@@ -3873,7 +4126,16 @@
Bsd::clock_init();
initial_time_count = os::elapsed_counter();
@@ -4450,7 +5453,7 @@
}
// To install functions for atexit system call
-@@ -3748,7 +4090,9 @@
+@@ -3886,7 +4148,9 @@
// this is called _after_ the global arguments have been parsed
jint os::init_2(void)
{
@@ -4460,7 +5463,7 @@
// Allocate a single page and mark it as readable for safepoint polling
address polling_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
-@@ -3797,6 +4141,7 @@
+@@ -3935,6 +4199,7 @@
JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes,
vm_page_size()));
@@ -4468,7 +5471,7 @@
Bsd::capture_initial_stack(JavaThread::stack_size_at_create());
Bsd::libpthread_init();
-@@ -3819,6 +4164,7 @@
+@@ -3957,6 +4222,7 @@
UseNUMA = true;
}
}
@@ -4476,7 +5479,7 @@
if (MaxFDLimit) {
// set the number of file descriptors to max. print out error
-@@ -3830,6 +4176,14 @@
+@@ -3968,6 +4234,14 @@
perror("os::init_2 getrlimit failed");
} else {
nbr_files.rlim_cur = nbr_files.rlim_max;
@@ -4491,7 +5494,7 @@
status = setrlimit(RLIMIT_NOFILE, &nbr_files);
if (status != 0) {
if (PrintMiscellaneous && (Verbose || WizardMode))
-@@ -3838,8 +4192,10 @@
+@@ -3976,8 +4250,10 @@
}
}
@@ -4502,7 +5505,7 @@
// Initialize HPI.
jint hpi_result = hpi::initialize();
-@@ -3887,11 +4243,15 @@
+@@ -4028,11 +4304,15 @@
};
int os::active_processor_count() {
@@ -4518,7 +5521,7 @@
}
bool os::distribute_processes(uint length, uint* distribution) {
-@@ -3933,6 +4293,9 @@
+@@ -4074,6 +4354,9 @@
int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime)
{
@@ -4528,7 +5531,7 @@
if (is_NPTL()) {
return pthread_cond_timedwait(_cond, _mutex, _abstime);
} else {
-@@ -3948,6 +4311,7 @@
+@@ -4089,6 +4372,7 @@
#endif // IA64
return status;
}
@@ -4536,7 +5539,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-@@ -4083,17 +4447,17 @@
+@@ -4221,17 +4505,17 @@
if (!rewrite_existing) {
oflags |= O_EXCL;
}
@@ -4557,7 +5560,7 @@
}
// Map a block of memory.
-@@ -4143,6 +4507,7 @@
+@@ -4281,6 +4565,7 @@
return munmap(addr, bytes) == 0;
}
@@ -4565,7 +5568,7 @@
static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time);
static clockid_t thread_cpu_clockid(Thread* thread) {
-@@ -4154,6 +4519,7 @@
+@@ -4292,6 +4577,7 @@
assert(rc == 0, "pthread_getcpuclockid is expected to return 0 code");
return clockid;
}
@@ -4573,7 +5576,7 @@
// current_thread_cpu_time(bool) and thread_cpu_time(Thread*, bool)
// are used by JVM M&M and JVMTI to get user+sys or user CPU time
-@@ -4163,39 +4529,71 @@
+@@ -4301,39 +4587,71 @@
// the fast estimate available on the platform.
jlong os::current_thread_cpu_time() {
@@ -4645,7 +5648,7 @@
//
// -1 on error.
//
-@@ -4284,6 +4682,7 @@
+@@ -4423,6 +4741,7 @@
return (jlong)user_time * (1000000000 / clock_tics_per_sec);
}
}
@@ -4653,7 +5656,7 @@
void os::current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr) {
info_ptr->max_value = ALL_64_BITS; // will not wrap in less than 64 bits
-@@ -4300,7 +4699,13 @@
+@@ -4439,7 +4758,13 @@
}
bool os::is_thread_cpu_time_supported() {
@@ -4667,7 +5670,7 @@
}
// System loadavg support. Returns -1 if load average cannot be obtained.
-@@ -4433,7 +4838,7 @@
+@@ -4572,7 +4897,7 @@
// abstime will be the absolute timeout time
// TODO: replace compute_abstime() with unpackTime()
@@ -4676,7 +5679,7 @@
if (millis < 0) millis = 0;
struct timeval now;
int status = gettimeofday(&now, NULL);
-@@ -4485,7 +4890,7 @@
+@@ -4624,7 +4949,7 @@
status = pthread_cond_wait(_cond, _mutex);
// for some reason, under 2.7 lwp_cond_wait() may return ETIME ...
// Treat this the same as if the wait was interrupted
@@ -4685,7 +5688,7 @@
assert_status(status == 0 || status == EINTR, status, "cond_wait");
}
-- _nParked ;
-@@ -4543,10 +4948,10 @@
+@@ -4682,10 +5007,10 @@
pthread_cond_init (_cond, NULL) ;
}
assert_status(status == 0 || status == EINTR ||
@@ -4698,7 +5701,7 @@
// We consume and ignore EINTR and spurious wakeups.
}
--_nParked ;
-@@ -4638,7 +5043,7 @@
+@@ -4777,7 +5102,7 @@
* years from "now".
*/
@@ -4707,7 +5710,7 @@
assert (time > 0, "convertTime");
struct timeval now;
-@@ -4698,7 +5103,7 @@
+@@ -4837,7 +5162,7 @@
}
// Next, demultiplex/decode time arguments
@@ -4716,7 +5719,7 @@
if (time < 0) { // don't wait at all
return;
}
-@@ -4752,7 +5157,7 @@
+@@ -4891,7 +5216,7 @@
}
}
assert_status(status == 0 || status == EINTR ||
@@ -4725,7 +5728,7 @@
status, "cond_timedwait");
#ifdef ASSERT
-@@ -4795,14 +5200,12 @@
+@@ -4934,14 +5259,12 @@
}
@@ -4745,7 +5748,7 @@
#endif
// Run the specified command in a separate process. Return its exit value,
-@@ -4817,8 +5220,7 @@
+@@ -4956,8 +5279,7 @@
// separate process to execve. Make a direct syscall to fork process.
// On IA64 there's no fork syscall, we have to use fork() and hope for
// the best...
@@ -4755,7 +5758,7 @@
if (pid < 0) {
// fork failed
-@@ -4834,8 +5236,7 @@
+@@ -4973,8 +5295,7 @@
// in the new process, so make a system call directly.
// IA64 should use normal execve() from glibc to match the glibc fork()
// above.
@@ -4765,8 +5768,8 @@
// execve failed
_exit(-1);
---- hotspot/src/os/bsd/vm/os_bsd.hpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/os_bsd.hpp 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/src/os/bsd/vm/os_bsd.hpp 2011-02-07 14:18:01.000000000 -0500
++++ hotspot/src/os/bsd/vm/os_bsd.hpp 2011-02-07 15:03:19.000000000 -0500
@@ -27,6 +27,12 @@
/* pthread_getattr_np comes with BsdThreads-0.9-7 on RedHat 7.1 */
typedef int (*pthread_getattr_func_type) (pthread_t, pthread_attr_t *);
@@ -4796,7 +5799,7 @@
static GrowableArray<int>* _cpu_to_node;
-@@ -65,38 +73,52 @@
+@@ -65,38 +73,54 @@
static julong _physical_memory;
static pthread_t _main_thread;
@@ -4833,10 +5836,12 @@
+#endif
static pthread_t main_thread(void) { return _main_thread; }
+
-+#ifndef _ALLBSD_SOURCE
++#ifdef __FreeBSD__
// returns kernel thread id (similar to LWP id on Solaris), which can be
// used to access /proc
static pid_t gettid();
++#endif
++#ifndef _ALLBSD_SOURCE
static void set_createThread_lock(Mutex* lk) { _createThread_lock = lk; }
static Mutex* createThread_lock(void) { return _createThread_lock; }
+#endif
@@ -4849,7 +5854,7 @@
static bool is_initial_thread(void);
static int page_size(void) { return _page_size; }
-@@ -133,6 +155,7 @@
+@@ -133,6 +157,7 @@
static struct sigaction *get_chained_signal_action(int sig);
static bool chained_handler(int sig, siginfo_t* siginfo, void* context);
@@ -4857,7 +5862,7 @@
// GNU libc and libpthread version strings
static const char *glibc_version() { return _glibc_version; }
static const char *libpthread_version() { return _libpthread_version; }
-@@ -148,6 +171,7 @@
+@@ -148,6 +173,7 @@
static void libpthread_init();
static bool libnuma_init();
static void* libnuma_dlsym(void* handle, const char* name);
@@ -4865,7 +5870,7 @@
// 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;
-@@ -156,17 +180,21 @@
+@@ -156,17 +182,21 @@
static size_t default_stack_size(os::ThreadType thr_type);
static size_t default_guard_size(os::ThreadType thr_type);
@@ -4887,7 +5892,7 @@
static bool supports_monotonic_clock() {
return _clock_gettime != NULL;
-@@ -176,6 +204,7 @@
+@@ -176,6 +206,7 @@
return _clock_gettime ? _clock_gettime(clock_id, tp) : -1;
}
@@ -4895,7 +5900,7 @@
static int pthread_getcpuclockid(pthread_t tid, clockid_t *clock_id) {
return _pthread_getcpuclockid ? _pthread_getcpuclockid(tid, clock_id) : -1;
}
-@@ -185,6 +214,7 @@
+@@ -185,6 +216,7 @@
}
static jlong fast_thread_cpu_time(clockid_t clockid);
@@ -4903,8 +5908,8 @@
// Stack repair handling
---- hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2010-06-27 11:37:41.000000000 -0700
-+++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2010-06-20 21:56:15.000000000 -0700
+--- hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2011-02-01 17:46:59.000000000 -0500
@@ -61,7 +61,15 @@
inline bool os::allocate_stack_guard_pages() {
@@ -4921,124 +5926,13 @@
}
-@@ -109,6 +117,107 @@
- return ::closedir(dirp);
- }
-
-+//XXXBSD: ported from solaris version
-+//////////////////////////////////////////////////////////////////////////////
-+////////////////////////////////////////////////////////////////////////////////
-+
-+// macros for interruptible io and system calls and system call restarting
-+
-+#define _INTERRUPTIBLE(_setup, _cmd, _result, _thread, _clear, _before, _after, _int_enable) \
-+do { \
-+ _setup; \
-+ _before; \
-+ OSThread* _osthread = _thread->osthread(); \
-+ if (_int_enable && _thread->has_last_Java_frame()) { \
-+ /* this is java interruptible io stuff */ \
-+ if (os::is_interrupted(_thread, _clear)) { \
-+ os::Bsd::bump_interrupted_before_count(); \
-+ _result = OS_INTRPT; \
-+ } else { \
-+ /* _cmd always expands to an assignment to _result */ \
-+ if ((_cmd) < 0 && errno == EINTR \
-+ && os::is_interrupted(_thread, _clear)) { \
-+ os::Bsd::bump_interrupted_during_count(); \
-+ _result = OS_INTRPT; \
-+ } \
-+ } \
-+ } else { \
-+ /* this is normal blocking io stuff */ \
-+ _cmd; \
-+ } \
-+ _after; \
-+} while(false)
-+
-+// Interruptible io support + restarting of interrupted system calls
-+
-+#ifndef ASSERT
-+
-+#define INTERRUPTIBLE(_cmd, _result, _clear) do { \
-+ _INTERRUPTIBLE( JavaThread* _thread = (JavaThread*)ThreadLocalStorage::thread(),_result = _cmd, _result, _thread, _clear, , , UseVMInterruptibleIO); \
-+} while((_result == OS_ERR) && (errno == EINTR))
-+
-+#else
-+
-+// This adds an assertion that it is only called from thread_in_native
-+// The call overhead is skipped for performance in product mode
-+#define INTERRUPTIBLE(_cmd, _result, _clear) do { \
-+ _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible_native(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible_native(_thread), UseVMInterruptibleIO ); \
-+} while((_result == OS_ERR) && (errno == EINTR))
-+
-+#endif
-+
-+// Used for calls from _thread_in_vm, not from _thread_in_native
-+#define INTERRUPTIBLE_VM(_cmd, _result, _clear) do { \
-+ _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible(_thread), UseVMInterruptibleIO ); \
-+} while((_result == OS_ERR) && (errno == EINTR))
-+
-+/* Use NORESTART when the system call cannot return EINTR, when something other
-+ than a system call is being invoked, or when the caller must do EINTR
-+ handling. */
-+
-+#ifndef ASSERT
-+
-+#define INTERRUPTIBLE_NORESTART(_cmd, _result, _clear) \
-+ _INTERRUPTIBLE( JavaThread* _thread = (JavaThread*)ThreadLocalStorage::thread(),_result = _cmd, _result, _thread, _clear, , , UseVMInterruptibleIO)
-+
-+#else
-+
-+// This adds an assertion that it is only called from thread_in_native
-+// The call overhead is skipped for performance in product mode
-+#define INTERRUPTIBLE_NORESTART(_cmd, _result, _clear) \
-+ _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible_native(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible_native(_thread), UseVMInterruptibleIO )
-+
-+#endif
-+
-+// Don't attend to UseVMInterruptibleIO. Always allow interruption.
-+// Also assumes that it is called from the _thread_blocked state.
-+// Used by os_sleep().
-+
-+#define INTERRUPTIBLE_NORESTART_VM_ALWAYS(_cmd, _result, _thread, _clear) \
-+ _INTERRUPTIBLE(os::Bsd::setup_interruptible_already_blocked(_thread), _result = _cmd, _result, _thread, _clear, , , true )
-+
-+#define INTERRUPTIBLE_RETURN_INT(_cmd, _clear) do { \
-+ int _result; \
-+ do { \
-+ INTERRUPTIBLE(_cmd, _result, _clear); \
-+ } while((_result == OS_ERR) && (errno == EINTR)); \
-+ return _result; \
-+} while(false)
-+
-+#define INTERRUPTIBLE_RETURN_INT_VM(_cmd, _clear) do { \
-+ int _result; \
-+ do { \
-+ INTERRUPTIBLE_VM(_cmd, _result, _clear); \
-+ } while((_result == OS_ERR) && (errno == EINTR)); \
-+ return _result; \
-+} while(false)
-+
-+#define INTERRUPTIBLE_RETURN_INT_NORESTART(_cmd, _clear) do { \
-+ int _result; \
-+ INTERRUPTIBLE_NORESTART(_cmd, _result, _clear); \
-+ return _result; \
-+} while(false)
-+
- // macros for restartable system calls
-
- #define RESTARTABLE(_cmd, _result) do { \
---- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2010-06-20 21:56:15.000000000 -0700
-@@ -21,6 +21,22 @@
+--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s 2011-02-01 17:47:12.000000000 -0500
+@@ -21,6 +21,17 @@
# questions.
#
-+
-+
-+ .ident "@(#)bsd_x86_32.s 1.10 07/05/17 15:48:59 JVM"
-+
++
+#ifdef __APPLE__
+# Darwin uses _ prefixed global symbols
+#define SYMBOL(s) _ ## s
@@ -5048,13 +5942,11 @@
+#define ELF_TYPE(name, description) .type name,description
+#endif
+
-+ .globl SYMBOL(fixcw)
-+
-+
++ .globl SYMBOL(fixcw)
# NOTE WELL! The _Copy functions are called directly
# from server-compiler-generated code via CallLeafNoFP,
-@@ -28,41 +44,62 @@
+@@ -28,41 +39,61 @@
# point or use it in the same manner as does the server
# compiler.
@@ -5088,13 +5980,13 @@
+#ifdef __APPLE__
+ .align 4
+#else
-+ .align 16
++ .align 16
+#endif
+SYMBOL(fixcw):
-+ pushl $0x27f
-+ fldcw 0(%esp)
-+ popl %eax
-+ ret
++ pushl $0x27f
++ fldcw 0(%esp)
++ popl %eax
++ ret
+
+#ifdef __APPLE__
+ .align 4
@@ -5102,7 +5994,6 @@
+ .align 16
+#endif
+
-+
+ .globl SYMBOL(SafeFetch32), SYMBOL(Fetch32PFI), SYMBOL(Fetch32Resume)
+ .globl SYMBOL(SafeFetchN)
## TODO: avoid exposing Fetch32PFI and Fetch32Resume.
@@ -5136,7 +6027,7 @@
rep
nop
movl $1, %eax
-@@ -72,8 +109,8 @@
+@@ -72,8 +103,8 @@
# void* to,
# size_t count)
.p2align 4,,15
@@ -5147,7 +6038,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -180,8 +217,8 @@
+@@ -180,8 +211,8 @@
#
# Same as _Copy_conjoint_bytes, except no source alignment check.
.p2align 4,,15
@@ -5158,7 +6049,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -268,8 +305,8 @@
+@@ -268,8 +299,8 @@
# void* to,
# size_t count)
.p2align 4,,15
@@ -5169,7 +6060,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -354,8 +391,8 @@
+@@ -355,8 +386,8 @@
# void* to,
# size_t count)
.p2align 4,,15
@@ -5180,7 +6071,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -431,10 +468,10 @@
+@@ -432,10 +463,10 @@
# Equivalent to
# arrayof_conjoint_jints
.p2align 4,,15
@@ -5195,7 +6086,7 @@
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
-@@ -494,7 +531,7 @@
+@@ -497,7 +528,7 @@
#
# count treated as signed
#
@@ -5204,7 +6095,7 @@
# while (--count >= 0) {
# *to++ = *from++;
# }
-@@ -504,8 +541,8 @@
+@@ -507,8 +538,8 @@
# }
# }
.p2align 4,,15
@@ -5215,7 +6106,7 @@
movl 4+8(%esp),%ecx # count
movl 4+0(%esp),%eax # from
movl 4+4(%esp),%edx # to
-@@ -533,8 +570,8 @@
+@@ -536,8 +567,8 @@
# void* to,
# size_t count)
.p2align 4,,15
@@ -5226,7 +6117,7 @@
pushl %esi
movl 4+12(%esp),%ecx
pushl %edi
-@@ -632,8 +669,8 @@
+@@ -635,8 +666,8 @@
# bool is_MP)
#
.p2align 4,,15
@@ -5237,12 +6128,12 @@
# 8(%esp) : return PC
pushl %ebx # 4(%esp) : old %ebx
pushl %edi # 0(%esp) : old %edi
---- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2010-06-20 21:56:15.000000000 -0700
-@@ -22,48 +22,70 @@
+--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s 2011-02-01 17:47:12.000000000 -0500
+@@ -21,6 +21,14 @@
+ # questions.
#
-
+#ifdef __APPLE__
+# Darwin uses _ prefixed global symbols
+#define SYMBOL(s) _ ## s
@@ -5251,11 +6142,10 @@
+#define SYMBOL(s) s
+#define ELF_TYPE(name, description) .type name,description
+#endif
-+
-+
+
# NOTE WELL! The _Copy functions are called directly
# from server-compiler-generated code via CallLeafNoFP,
- # which means that they *must* either not use floating
+@@ -28,42 +36,54 @@
# point or use it in the same manner as does the server
# compiler.
@@ -5331,7 +6221,7 @@
rep
nop
movq $1, %rax
-@@ -77,8 +99,8 @@
+@@ -77,8 +97,8 @@
# rdx - count, treated as ssize_t
#
.p2align 4,,15
@@ -5342,7 +6232,7 @@
movq %rdx,%r8 # byte count
shrq $3,%rdx # qword count
cmpq %rdi,%rsi
-@@ -179,10 +201,10 @@
+@@ -179,10 +199,10 @@
# rdx - count, treated as ssize_t
#
.p2align 4,,15
@@ -5357,7 +6247,7 @@
movq %rdx,%r8 # word count
shrq $2,%rdx # qword count
cmpq %rdi,%rsi
-@@ -269,10 +291,10 @@
+@@ -269,10 +289,10 @@
# rdx - count, treated as ssize_t
#
.p2align 4,,15
@@ -5372,7 +6262,7 @@
movq %rdx,%r8 # dword count
shrq %rdx # qword count
cmpq %rdi,%rsi
-@@ -348,10 +370,10 @@
+@@ -348,10 +368,10 @@
# rdx - count, treated as ssize_t
#
.p2align 4,,15
@@ -5387,9 +6277,9 @@
cmpq %rdi,%rsi
leaq -8(%rdi,%rdx,8),%rax # from + count*8 - 8
jbe acl_CopyRight
---- hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2010-06-20 21:56:15.000000000 -0700
-@@ -22,7 +22,29 @@
+--- hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os_cpu/bsd_x86/vm/bytes_bsd_x86.inline.hpp 2011-02-01 17:47:12.000000000 -0500
+@@ -22,7 +22,33 @@
*
*/
@@ -5410,6 +6300,10 @@
+# define bswap_16(x) swap16(x)
+# define bswap_32(x) swap32(x)
+# define bswap_64(x) swap64(x)
++# elif defined(__NetBSD__)
++# define bswap_16(x) bswap16(x)
++# define bswap_32(x) bswap32(x)
++# define bswap_64(x) bswap64(x)
+# else
+# define bswap_16(x) __bswap16(x)
+# define bswap_32(x) __bswap32(x)
@@ -5419,9 +6313,37 @@
// Efficient swapping of data bytes from Java byte
// ordering to native byte ordering and vice versa.
---- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2010-06-20 21:56:15.000000000 -0700
-@@ -44,23 +44,158 @@
+--- hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp 2011-02-01 17:47:12.000000000 -0500
+@@ -22,9 +22,10 @@
+ *
+ */
+
++//
+ // Sets the default values for platform dependent flags used by the runtime system.
+ // (see globals.hpp)
+-
++//
+ define_pd_global(bool, DontYieldALot, false);
+ #ifdef AMD64
+ define_pd_global(intx, ThreadStackSize, 1024); // 0 => use system default
+@@ -38,10 +39,11 @@
+ #endif // AMD64
+
+ define_pd_global(intx, CompilerThreadStackSize, 0);
++define_pd_global(intx, SurvivorRatio, 8);
+
+-define_pd_global(uintx,JVMInvokeMethodSlack, 8192);
++define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
+
+ // Only used on 64 bit platforms
+-define_pd_global(uintx,HeapBaseMinAddress, 2*G);
++define_pd_global(uintx, HeapBaseMinAddress, 2*G);
+ // Only used on 64 bit Windows platforms
+ define_pd_global(bool, UseVectoredExceptions, false);
+--- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2011-02-01 17:53:57.000000000 -0500
+@@ -44,23 +44,202 @@
# include <sys/wait.h>
# include <pwd.h>
# include <poll.h>
@@ -5430,7 +6352,7 @@
-# include <fpu_control.h>
+#endif
+
-+#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__)
++#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) && !defined(__NetBSD__)
+# include <pthread_np.h>
+#endif
@@ -5584,10 +6506,54 @@
+# endif
+#endif
+
++#ifdef __NetBSD__
++# define context_trapno uc_mcontext.__gregs[_REG_TRAPNO]
++# ifdef AMD64
++# define __register_t __greg_t
++# define context_pc uc_mcontext.__gregs[_REG_RIP]
++# define context_sp uc_mcontext.__gregs[_REG_URSP]
++# define context_fp uc_mcontext.__gregs[_REG_RBP]
++# define context_rip uc_mcontext.__gregs[_REG_RIP]
++# define context_rsp uc_mcontext.__gregs[_REG_URSP]
++# define context_rax uc_mcontext.__gregs[_REG_RAX]
++# define context_rbx uc_mcontext.__gregs[_REG_RBX]
++# define context_rcx uc_mcontext.__gregs[_REG_RCX]
++# define context_rdx uc_mcontext.__gregs[_REG_RDX]
++# define context_rbp uc_mcontext.__gregs[_REG_RBP]
++# define context_rsi uc_mcontext.__gregs[_REG_RSI]
++# define context_rdi uc_mcontext.__gregs[_REG_RDI]
++# define context_r8 uc_mcontext.__gregs[_REG_R8]
++# define context_r9 uc_mcontext.__gregs[_REG_R9]
++# define context_r10 uc_mcontext.__gregs[_REG_R10]
++# define context_r11 uc_mcontext.__gregs[_REG_R11]
++# define context_r12 uc_mcontext.__gregs[_REG_R12]
++# define context_r13 uc_mcontext.__gregs[_REG_R13]
++# define context_r14 uc_mcontext.__gregs[_REG_R14]
++# define context_r15 uc_mcontext.__gregs[_REG_R15]
++# define context_flags uc_mcontext.__gregs[_REG_RFL]
++# define context_err uc_mcontext.__gregs[_REG_ERR]
++# else
++# define context_pc uc_mcontext.__gregs[_REG_EIP]
++# define context_sp uc_mcontext.__gregs[_REG_UESP]
++# define context_fp uc_mcontext.__gregs[_REG_EBP]
++# define context_eip uc_mcontext.__gregs[_REG_EIP]
++# define context_esp uc_mcontext.__gregs[_REG_UESP]
++# define context_eax uc_mcontext.__gregs[_REG_EAX]
++# define context_ebx uc_mcontext.__gregs[_REG_EBX]
++# define context_ecx uc_mcontext.__gregs[_REG_ECX]
++# define context_edx uc_mcontext.__gregs[_REG_EDX]
++# define context_ebp uc_mcontext.__gregs[_REG_EBP]
++# define context_esi uc_mcontext.__gregs[_REG_ESI]
++# define context_edi uc_mcontext.__gregs[_REG_EDI]
++# define context_eflags uc_mcontext.__gregs[_REG_EFL]
++# define context_trapno uc_mcontext.__gregs[_REG_TRAPNO]
++# endif
++#endif
++
address os::current_stack_pointer() {
#ifdef SPARC_WORKS
register void *esp;
-@@ -85,15 +220,15 @@
+@@ -85,15 +264,15 @@
}
address os::Bsd::ucontext_get_pc(ucontext_t * uc) {
@@ -5606,7 +6572,7 @@
}
// For Forte Analyzer AsyncGetCallTrace profiling support - thread
-@@ -245,18 +380,18 @@
+@@ -245,18 +424,18 @@
pc = (address) os::Bsd::ucontext_get_pc(uc);
if (pc == (address) Fetch32PFI) {
@@ -5628,7 +6594,7 @@
address addr = (address) info->si_addr;
// check if fault address is within thread stack
-@@ -278,6 +413,7 @@
+@@ -278,6 +457,7 @@
// to handle_unexpected_exception way down below.
thread->disable_stack_red_zone();
tty->print_raw_cr("An irrecoverable stack overflow has occurred.");
@@ -5636,7 +6602,7 @@
} else {
// Accessing stack address below sp may cause SEGV if current
// thread has MAP_GROWSDOWN stack. This should only happen when
-@@ -293,6 +429,7 @@
+@@ -293,6 +473,7 @@
} else {
fatal("recursive segv. expanding stack.");
}
@@ -5644,7 +6610,7 @@
}
}
}
-@@ -301,9 +438,16 @@
+@@ -301,9 +482,16 @@
// Java thread running in Java code => find exception handler if any
// a fault inside compiled code, the interpreter, or a stub
@@ -5662,7 +6628,7 @@
// BugId 4454115: A read from a MappedByteBuffer can fault
// here if the underlying file has been truncated.
// Do not crash the VM in such a case.
-@@ -324,6 +468,28 @@
+@@ -324,6 +512,28 @@
pc,
SharedRuntime::
IMPLICIT_DIVIDE_BY_ZERO);
@@ -5691,7 +6657,7 @@
#else
if (sig == SIGFPE /* && info->si_code == FPE_INTDIV */) {
// HACK: si_code does not work on bsd 2.2.12-20!!!
-@@ -351,7 +517,7 @@
+@@ -351,7 +561,7 @@
fatal("please update this code.");
}
#endif // AMD64
@@ -5700,7 +6666,7 @@
!MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
// Determination of interpreter/vtable stub/compiled code null exception
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
-@@ -375,7 +541,7 @@
+@@ -375,7 +585,7 @@
// process of write protecting the memory serialization page.
// It write enables the page immediately after protecting it
// so we can just return to retry the write.
@@ -5709,7 +6675,7 @@
os::is_memory_serialize_page(thread, (address) info->si_addr)) {
// Block current thread until the memory serialize page permission restored.
os::block_on_serialize_page_trap();
-@@ -396,7 +562,7 @@
+@@ -396,7 +606,7 @@
// Furthermore, a false-positive should be harmless.
if (UnguardOnExecutionViolation > 0 &&
(sig == SIGSEGV || sig == SIGBUS) &&
@@ -5718,7 +6684,7 @@
int page_size = os::vm_page_size();
address addr = (address) info->si_addr;
address pc = os::Bsd::ucontext_get_pc(uc);
-@@ -466,7 +632,7 @@
+@@ -466,7 +676,7 @@
// save all thread context in case we need to restore it
if (thread != NULL) thread->set_saved_exception_pc(pc);
@@ -5727,7 +6693,7 @@
return true;
}
-@@ -496,13 +662,24 @@
+@@ -496,13 +706,24 @@
ShouldNotReachHere();
}
@@ -5752,7 +6718,7 @@
int os::Bsd::get_fpu_control_word(void) {
#ifdef AMD64
return 0;
-@@ -518,11 +695,12 @@
+@@ -518,11 +739,12 @@
_FPU_SETCW(fpu_control);
#endif // !AMD64
}
@@ -5766,7 +6732,7 @@
return true;
#else
struct utsname uts;
-@@ -576,6 +754,9 @@
+@@ -576,6 +798,9 @@
#define GET_GS() ({int gs; __asm__ volatile("movw %%gs, %w0":"=q"(gs)); gs&0xffff;})
#endif
@@ -5776,7 +6742,16 @@
// Test if pthread library can support variable thread stack size. BsdThreads
// in fixed stack mode allocates 2M fixed slot for each thread. BsdThreads
// in floating stack mode and NPTL support variable stack size.
-@@ -612,6 +793,7 @@
+@@ -598,7 +823,7 @@
+ //
+ // Note that %gs is a reserved glibc register since early 2001, so
+ // applications are not allowed to change its value (Ulrich Drepper from
+- // Red Hat confirmed that all known offenders have been modified to use
++ // Redhat confirmed that all known offenders have been modified to use
+ // either %fs or TSD). In the worst case scenario, when VM is embedded in
+ // a native application that plays with %gs, we might see non-zero %gs
+ // even BsdThreads is running in fixed stack mode. As the result, we'll
+@@ -612,6 +837,7 @@
#endif
}
}
@@ -5784,7 +6759,7 @@
#endif // AMD64
// return default stack size for thr_type
-@@ -665,6 +847,41 @@
+@@ -665,6 +891,41 @@
// pthread_attr_getstack()
static void current_stack_region(address * bottom, size_t * size) {
@@ -5798,7 +6773,7 @@
+ int rslt = pthread_stackseg_np(pthread_self(), &ss);
+
+ if (rslt != 0)
-+ fatal1("pthread_stackseg_np failed with err = %d", rslt);
++ fatal(err_msg("pthread_stackseg_np failed with err = %d", rslt));
+
+ *bottom = (address)((char *)ss.ss_sp - ss.ss_size);
+ *size = ss.ss_size;
@@ -5809,12 +6784,12 @@
+
+ // JVM needs to know exact stack location, abort if it fails
+ if (rslt != 0)
-+ fatal1("pthread_attr_init failed with err = %d", rslt);
++ fatal(err_msg("pthread_attr_init failed with err = %d", rslt));
+
+ rslt = pthread_attr_get_np(pthread_self(), &attr);
+
+ if (rslt != 0)
-+ fatal1("pthread_attr_get_np failed with err = %d", rslt);
++ fatal(err_msg("pthread_attr_get_np failed with err = %d", rslt));
+
+ if (pthread_attr_getstackaddr(&attr, (void **)bottom) != 0 ||
+ pthread_attr_getstacksize(&attr, size) != 0) {
@@ -5826,7 +6801,7 @@
if (os::Bsd::is_initial_thread()) {
// initial thread needs special handling because pthread_getattr_np()
// may return bogus value.
-@@ -691,6 +908,7 @@
+@@ -691,6 +952,7 @@
pthread_attr_destroy(&attr);
}
@@ -5834,70 +6809,165 @@
assert(os::current_stack_pointer() >= *bottom &&
os::current_stack_pointer() < *bottom + *size, "just checking");
}
-@@ -719,46 +937,44 @@
- ucontext_t *uc = (ucontext_t*)context;
- st->print_cr("Registers:");
+@@ -724,34 +986,32 @@
+ // we can't just iterate through the gregs area
+
#ifdef AMD64
- st->print( "RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]);
- st->print(", RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]);
- st->print(", RCX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RCX]);
- st->print(", RDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDX]);
-+ st->print( "RAX=" INTPTR_FORMAT, uc->context_rax);
-+ st->print(", RBX=" INTPTR_FORMAT, uc->context_rbx);
-+ st->print(", RCX=" INTPTR_FORMAT, uc->context_rcx);
-+ st->print(", RDX=" INTPTR_FORMAT, uc->context_rdx);
- st->cr();
+- st->cr();
- st->print( "RSP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSP]);
- st->print(", RBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBP]);
- st->print(", RSI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSI]);
- st->print(", RDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDI]);
-+ st->print( "RSP=" INTPTR_FORMAT, uc->context_rsp);
-+ st->print(", RBP=" INTPTR_FORMAT, uc->context_rbp);
-+ st->print(", RSI=" INTPTR_FORMAT, uc->context_rsi);
-+ st->print(", RDI=" INTPTR_FORMAT, uc->context_rdi);
- st->cr();
+- st->cr();
- st->print( "R8 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R8]);
- st->print(", R9 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R9]);
- st->print(", R10=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R10]);
- st->print(", R11=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R11]);
-+ st->print( "R8 =" INTPTR_FORMAT, uc->context_r8);
-+ st->print(", R9 =" INTPTR_FORMAT, uc->context_r9);
-+ st->print(", R10=" INTPTR_FORMAT, uc->context_r10);
-+ st->print(", R11=" INTPTR_FORMAT, uc->context_r11);
- st->cr();
+- st->cr();
- st->print( "R12=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R12]);
- st->print(", R13=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R13]);
- st->print(", R14=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R14]);
- st->print(", R15=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R15]);
-+ st->print( "R12=" INTPTR_FORMAT, uc->context_r12);
-+ st->print(", R13=" INTPTR_FORMAT, uc->context_r13);
-+ st->print(", R14=" INTPTR_FORMAT, uc->context_r14);
-+ st->print(", R15=" INTPTR_FORMAT, uc->context_r15);
- st->cr();
+- st->cr();
- st->print( "RIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RIP]);
- st->print(", EFL=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
- st->print(", CSGSFS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_CSGSFS]);
- st->print(", ERR=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ERR]);
+- st->cr();
+- st->print(" TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_TRAPNO]);
+-
++ st->print( "RAX=" INTPTR_FORMAT, uc->context_rax);
++ st->print(", RBX=" INTPTR_FORMAT, uc->context_rbx);
++ st->print(", RCX=" INTPTR_FORMAT, uc->context_rcx);
++ st->print(", RDX=" INTPTR_FORMAT, uc->context_rdx);
++ st->cr();
++ st->print( "RSP=" INTPTR_FORMAT, uc->context_rsp);
++ st->print(", RBP=" INTPTR_FORMAT, uc->context_rbp);
++ st->print(", RSI=" INTPTR_FORMAT, uc->context_rsi);
++ st->print(", RDI=" INTPTR_FORMAT, uc->context_rdi);
++ st->cr();
++ st->print( "R8 =" INTPTR_FORMAT, uc->context_r8);
++ st->print(", R9 =" INTPTR_FORMAT, uc->context_r9);
++ st->print(", R10=" INTPTR_FORMAT, uc->context_r10);
++ st->print(", R11=" INTPTR_FORMAT, uc->context_r11);
++ st->cr();
++ st->print( "R12=" INTPTR_FORMAT, uc->context_r12);
++ st->print(", R13=" INTPTR_FORMAT, uc->context_r13);
++ st->print(", R14=" INTPTR_FORMAT, uc->context_r14);
++ st->print(", R15=" INTPTR_FORMAT, uc->context_r15);
++ st->cr();
+ st->print( "RIP=" INTPTR_FORMAT, uc->context_rip);
+ st->print(", EFL=" INTPTR_FORMAT, uc->context_flags);
+ st->print(", ERR=" INTPTR_FORMAT, uc->context_err);
st->cr();
-- st->print(" TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_TRAPNO]);
+ st->print(" TRAPNO=" INTPTR_FORMAT, uc->context_trapno);
++ st->cr();
+ st->cr();
+
+ st->print_cr("Register to memory mapping:");
+@@ -759,68 +1019,67 @@
+
+ // this is only for the "general purpose" registers
+
+- st->print_cr("RAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RAX]);
+- print_location(st, uc->uc_mcontext.gregs[REG_RAX]);
++ st->print_cr("RAX=" INTPTR_FORMAT, uc->context_rax);
++ print_location(st, uc->context_rax);
+ st->cr();
+- st->print_cr("RBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBX]);
+- print_location(st, uc->uc_mcontext.gregs[REG_RBX]);
++ st->print_cr("RBX=" INTPTR_FORMAT, uc->context_rbx);
++ print_location(st, uc->context_rbx);
+ st->cr();
+- st->print_cr("RCX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RCX]);
+- print_location(st, uc->uc_mcontext.gregs[REG_RCX]);
++ st->print_cr("RCX=" INTPTR_FORMAT, uc->context_rcx);
++ print_location(st, uc->context_rcx);
+ st->cr();
+- st->print_cr("RDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDX]);
+- print_location(st, uc->uc_mcontext.gregs[REG_RDX]);
++ st->print_cr("RDX=" INTPTR_FORMAT, uc->context_rdx);
++ print_location(st, uc->context_rdx);
+ st->cr();
+- st->print_cr("RSP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSP]);
+- print_location(st, uc->uc_mcontext.gregs[REG_RSP]);
++ st->print_cr("RSP=" INTPTR_FORMAT, uc->context_rsp);
++ print_location(st, uc->context_rsp);
+ st->cr();
+- st->print_cr("RBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RBP]);
+- print_location(st, uc->uc_mcontext.gregs[REG_RBP]);
++ st->print_cr("RBP=" INTPTR_FORMAT, uc->context_rbp);
++ print_location(st, uc->context_rbp);
+ st->cr();
+- st->print_cr("RSI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RSI]);
+- print_location(st, uc->uc_mcontext.gregs[REG_RSI]);
++ st->print_cr("RSI=" INTPTR_FORMAT, uc->context_rsi);
++ print_location(st, uc->context_rsi);
+ st->cr();
+- st->print_cr("RDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RDI]);
+- print_location(st, uc->uc_mcontext.gregs[REG_RDI]);
++ st->print_cr("RDI=" INTPTR_FORMAT, uc->context_rdi);
++ print_location(st, uc->context_rdi);
+ st->cr();
+- st->print_cr("R8 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R8]);
+- print_location(st, uc->uc_mcontext.gregs[REG_R8]);
++ st->print_cr("R8 =" INTPTR_FORMAT, uc->context_r8);
++ print_location(st, uc->context_r8);
+ st->cr();
+- st->print_cr("R9 =" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R9]);
+- print_location(st, uc->uc_mcontext.gregs[REG_R9]);
++ st->print_cr("R9 =" INTPTR_FORMAT, uc->context_r9);
++ print_location(st, uc->context_r9);
+ st->cr();
+- st->print_cr("R10=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R10]);
+- print_location(st, uc->uc_mcontext.gregs[REG_R10]);
++ st->print_cr("R10=" INTPTR_FORMAT, uc->context_r10);
++ print_location(st, uc->context_r10);
+ st->cr();
+- st->print_cr("R11=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R11]);
+- print_location(st, uc->uc_mcontext.gregs[REG_R11]);
++ st->print_cr("R11=" INTPTR_FORMAT, uc->context_r11);
++ print_location(st, uc->context_r11);
+ st->cr();
+- st->print_cr("R12=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R12]);
+- print_location(st, uc->uc_mcontext.gregs[REG_R12]);
++ st->print_cr("R12=" INTPTR_FORMAT, uc->context_r12);
++ print_location(st, uc->context_r12);
+ st->cr();
+- st->print_cr("R13=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R13]);
+- print_location(st, uc->uc_mcontext.gregs[REG_R13]);
++ st->print_cr("R13=" INTPTR_FORMAT, uc->context_r13);
++ print_location(st, uc->context_r13);
+ st->cr();
+- st->print_cr("R14=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R14]);
+- print_location(st, uc->uc_mcontext.gregs[REG_R14]);
++ st->print_cr("R14=" INTPTR_FORMAT, uc->context_r14);
++ print_location(st, uc->context_r14);
+ st->cr();
+- st->print_cr("R15=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_R15]);
+- print_location(st, uc->uc_mcontext.gregs[REG_R15]);
++ st->print_cr("R15=" INTPTR_FORMAT, uc->context_r15);
++ print_location(st, uc->context_r15);
+
#else
- st->print( "EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]);
- st->print(", EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]);
- st->print(", ECX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ECX]);
- st->print(", EDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDX]);
-+ st->print( "EAX=" INTPTR_FORMAT, uc->context_eax);
-+ st->print(", EBX=" INTPTR_FORMAT, uc->context_ebx);
-+ st->print(", ECX=" INTPTR_FORMAT, uc->context_ecx);
-+ st->print(", EDX=" INTPTR_FORMAT, uc->context_edx);
- st->cr();
+- st->cr();
- st->print( "ESP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_UESP]);
- st->print(", EBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBP]);
- st->print(", ESI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESI]);
- st->print(", EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDI]);
++ st->print( "EAX=" INTPTR_FORMAT, uc->context_eax);
++ st->print(", EBX=" INTPTR_FORMAT, uc->context_ebx);
++ st->print(", ECX=" INTPTR_FORMAT, uc->context_ecx);
++ st->print(", EDX=" INTPTR_FORMAT, uc->context_edx);
++ st->cr();
+ st->print( "ESP=" INTPTR_FORMAT, uc->context_esp);
+ st->print(", EBP=" INTPTR_FORMAT, uc->context_ebp);
+ st->print(", ESI=" INTPTR_FORMAT, uc->context_esi);
@@ -5908,11 +6978,57 @@
- st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
+ st->print( "EIP=" INTPTR_FORMAT, uc->context_eip);
+ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags);
- #endif // AMD64
+
+ st->cr();
+ st->cr();
+@@ -830,29 +1089,29 @@
+
+ // this is only for the "general purpose" registers
+
+- st->print_cr("EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]);
+- print_location(st, uc->uc_mcontext.gregs[REG_EAX]);
++ st->print_cr("EAX=" INTPTR_FORMAT, uc->context_eax);
++ print_location(st, uc->context_eax);
+ st->cr();
+- st->print_cr("EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]);
+- print_location(st, uc->uc_mcontext.gregs[REG_EBX]);
++ st->print_cr("EBX=" INTPTR_FORMAT, uc->context_ebx);
++ print_location(st, uc->context_ebx);
+ st->cr();
+- st->print_cr("ECX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ECX]);
+- print_location(st, uc->uc_mcontext.gregs[REG_ECX]);
++ st->print_cr("ECX=" INTPTR_FORMAT, uc->context_ecx);
++ print_location(st, uc->context_ecx);
+ st->cr();
+- st->print_cr("EDX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDX]);
+- print_location(st, uc->uc_mcontext.gregs[REG_EDX]);
++ st->print_cr("EDX=" INTPTR_FORMAT, uc->context_edx);
++ print_location(st, uc->context_edx);
st->cr();
+- st->print_cr("ESP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESP]);
+- print_location(st, uc->uc_mcontext.gregs[REG_ESP]);
++ st->print_cr("ESP=" INTPTR_FORMAT, uc->context_esp);
++ print_location(st, uc->context_esp);
st->cr();
---- hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2010-06-20 21:56:15.000000000 -0700
+- st->print_cr("EBP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBP]);
+- print_location(st, uc->uc_mcontext.gregs[REG_EBP]);
++ st->print_cr("EBP=" INTPTR_FORMAT, uc->context_ebp);
++ print_location(st, uc->context_ebp);
+ st->cr();
+- st->print_cr("ESI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ESI]);
+- print_location(st, uc->uc_mcontext.gregs[REG_ESI]);
++ st->print_cr("ESI=" INTPTR_FORMAT, uc->context_esi);
++ print_location(st, uc->context_esi);
+ st->cr();
+- st->print_cr("EDI=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EDI]);
+- print_location(st, uc->uc_mcontext.gregs[REG_EDI]);
++ st->print_cr("EDI=" INTPTR_FORMAT, uc->context_edi);
++ print_location(st, uc->context_edi);
+
+ #endif // AMD64
+ st->cr();
+--- hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2011-02-01 17:20:22.000000000 -0500
++++ hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp 2011-02-01 17:47:12.000000000 -0500
@@ -27,8 +27,10 @@
#ifndef AMD64
// map stack pointer to thread pointer - see notes in threadLS_bsd_x86.cpp
@@ -5924,19 +7040,36 @@
static Thread* _sp_map[1UL << (SP_BITLENGTH - PAGE_SHIFT)];
#endif // !AMD64
---- hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2010-06-27 11:37:42.000000000 -0700
-+++ hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2010-06-20 21:56:15.000000000 -0700
-@@ -31,7 +31,7 @@
- /******************************/ \
- /* Threads (NOTE: incomplete) */ \
+--- hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2011-02-04 16:46:33.000000000 -0500
++++ hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2011-02-04 19:21:40.000000000 -0500
+@@ -26,6 +26,7 @@
+ // constants required by the Serviceability Agent. This file is
+ // referenced by vmStructs.cpp.
+
++#ifdef __FreeBSD__
+ #define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \
+ \
/******************************/ \
-- nonstatic_field(OSThread, _thread_id, pid_t) \
-+ nonstatic_field(OSThread, _thread_id, pthread_t) \
+@@ -35,6 +36,17 @@
nonstatic_field(OSThread, _pthread_id, pthread_t) \
/* This must be the last entry, and must be present */ \
last_entry()
---- hotspot/src/share/vm/adlc/adlc.hpp 2010-06-21 14:12:17.000000000 -0700
-+++ hotspot/src/share/vm/adlc/adlc.hpp 2010-06-20 21:56:15.000000000 -0700
++#else
++#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \
++ \
++ /******************************/ \
++ /* Threads (NOTE: incomplete) */ \
++ /******************************/ \
++ nonstatic_field(OSThread, _thread_id, pthread_t) \
++ nonstatic_field(OSThread, _pthread_id, pthread_t) \
++ /* This must be the last entry, and must be present */ \
++ last_entry()
++#endif
+
+
+ #define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \
+--- hotspot/src/share/vm/adlc/adlc.hpp 2011-01-20 18:51:18.000000000 -0500
++++ hotspot/src/share/vm/adlc/adlc.hpp 2011-02-01 17:47:12.000000000 -0500
@@ -69,9 +69,9 @@
#endif
#endif // _WIN32
@@ -5949,31 +7082,20 @@
// Macros
#define uint32 unsigned int
---- hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew 2010-06-21 14:12:18.000000000 -0700
-+++ hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew 2010-06-20 21:56:16.000000000 -0700
-@@ -32,6 +32,8 @@
- asParNewGeneration.cpp markOop.inline.hpp
- asParNewGeneration.cpp markSweep.inline.hpp
- asParNewGeneration.cpp oop.pcgc.inline.hpp
-+asParNewGeneration.cpp markOop.inline.hpp
-+asParNewGeneration.cpp markSweep.inline.hpp
- asParNewGeneration.cpp parNewGeneration.hpp
- asParNewGeneration.cpp referencePolicy.hpp
- asParNewGeneration.cpp spaceDecorator.hpp
---- hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge 2010-06-21 14:12:18.000000000 -0700
-+++ hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge 2010-06-20 21:56:16.000000000 -0700
-@@ -314,6 +314,8 @@
- psPermGen.cpp psMarkSweepDecorator.hpp
- psPermGen.cpp psParallelCompact.hpp
- psPermGen.cpp psPermGen.hpp
-+psPermGen.cpp markOop.inline.hpp
-+psPermGen.cpp markSweep.inline.hpp
-
- psPermGen.hpp psOldGen.hpp
-
---- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2010-06-21 14:12:19.000000000 -0700
-+++ hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2010-06-20 21:56:16.000000000 -0700
-@@ -77,7 +77,7 @@
+--- hotspot/src/share/vm/classfile/javaClasses.cpp 2011-01-20 18:51:18.000000000 -0500
++++ hotspot/src/share/vm/classfile/javaClasses.cpp 2011-02-01 17:47:12.000000000 -0500
+@@ -952,7 +952,7 @@
+ }
+ nmethod* nm = method->code();
+ if (WizardMode && nm != NULL) {
+- sprintf(buf + (int)strlen(buf), "(nmethod " PTR_FORMAT ")", (intptr_t)nm);
++ sprintf(buf + (int)strlen(buf), "(nmethod " INTPTR_FORMAT ")", (intptr_t)nm);
+ }
+ }
+
+--- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2011-01-20 18:51:20.000000000 -0500
++++ hotspot/src/share/vm/interpreter/bytecodeTracer.cpp 2011-02-01 17:47:12.000000000 -0500
+@@ -83,7 +83,7 @@
// the incoming method. We could lose a line of trace output.
// This is acceptable in a debug-only feature.
st->cr();
@@ -5982,18 +7104,18 @@
method->print_name(st);
st->cr();
_current_method = method();
-@@ -90,7 +90,7 @@
- code = Bytecodes::code_at(bcp);
+@@ -97,7 +97,7 @@
}
- int bci = bcp - method->code_base();
+ _code = code;
+ int bci = bcp - method->code_base();
- st->print("[%d] ", (int) Thread::current()->osthread()->thread_id());
+ st->print("[%ld] ", (long) Thread::current()->osthread()->thread_id());
if (Verbose) {
st->print("%8d %4d " INTPTR_FORMAT " " INTPTR_FORMAT " %s",
BytecodeCounter::counter_value(), bci, tos, tos2, Bytecodes::name(code));
---- hotspot/src/share/vm/prims/forte.cpp 2010-06-21 14:12:20.000000000 -0700
-+++ hotspot/src/share/vm/prims/forte.cpp 2010-06-20 21:56:16.000000000 -0700
-@@ -626,6 +626,11 @@
+--- hotspot/src/share/vm/prims/forte.cpp 2011-01-20 18:51:21.000000000 -0500
++++ hotspot/src/share/vm/prims/forte.cpp 2011-02-01 17:47:12.000000000 -0500
+@@ -629,6 +629,11 @@
// Method to let libcollector know about a dynamically loaded function.
// Because it is weakly bound, the calls become NOP's when the library
// isn't present.
@@ -6005,7 +7127,7 @@
void collector_func_load(char* name,
void* null_argument_1,
void* null_argument_2,
-@@ -636,6 +641,7 @@
+@@ -639,6 +644,7 @@
#pragma weak collector_func_load
#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \
( collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6),0 : 0 )
@@ -6013,9 +7135,9 @@
#endif // !_WINDOWS
} // end extern "C"
---- hotspot/src/share/vm/runtime/globals.hpp 2010-06-21 14:12:20.000000000 -0700
-+++ hotspot/src/share/vm/runtime/globals.hpp 2010-06-20 21:56:16.000000000 -0700
-@@ -324,7 +324,7 @@
+--- hotspot/src/share/vm/runtime/globals.hpp 2011-01-20 18:51:22.000000000 -0500
++++ hotspot/src/share/vm/runtime/globals.hpp 2011-02-01 20:02:39.000000000 -0500
+@@ -327,7 +327,7 @@
/* UseMembar is theoretically a temp flag used for memory barrier \
* removal testing. It was supposed to be removed before FCS but has \
* been re-added (see 6401008) */ \
@@ -6023,14 +7145,13 @@
+ product(bool, UseMembar, true, \
"(Unstable) Issues membars on thread state transitions") \
\
- diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug, \
---- hotspot/src/share/vm/runtime/os.cpp 2010-06-21 14:12:21.000000000 -0700
-+++ hotspot/src/share/vm/runtime/os.cpp 2010-06-20 21:56:16.000000000 -0700
-@@ -79,7 +79,12 @@
+ /* Temporary: See 6948537 */ \
+--- hotspot/src/share/vm/runtime/os.cpp 2011-01-20 18:51:22.000000000 -0500
++++ hotspot/src/share/vm/runtime/os.cpp 2011-02-01 17:47:12.000000000 -0500
+@@ -79,7 +79,11 @@
assert(false, "Failed localtime_pd");
return NULL;
}
-+
+#if defined(_ALLBSD_SOURCE)
+ const time_t zone = (time_t) time_struct.tm_gmtoff;
+#else
@@ -6039,9 +7160,9 @@
// If daylight savings time is in effect,
// we are 1 hour East of our time zone
---- hotspot/src/share/vm/runtime/vm_version.cpp 2010-06-21 14:12:21.000000000 -0700
-+++ hotspot/src/share/vm/runtime/vm_version.cpp 2010-06-20 21:56:16.000000000 -0700
-@@ -144,7 +144,8 @@
+--- hotspot/src/share/vm/runtime/vm_version.cpp 2011-01-20 18:51:22.000000000 -0500
++++ hotspot/src/share/vm/runtime/vm_version.cpp 2011-02-01 17:47:12.000000000 -0500
+@@ -148,7 +148,8 @@
#define OS LINUX_ONLY("linux") \
WINDOWS_ONLY("windows") \
@@ -6051,8 +7172,8 @@
#ifdef ZERO
#define CPU ZERO_LIBARCH
---- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-21 14:12:21.000000000 -0700
-+++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-20 21:56:16.000000000 -0700
+--- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2011-01-20 18:51:22.000000000 -0500
++++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2011-02-01 17:47:12.000000000 -0500
@@ -71,12 +71,25 @@
# include <sys/procfs.h>
# endif
@@ -6108,7 +7229,7 @@
// Additional Java basic types
-@@ -228,7 +241,9 @@
+@@ -236,7 +249,9 @@
inline int g_isnan(float f) { return isnand(f); }
#endif
inline int g_isnan(double f) { return isnand(f); }
@@ -6119,10 +7240,10 @@
inline int g_isnan(float f) { return isnanf(f); }
inline int g_isnan(double f) { return isnan(f); }
#else
---- hotspot/src/share/vm/utilities/macros.hpp 2010-06-21 14:12:21.000000000 -0700
-+++ hotspot/src/share/vm/utilities/macros.hpp 2010-06-20 21:56:16.000000000 -0700
-@@ -156,6 +156,16 @@
- #define X86_ONLY(code)
+--- hotspot/src/share/vm/utilities/macros.hpp 2011-01-20 18:51:22.000000000 -0500
++++ hotspot/src/share/vm/utilities/macros.hpp 2011-02-01 17:47:12.000000000 -0500
+@@ -148,6 +148,14 @@
+ #define NOT_WINDOWS(code) code
#endif
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
@@ -6133,14 +7254,12 @@
+#define NOT_BSD(code) code
+#endif
+
-+
-+
- #ifdef IA32
- #define IA32_ONLY(code) code
- #define NOT_IA32(code)
---- hotspot/src/share/vm/utilities/ostream.cpp 2010-06-21 14:12:21.000000000 -0700
-+++ hotspot/src/share/vm/utilities/ostream.cpp 2010-06-20 21:56:16.000000000 -0700
-@@ -827,7 +827,7 @@
+ #if defined(IA32) || defined(AMD64)
+ #define X86
+ #define X86_ONLY(code) code
+--- hotspot/src/share/vm/utilities/ostream.cpp 2011-01-20 18:51:22.000000000 -0500
++++ hotspot/src/share/vm/utilities/ostream.cpp 2011-02-01 17:47:12.000000000 -0500
+@@ -848,7 +848,7 @@
#ifndef PRODUCT
@@ -6149,8 +7268,8 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
---- hotspot/src/share/vm/utilities/vmError.cpp 2010-06-21 14:12:21.000000000 -0700
-+++ hotspot/src/share/vm/utilities/vmError.cpp 2010-06-20 21:56:16.000000000 -0700
+--- hotspot/src/share/vm/utilities/vmError.cpp 2011-01-20 18:51:22.000000000 -0500
++++ hotspot/src/share/vm/utilities/vmError.cpp 2011-02-01 17:47:12.000000000 -0500
@@ -31,13 +31,18 @@
"JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH",
"JAVA_COMPILER", "PATH", "USERNAME",
@@ -6171,7 +7290,7 @@
// defined on Windows
"OS", "PROCESSOR_IDENTIFIER", "_ALT_JAVA_HOME_DIR",
-@@ -848,7 +853,7 @@
+@@ -861,7 +866,7 @@
const char* ptr = OnError;
while ((cmd = next_OnError_command(buffer, sizeof(buffer), &ptr)) != NULL){
out.print_raw ("# Executing ");
@@ -6180,8 +7299,8 @@
out.print_raw ("/bin/sh -c ");
#elif defined(SOLARIS)
out.print_raw ("/usr/bin/sh -c ");
---- jdk/make/com/sun/java/pack/Makefile 2010-06-21 14:15:07.000000000 -0700
-+++ jdk/make/com/sun/java/pack/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/com/sun/java/pack/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/com/sun/java/pack/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -61,6 +61,7 @@
@@ -6213,8 +7332,8 @@
OTHER_LDLIBS += $(LIBCXX)
# setup the list of libraries to link in...
ifeq ($(PLATFORM), linux)
---- jdk/make/com/sun/security/auth/module/Makefile 2010-06-21 14:15:07.000000000 -0700
-+++ jdk/make/com/sun/security/auth/module/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/com/sun/security/auth/module/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/com/sun/security/auth/module/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -70,7 +70,7 @@
include FILES_c_solaris.gmk
endif # solaris
@@ -6224,8 +7343,8 @@
LIBRARY = jaas_unix
include FILES_export_unix.gmk
include FILES_c_unix.gmk
---- jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -43,5 +43,7 @@
sun/tools/attach/LinuxVirtualMachine.java
endif
@@ -6236,8 +7355,8 @@
+FILES_export = \
+ sun/tools/attach/BsdVirtualMachine.java
+endif
---- jdk/make/com/sun/tools/attach/FILES_c.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/com/sun/tools/attach/FILES_c.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -39,4 +39,7 @@
LinuxVirtualMachine.c
endif
@@ -6247,8 +7366,8 @@
+FILES_c = \
+ BsdVirtualMachine.c
+endif
---- jdk/make/com/sun/tools/attach/FILES_java.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/com/sun/tools/attach/FILES_java.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -43,6 +43,11 @@
sun/tools/attach/LinuxAttachProvider.java
endif
@@ -6261,8 +7380,8 @@
#
# Files that need to be copied
#
---- jdk/make/com/sun/tools/attach/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/com/sun/tools/attach/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/com/sun/tools/attach/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/com/sun/tools/attach/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -36,6 +36,9 @@
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
@@ -6273,8 +7392,8 @@
include $(BUILDDIR)/common/Mapfile-vers.gmk
#
---- jdk/make/com/sun/tools/attach/mapfile-bsd 2010-06-27 11:37:43.000000000 -0700
-+++ jdk/make/com/sun/tools/attach/mapfile-bsd 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/com/sun/tools/attach/mapfile-bsd 2011-02-01 17:20:23.000000000 -0500
++++ jdk/make/com/sun/tools/attach/mapfile-bsd 2011-02-01 17:46:55.000000000 -0500
@@ -30,14 +30,12 @@
Java_sun_tools_attach_BsdVirtualMachine_checkPermissions;
Java_sun_tools_attach_BsdVirtualMachine_close;
@@ -6291,8 +7410,8 @@
local:
*;
};
---- jdk/make/common/Defs-bsd.gmk 2010-06-27 11:37:43.000000000 -0700
-+++ jdk/make/common/Defs-bsd.gmk 2010-06-20 22:48:15.000000000 -0700
+--- jdk/make/common/Defs-bsd.gmk 2011-02-01 17:20:23.000000000 -0500
++++ jdk/make/common/Defs-bsd.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -43,12 +43,6 @@
# Get shared JDK settings
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
@@ -6443,8 +7562,8 @@
#
# Japanese manpages
#
---- jdk/make/common/Defs-linux.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/Defs-linux.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/Defs-linux.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/Defs-linux.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -318,7 +318,7 @@
override LIBTHREAD =
override MOOT_PRIORITIES = true
@@ -6454,9 +7573,9 @@
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else
---- jdk/make/common/Defs.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/Defs.gmk 2010-06-20 21:56:16.000000000 -0700
-@@ -188,6 +188,24 @@
+--- jdk/make/common/Defs.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/Defs.gmk 2011-02-01 17:46:55.000000000 -0500
+@@ -117,6 +117,24 @@
_OUTPUTDIR=$(JDK_TOPDIR)/build/$(PLATFORM)-$(ARCH)
endif
@@ -6481,7 +7600,7 @@
#
# Get platform definitions
#
-@@ -223,6 +241,7 @@
+@@ -152,6 +170,7 @@
ifdef ALT_FREETYPE_LIB_PATH
FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH)
@@ -6489,7 +7608,7 @@
else
ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib
-@@ -287,6 +306,10 @@
+@@ -216,6 +235,10 @@
LDLIBS_COMMON = -ldl
endif
@@ -6500,8 +7619,8 @@
endif # PROGRAM
LDLIBS_COMMON += $(EXTRA_LIBS)
---- jdk/make/common/Program.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/Program.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/Program.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/Program.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -67,11 +67,27 @@
# Create a dependency on libjli (Java Launcher Infrastructure)
#
@@ -6531,7 +7650,7 @@
ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
OTHER_LDLIBS += -ljli
-@@ -175,6 +191,10 @@
+@@ -166,6 +182,10 @@
THREADLIBS = $(LIBTHREAD)
endif # USE_PTHREADS
@@ -6542,7 +7661,7 @@
#
# This rule only applies on unix. It supports quantify and its ilk.
#
-@@ -243,15 +263,19 @@
+@@ -221,15 +241,19 @@
ifneq ($(PLATFORM), windows)
@@ -6562,8 +7681,8 @@
OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
---- jdk/make/common/Release.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/Release.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/Release.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/Release.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -145,14 +145,13 @@
tnameserv.1 \
unpack200.1
@@ -6592,7 +7711,7 @@
define copy-man-pages
$(MKDIR) -p $1/man/man1
for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \
-@@ -323,6 +327,12 @@
+@@ -313,6 +317,12 @@
SOURCE_DIRS += $(CLOSED_SRC)/share/classes
endif
@@ -6605,7 +7724,7 @@
#
# Specific files and directories that will be filtered out from above areas.
-@@ -637,6 +647,8 @@
+@@ -629,6 +639,8 @@
$(BOOT_JAVA_CMD) -jar $(JARSPLIT_JARFILE) \
$(TOTAL_JAR_FILELIST) \
-o $(RT_JAR_FILELIST) $(RES_JAR_FILELIST)
@@ -6614,7 +7733,7 @@
@$(java-vm-cleanup)
# Create the manifest file.
-@@ -982,7 +994,7 @@
+@@ -974,7 +986,7 @@
@# generated by the more efficient solaris/windows method of copying files.
@# So for Linux, make use of the -T option (like Solaris' -I option) of
@# obtaining the list of files from a file. MKS tar has no such option.
@@ -6623,7 +7742,7 @@
for d in $(SOURCE_DIRS); do \
$(RM) $(ABS_TEMPDIR)/src-files.list; \
($(CD) $$d && \
-@@ -995,7 +1007,7 @@
+@@ -987,7 +999,7 @@
done ; \
) ; \
if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \
@@ -6632,99 +7751,8 @@
| ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \
fi; \
done
---- jdk/make/common/internal/BinaryPlugs.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/internal/BinaryPlugs.gmk 2010-06-20 21:56:16.000000000 -0700
-@@ -49,8 +49,6 @@
- com/sun/jmx/snmp/SnmpDataTypeEnums.class \
- com/sun/jmx/snmp/SnmpDefinitions.class \
- com/sun/jmx/snmp/SnmpOid.class \
--com/sun/jmx/snmp/SnmpOidDatabase.class \
--com/sun/jmx/snmp/SnmpOidDatabaseSupport.class \
- com/sun/jmx/snmp/SnmpOidRecord.class \
- com/sun/jmx/snmp/SnmpOidTable.class \
- com/sun/jmx/snmp/SnmpOidTableSupport.class \
-@@ -60,22 +58,16 @@
- com/sun/jmx/snmp/SnmpTimeticks.class \
- com/sun/jmx/snmp/SnmpVarBind.class \
- com/sun/jmx/snmp/SnmpVarBindList.class \
--com/sun/jmx/snmp/Timestamp.class \
- com/sun/jmx/snmp/daemon/SendQ.class \
- com/sun/jmx/snmp/daemon/SnmpInformRequest.class \
--com/sun/jmx/snmp/daemon/SnmpQManager.class \
--com/sun/jmx/snmp/daemon/SnmpRequestCounter.class \
--com/sun/jmx/snmp/daemon/SnmpResponseHandler.class \
--com/sun/jmx/snmp/daemon/SnmpSendServer.class \
--com/sun/jmx/snmp/daemon/SnmpSession.class \
--com/sun/jmx/snmp/daemon/SnmpSocket.class \
--com/sun/jmx/snmp/daemon/SnmpTimerServer.class \
--com/sun/jmx/snmp/daemon/WaitQ.class
-+com/sun/jmx/snmp/daemon/SnmpSession.class
-+
-+PLUG_GNU_CLASS_NAMES = gnu
-
- # Class list temp files (used by both import and export of plugs)
-
- PLUG_TEMPDIR=$(ABS_TEMPDIR)/plugs
--PLUG_CLASS_AREAS = jmf
-+PLUG_CLASS_AREAS = jmf gnu
- PLUG_CLISTS = $(PLUG_CLASS_AREAS:%=$(PLUG_TEMPDIR)/%.clist)
-
- # Create jargs file command
-@@ -93,11 +85,18 @@
- @for i in $(PLUG_JMF_CLASS_NAMES) ; do \
- $(ECHO) "$$i" >> $@; \
- done
-+$(PLUG_TEMPDIR)/gnu.clist:
-+ @$(prep-target)
-+ @for i in $(PLUG_GNU_CLASS_NAMES) ; do \
-+ $(ECHO) "$$i" >> $@ ; \
-+ done
- $(PLUG_TEMPDIR)/all.clist: $(PLUG_CLISTS)
- @$(prep-target)
- $(CAT) $(PLUG_CLISTS) > $@
- $(PLUG_TEMPDIR)/jmf.jargs: $(PLUG_TEMPDIR)/jmf.clist
- $(plug-create-jargs)
-+$(PLUG_TEMPDIR)/gnu.jargs: $(PLUG_TEMPDIR)/gnu.clist
-+ $(plug-create-jargs)
- $(PLUG_TEMPDIR)/all.jargs: $(PLUG_TEMPDIR)/all.clist
- $(plug-create-jargs)
-
-@@ -153,11 +152,16 @@
-
- import-binary-plug-jmf-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/jmf.clist
- $(call import-binary-plug-classes,$(PLUG_TEMPDIR)/jmf.clist)
-+import-binary-plug-gnu-classes: $(PLUG_IMPORT_JARFILE) $(PLUG_TEMPDIR)/gnu.clist
-+ $(call import-binary-plug-classes,$(PLUG_TEMPDIR)/gnu.clist)
-+
-+
-
- # Import all classes from the jar file
-
- import-binary-plug-jar: \
-- import-binary-plug-jmf-classes
-+ import-binary-plug-jmf-classes \
-+ import-binary-plug-gnu-classes
-
- # Binary plug start/complete messages
-
-@@ -169,14 +173,12 @@
-
- # Import lib files (only if they don't exist already)
-
--import-binary-plugs-libs: \
-- $(PLUG_LIBRARY_NAMES:%=$(LIB_LOCATION)/%)
-+import-binary-plugs-libs:
-
- # Import everything
-
- import-binary-plugs: \
- import-binary-plugs-started \
-- import-binary-plugs-libs \
- import-binary-plug-jar \
- import-binary-plugs-completed
-
---- jdk/make/common/shared/Compiler-gcc.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/shared/Compiler-gcc.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/shared/Compiler-gcc.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/shared/Compiler-gcc.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -99,6 +99,24 @@
endif
@@ -6750,8 +7778,8 @@
ifeq ($(PLATFORM), solaris)
# Settings specific to Solaris
---- jdk/make/common/shared/Compiler.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/shared/Compiler.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/shared/Compiler.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/shared/Compiler.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -37,8 +37,8 @@
override CC_VERSION = sun
endif
@@ -6763,8 +7791,8 @@
override CC_VERSION = gcc
endif
---- jdk/make/common/shared/Defs-bsd.gmk 2010-06-27 11:37:43.000000000 -0700
-+++ jdk/make/common/shared/Defs-bsd.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/shared/Defs-bsd.gmk 2011-02-01 17:20:23.000000000 -0500
++++ jdk/make/common/shared/Defs-bsd.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -70,7 +70,7 @@
endef
@@ -6803,8 +7831,8 @@
# Import JDK images allow for partial builds, components not built are
# imported (or copied from) these import areas when needed.
---- jdk/make/common/shared/Defs-java.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/shared/Defs-java.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/shared/Defs-java.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/shared/Defs-java.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -42,7 +42,7 @@
# Suspect this may not be needed anymore.
JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
@@ -6814,8 +7842,8 @@
endif
#
---- jdk/make/common/shared/Defs-utils.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/shared/Defs-utils.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/shared/Defs-utils.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/shared/Defs-utils.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -80,6 +80,13 @@
endif
endif
@@ -6863,8 +7891,8 @@
+ TAR = $(UTILS_USR_BIN_PATH)tar
+ endif
+endif
---- jdk/make/common/shared/Defs.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/shared/Defs.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/shared/Defs.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/shared/Defs.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -143,7 +143,7 @@
echo older; \
else \
@@ -6874,8 +7902,8 @@
echo older; \
else \
echo newer; \
---- jdk/make/common/shared/Platform.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/shared/Platform.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/common/shared/Platform.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/shared/Platform.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -275,6 +275,76 @@
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
endif
@@ -6992,18 +8020,18 @@
# If blanks in the username, use the first 4 words and pack them together
_USER1:=$(subst ', ,$(_USER))
_USER2:=$(subst ", ,$(_USER1))
---- jdk/make/common/shared/Sanity-Settings.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/shared/Sanity-Settings.gmk 2010-06-20 21:56:16.000000000 -0700
-@@ -243,6 +243,7 @@
- ALL_SETTINGS+=$(call addHeading,OpenJDK-specific settings)
+--- jdk/make/common/shared/Sanity-Settings.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/shared/Sanity-Settings.gmk 2011-02-01 17:46:55.000000000 -0500
+@@ -244,6 +244,7 @@
ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH)
ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH)
-+ ALL_SETTINGS+=$(call addAltSetting,X11_PATH)
- ALL_SETTINGS+=$(call addHeading,OPENJDK Import Binary Plug Settings)
- ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_JARFILE)
- ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_PATH)
---- jdk/make/common/shared/Sanity.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/common/shared/Sanity.gmk 2010-06-20 21:56:16.000000000 -0700
+ endif
++ALL_SETTINGS+=$(call addAltSetting,X11_PATH)
+ ALL_SETTINGS+=$(call addOptionalSetting,PLUG_LIBRARY_NAMES)
+
+ ifdef OPENJDK
+--- jdk/make/common/shared/Sanity.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/common/shared/Sanity.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -96,6 +96,11 @@
$(EGREP) "\#define" | $(NAWK) '{print $$3}')
endif
@@ -7016,8 +8044,8 @@
# Get the version numbers of what we are using
_MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1)
_ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip')
---- jdk/make/java/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -49,7 +49,7 @@
endif
endif # PLATFORM
@@ -7027,8 +8055,8 @@
SUBDIRS += jexec
endif # PLATFORM
---- jdk/make/java/hpi/hpi_common.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/hpi/hpi_common.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/hpi/hpi_common.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/hpi/hpi_common.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -86,5 +86,9 @@
# Things that must be linked in.
#
@@ -7039,8 +8067,8 @@
OTHER_LDLIBS += $(LIBSOCKET) -lnsl $(LIBM) -ldl
endif
+endif
---- jdk/make/java/hpi/native/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/hpi/native/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/hpi/native/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/hpi/native/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -72,11 +72,18 @@
ifeq ($(MOOT_PRIORITIES),true)
OTHER_CPPFLAGS += -DMOOT_PRIORITIES
@@ -7060,8 +8088,8 @@
ifeq ($(HAVE_GETHRVTIME),true)
OTHER_CPPFLAGS += -DHAVE_GETHRVTIME
endif
---- jdk/make/java/instrument/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/instrument/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/instrument/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/instrument/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -102,6 +102,21 @@
# equivalent of strcasecmp is stricmp on Windows
CPPFLAGS_COMMON += -Dstrcasecmp=stricmp
@@ -7092,8 +8120,8 @@
#
# Library to compile.
---- jdk/make/java/java/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/java/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/java/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/java/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -167,8 +167,10 @@
# Is the altzone extern documented in ctime(3C) available?
#
@@ -7120,8 +8148,8 @@
#
# Rules.
---- jdk/make/java/java/genlocales.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/java/genlocales.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/java/genlocales.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/java/genlocales.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -76,11 +76,16 @@
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
@$(RM) $@.tmp.euro $@.tmp.noneuro;
@@ -7144,8 +8172,8 @@
$@.tmp.noneuro $< $@
@$(RM) $@.tmp.euro $@.tmp.noneuro;
---- jdk/make/java/java/localegen.sh 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/java/localegen.sh 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/java/localegen.sh 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/java/localegen.sh 2011-02-01 17:46:55.000000000 -0500
@@ -29,7 +29,7 @@
# This script is to generate the supported locale list string and replace the
# LocaleDataMetaInfo-XLocales.java in <ws>/src/share/classes/sun/util
@@ -7176,8 +8204,8 @@
done
sed_script=$sed_script"$INPUT_FILE > $OUTPUT_FILE"
---- jdk/make/java/java_hprof_demo/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/java_hprof_demo/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/java_hprof_demo/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/java_hprof_demo/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -83,8 +83,10 @@
ifeq ($(PLATFORM), windows)
OTHER_LDLIBS += wsock32.lib winmm.lib
@@ -7189,8 +8217,8 @@
#
# Tell library.gmk to copy the txt file first
---- jdk/make/java/jli/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/jli/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/jli/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/jli/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -44,8 +44,10 @@
include $(BUILDDIR)/common/Defs.gmk
@@ -7266,8 +8294,8 @@
+endif
+
---- jdk/make/java/management/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/management/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/management/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/management/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -85,6 +85,11 @@
OTHER_INCLUDES += \
-I$(SHARE_SRC)/native/sun/management
@@ -7280,8 +8308,8 @@
ifeq ($(PLATFORM),windows)
OTHER_LDLIBS += $(JVMLIB)
endif
---- jdk/make/java/net/FILES_c.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/net/FILES_c.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/net/FILES_c.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/net/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -43,6 +43,10 @@
FILES_c += linux_close.c
endif
@@ -7293,8 +8321,8 @@
ifeq ($(PLATFORM), windows)
FILES_c += TwoStacksPlainSocketImpl.c
FILES_c += DualStackPlainSocketImpl.c
---- jdk/make/java/net/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/net/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/net/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/net/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -92,6 +92,12 @@
include $(BUILDDIR)/common/Library.gmk
@@ -7316,9 +8344,38 @@
CLASSES.export += java.lang.Integer java.io.FileDescriptor java.net.InetAddressImplFactory java.net.Inet4AddressImpl java.net.Inet6AddressImpl
---- jdk/make/java/nio/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/nio/Makefile 2010-06-20 21:56:16.000000000 -0700
-@@ -126,6 +126,11 @@
+--- jdk/make/java/nio/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/nio/Makefile 2011-02-01 17:46:55.000000000 -0500
+@@ -104,6 +104,28 @@
+ sun/nio/ch/NativeThread.java
+ endif # PLATFORM = linux
+
++ifeq ($(PLATFORM), bsd)
++FILES_java += \
++ sun/nio/ch/AbstractPollSelectorImpl.java \
++ sun/nio/ch/InheritedChannel.java \
++ sun/nio/ch/KqueueArrayWrapper.java \
++ sun/nio/ch/KqueueSelectorProvider.java \
++ sun/nio/ch/KqueueSelectorImpl.java \
++ sun/nio/ch/PollSelectorProvider.java \
++ sun/nio/ch/PollSelectorImpl.java
++
++FILES_c += \
++ KqueueArrayWrapper.c \
++ PollArrayWrapper.c \
++ InheritedChannel.c \
++ NativeThread.c
++
++FILES_export += \
++ sun/nio/ch/KqueueArrayWrapper.java \
++ sun/nio/ch/InheritedChannel.java \
++ sun/nio/ch/NativeThread.java
++endif # PLATFORM = bsd
++
+ # Find platform-specific C source files
+ #
+ vpath %.c $(PLATFORM_SRC)/native/sun/nio/ch
+@@ -126,6 +148,11 @@
-I$(PLATFORM_SRC)/native/java/net \
-I$(CLASSHDRDIR)/../../../java.lang/java/CClassHeaders
@@ -7330,7 +8387,7 @@
ifeq ($(PLATFORM),windows)
OTHER_LDLIBS += $(JVMLIB) ws2_32.lib \
-libpath:$(LIBDIR) java.lib \
-@@ -137,6 +142,9 @@
+@@ -137,6 +164,9 @@
COMPILER_WARNINGS_FATAL=true
OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
endif
@@ -7340,7 +8397,7 @@
ifeq ($(PLATFORM), solaris)
OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 -ldl \
-L$(LIBDIR)/$(LIBARCH) -ljava -lnet
-@@ -159,6 +167,9 @@
+@@ -159,6 +189,9 @@
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
endif
@@ -7350,8 +8407,8 @@
include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
---- jdk/make/java/npt/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/npt/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/npt/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/npt/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -70,6 +70,18 @@
OTHER_LCF += -export:nptInitialize -export:nptTerminate
endif
@@ -7371,8 +8428,8 @@
#
# Add to ambient vpath so we pick up the library files
#
---- jdk/make/java/redist/FILES.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/redist/FILES.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/redist/FILES.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/redist/FILES.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -38,6 +38,14 @@
$(LIBDIR)/fonts/LucidaSansDemiBold.ttf \
@@ -7388,9 +8445,9 @@
# The oblique versions of the font are derived from the base versions
# and since 2D can do this derivation on the fly at run time there is no
---- jdk/make/java/redist/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/redist/Makefile 2010-06-20 21:56:16.000000000 -0700
-@@ -317,7 +317,7 @@
+--- jdk/make/java/redist/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/redist/Makefile 2011-02-01 17:46:55.000000000 -0500
+@@ -311,7 +311,7 @@
$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
$(install-file)
@@ -7399,7 +8456,7 @@
# The oblique fonts are only needed/wanted on Linux.
-@@ -331,7 +331,7 @@
+@@ -325,7 +325,7 @@
$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
$(install-file)
@@ -7408,8 +8465,8 @@
endif # !OPENJDK
# Import internal files (ones that are stashed in this source tree)
---- jdk/make/java/security/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/security/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/security/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/security/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -51,7 +51,15 @@
ifneq ($(ARCH_DATA_MODEL), 64)
PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows
@@ -7426,8 +8483,8 @@
endif # PLATFORM
---- jdk/make/java/zip/FILES_c.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/zip/FILES_c.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/zip/FILES_c.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/zip/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -30,6 +30,10 @@
Inflater.c \
ZipFile.c \
@@ -7447,8 +8504,8 @@
- zip_util.c
+ inffast.c
+endif
---- jdk/make/java/zip/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/java/zip/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/java/zip/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/java/zip/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -72,16 +72,24 @@
CPPFLAGS += -UDEBUG
endif
@@ -7475,8 +8532,8 @@
OTHER_LDLIBS = $(JVMLIB)
+endif
+
---- jdk/make/javax/crypto/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/javax/crypto/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/javax/crypto/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/javax/crypto/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -155,7 +155,7 @@
#
@@ -7486,8 +8543,8 @@
else # OPENJDK
ifeq ($(strip $(FILES_java)),)
all:
---- jdk/make/javax/sound/FILES_c.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/javax/sound/FILES_c.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/javax/sound/FILES_c.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/javax/sound/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -34,6 +34,8 @@
FILES_linux =
@@ -7497,9 +8554,9 @@
FILES_windows = \
PLATFORM_API_WinOS_MidiIn.c \
PLATFORM_API_WinOS_MidiOut.c \
---- jdk/make/javax/sound/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/javax/sound/Makefile 2010-06-20 21:56:16.000000000 -0700
-@@ -107,6 +107,19 @@
+--- jdk/make/javax/sound/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/javax/sound/Makefile 2011-02-01 17:46:55.000000000 -0500
+@@ -105,6 +105,19 @@
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/
endif # PLATFORM linux
@@ -7519,8 +8576,8 @@
ifeq ($(PLATFORM), solaris)
ifneq ($(ARCH), amd64)
# build with ports and direct audio
---- jdk/make/javax/sound/SoundDefs.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/javax/sound/SoundDefs.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/javax/sound/SoundDefs.gmk 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/javax/sound/SoundDefs.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -40,6 +40,10 @@
CPPFLAGS += -DX_PLATFORM=X_LINUX
endif # PLATFORM linux
@@ -7532,8 +8589,8 @@
ifeq ($(PLATFORM), solaris)
CPPFLAGS += -DX_PLATFORM=X_SOLARIS
---- jdk/make/jpda/back/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/jpda/back/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/jpda/back/Makefile 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/jpda/back/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -49,8 +49,10 @@
-I$(GENNATIVESRCDIR)/jdwp
@@ -7545,8 +8602,8 @@
#
# This turns off all assert() checking in the optimized library
---- jdk/make/sun/awt/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/sun/awt/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/sun/awt/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/awt/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -129,6 +129,14 @@
OTHER_LDLIBS = $(JVMLIB) $(LIBM) -ldl
endif
@@ -7616,8 +8673,8 @@
LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
endif
---- jdk/make/sun/awt/mawt.gmk 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/sun/awt/mawt.gmk 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/sun/awt/mawt.gmk 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/awt/mawt.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -174,7 +174,7 @@
OTHER_LDLIBS = $(LIBXM) -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
endif
@@ -7674,8 +8731,8 @@
LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
$(AWT_RUNPATH)
---- jdk/make/sun/font/Makefile 2010-06-21 14:15:08.000000000 -0700
-+++ jdk/make/sun/font/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/sun/font/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/font/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -177,6 +177,15 @@
# Libraries to link, and other C flags.
#
@@ -7700,8 +8757,8 @@
endif # PLATFORM
---- jdk/make/sun/image/generic/Makefile 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/sun/image/generic/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/sun/image/generic/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/image/generic/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -69,5 +69,9 @@
-I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib
@@ -7713,8 +8770,8 @@
+endif
+
---- jdk/make/sun/jawt/Makefile 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/sun/jawt/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/sun/jawt/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/jawt/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -98,9 +98,7 @@
#
# Other extra flags needed for compiling.
@@ -7744,8 +8801,8 @@
OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
endif # PLATFORM
---- jdk/make/sun/security/jgss/wrapper/Makefile 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/sun/security/jgss/wrapper/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/sun/security/jgss/wrapper/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/security/jgss/wrapper/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -71,6 +71,10 @@
#
# Libraries to link
@@ -7758,8 +8815,8 @@
+ifeq ($(PLATFORM), bsd)
+ OTHER_LDLIBS = $(JVMLIB)
+endif
---- jdk/make/sun/security/pkcs11/Makefile 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/sun/security/pkcs11/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/sun/security/pkcs11/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/security/pkcs11/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -155,7 +155,7 @@
#
# Libraries to link
@@ -7769,8 +8826,8 @@
OTHER_LDLIBS = $(JVMLIB)
else
OTHER_LDLIBS = -ldl $(JVMLIB)
---- jdk/make/sun/security/smartcardio/Makefile 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/sun/security/smartcardio/Makefile 2010-06-20 21:56:16.000000000 -0700
+--- jdk/make/sun/security/smartcardio/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/security/smartcardio/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -75,6 +75,10 @@
ifeq ($(PLATFORM), windows)
OTHER_LDLIBS = $(JVMLIB) winscard.lib
@@ -7783,8 +8840,8 @@
+ endif
OTHER_CFLAGS = -D__sun_jdk
endif
---- jdk/make/sun/splashscreen/FILES_c.gmk 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/sun/splashscreen/FILES_c.gmk 2010-06-20 21:56:17.000000000 -0700
+--- jdk/make/sun/splashscreen/FILES_c.gmk 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/splashscreen/FILES_c.gmk 2011-02-01 17:46:55.000000000 -0500
@@ -49,20 +49,6 @@
dgif_lib.c \
gif_err.c \
@@ -7827,8 +8884,8 @@
+ zcrc32.c \
+ zutil.c
+endif
---- jdk/make/sun/splashscreen/Makefile 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/sun/splashscreen/Makefile 2010-06-20 21:56:17.000000000 -0700
+--- jdk/make/sun/splashscreen/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/splashscreen/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -61,10 +61,26 @@
CFLAGS += -DSPLASHSCREEN
@@ -7876,8 +8933,8 @@
ifeq ($(PLATFORM), linux)
ifeq ($(ARCH_DATA_MODEL), 64)
# 64-bit gcc has problems compiling MMX instructions.
---- jdk/make/sun/xawt/Makefile 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/sun/xawt/Makefile 2010-06-20 21:56:17.000000000 -0700
+--- jdk/make/sun/xawt/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/sun/xawt/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -53,6 +53,11 @@
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
endif
@@ -7941,8 +8998,8 @@
ifeq ($(MILESTONE), internal)
CPPFLAGS += -DINTERNAL_BUILD
endif
---- jdk/make/tools/freetypecheck/Makefile 2010-06-21 14:15:09.000000000 -0700
-+++ jdk/make/tools/freetypecheck/Makefile 2010-06-20 21:56:17.000000000 -0700
+--- jdk/make/tools/freetypecheck/Makefile 2011-01-20 18:54:06.000000000 -0500
++++ jdk/make/tools/freetypecheck/Makefile 2011-02-01 17:46:55.000000000 -0500
@@ -60,8 +60,12 @@
#add runtime lib search path to ensure test will be runnable
ifeq ($(PLATFORM), solaris)
@@ -7958,8 +9015,8 @@
endif
endif
---- jdk/src/share/back/commonRef.c 2010-06-21 14:15:10.000000000 -0700
-+++ jdk/src/share/back/commonRef.c 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/back/commonRef.c 2011-01-20 18:54:07.000000000 -0500
++++ jdk/src/share/back/commonRef.c 2011-02-01 17:46:55.000000000 -0500
@@ -23,6 +23,10 @@
* questions.
*/
@@ -7971,8 +9028,8 @@
#include "util.h"
#include "commonRef.h"
---- jdk/src/share/bin/java.c 2010-06-21 14:15:10.000000000 -0700
-+++ jdk/src/share/bin/java.c 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/bin/java.c 2011-01-20 18:54:07.000000000 -0500
++++ jdk/src/share/bin/java.c 2011-02-01 17:46:55.000000000 -0500
@@ -104,6 +104,11 @@
static char *launchername;
jboolean _launcher_debug = JNI_FALSE;
@@ -8167,8 +9224,8 @@
static void
FreeKnownVMs()
{
---- jdk/src/share/bin/java.h 2010-06-21 14:15:10.000000000 -0700
-+++ jdk/src/share/bin/java.h 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/bin/java.h 2011-01-20 18:54:07.000000000 -0500
++++ jdk/src/share/bin/java.h 2011-02-01 17:46:55.000000000 -0500
@@ -91,11 +91,17 @@
void PrintMachineDependentOptions();
@@ -8189,8 +9246,8 @@
/* sun.java.launcher.* platform properties. */
void SetJavaLauncherPlatformProps(void);
---- jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2010-06-21 14:15:11.000000000 -0700
-+++ jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2011-01-20 18:54:08.000000000 -0500
++++ jdk/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java 2011-02-01 17:46:55.000000000 -0500
@@ -477,6 +477,10 @@
String[] dirs = new String[] {
userHome + sep + ".themes",
@@ -8202,8 +9259,8 @@
"/usr/share/themes",
"/usr/gnome/share/themes", // Debian/Redhat/Solaris
"/opt/gnome2/share/themes" // SuSE
---- jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2010-06-21 14:15:13.000000000 -0700
-+++ jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2011-01-20 18:54:10.000000000 -0500
++++ jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2011-02-01 17:46:55.000000000 -0500
@@ -78,6 +78,9 @@
*/
public long timeStamp ;
@@ -8214,9 +9271,9 @@
/**
---- jdk/src/share/classes/java/awt/Font.java 2010-06-21 14:15:16.000000000 -0700
-+++ jdk/src/share/classes/java/awt/Font.java 2010-06-20 21:56:17.000000000 -0700
-@@ -445,18 +445,19 @@
+--- jdk/src/share/classes/java/awt/Font.java 2011-01-20 18:54:13.000000000 -0500
++++ jdk/src/share/classes/java/awt/Font.java 2011-02-01 17:46:55.000000000 -0500
+@@ -449,18 +449,19 @@
*/
private AttributeValues getAttributeValues() {
if (values == null) {
@@ -8242,8 +9299,8 @@
}
return values;
---- jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2010-06-21 14:15:16.000000000 -0700
-+++ jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2011-01-20 18:54:13.000000000 -0500
++++ jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2011-02-01 17:46:55.000000000 -0500
@@ -148,7 +148,12 @@
} else {
String osName = System.getProperty("os.name");
@@ -8258,8 +9315,8 @@
(System.getenv("DISPLAY") == null));
}
} else if (nm.equals("true")) {
---- jdk/src/share/classes/java/util/TimeZone.java 2010-06-21 14:15:21.000000000 -0700
-+++ jdk/src/share/classes/java/util/TimeZone.java 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/classes/java/util/TimeZone.java 2011-01-20 18:54:18.000000000 -0500
++++ jdk/src/share/classes/java/util/TimeZone.java 2011-02-01 17:46:55.000000000 -0500
@@ -776,15 +776,13 @@
}
int gmtOffset = (hours * 60 + num) * 60 * 1000;
@@ -8277,8 +9334,8 @@
}
return zi;
}
---- jdk/src/share/classes/sun/awt/FontConfiguration.java 2010-06-21 14:15:27.000000000 -0700
-+++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/classes/sun/awt/FontConfiguration.java 2011-01-20 18:54:24.000000000 -0500
++++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2011-02-01 17:46:55.000000000 -0500
@@ -1073,7 +1073,7 @@
*/
HashMap<String, Boolean> existsMap;
@@ -8297,9 +9354,9 @@
errors++;
}
}
---- jdk/src/share/classes/sun/font/TrueTypeFont.java 2010-06-21 14:15:28.000000000 -0700
-+++ jdk/src/share/classes/sun/font/TrueTypeFont.java 2010-06-20 21:56:17.000000000 -0700
-@@ -159,6 +159,13 @@
+--- jdk/src/share/classes/sun/font/TrueTypeFont.java 2011-01-20 18:54:25.000000000 -0500
++++ jdk/src/share/classes/sun/font/TrueTypeFont.java 2011-02-01 17:46:55.000000000 -0500
+@@ -160,6 +160,13 @@
private boolean supportsJA;
private boolean supportsCJK;
@@ -8313,7 +9370,7 @@
/**
* - does basic verification of the file
* - reads the header table for this font (within a collection)
-@@ -1058,6 +1065,10 @@
+@@ -1060,6 +1067,10 @@
* greater than 32767, so read and store those as ints
*/
int stringPtr = sbuffer.get() & 0xffff;
@@ -8324,7 +9381,7 @@
for (int i=0; i<numRecords; i++) {
short platformID = sbuffer.get();
if (platformID != MS_PLATFORM_ID) {
-@@ -1069,15 +1080,24 @@
+@@ -1071,15 +1082,24 @@
short nameID = sbuffer.get();
int nameLen = ((int) sbuffer.get()) & 0xffff;
int namePtr = (((int) sbuffer.get()) & 0xffff) + stringPtr;
@@ -8352,7 +9409,7 @@
}
/*
for (int ii=0;ii<nameLen;ii++) {
-@@ -1095,15 +1115,29 @@
+@@ -1097,15 +1117,29 @@
case FULL_NAME_ID:
@@ -8385,7 +9442,7 @@
}
}
-@@ -1186,6 +1220,8 @@
+@@ -1188,6 +1222,8 @@
public String getFontName(Locale locale) {
if (locale == null) {
return fullName;
@@ -8394,7 +9451,7 @@
} else {
short localeID = FontManager.getLCIDFromLocale(locale);
String name = lookupName(localeID, FULL_NAME_ID);
-@@ -1200,11 +1236,13 @@
+@@ -1202,11 +1238,13 @@
public String getFamilyName(Locale locale) {
if (locale == null) {
return familyName;
@@ -8409,8 +9466,8 @@
} else {
return name;
}
---- jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2010-06-21 14:15:29.000000000 -0700
-+++ jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2010-06-20 21:56:17.000000000 -0700
+--- jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2011-01-20 18:54:26.000000000 -0500
++++ jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2011-02-01 17:46:55.000000000 -0500
@@ -76,7 +76,7 @@
public abstract class SunGraphicsEnvironment extends GraphicsEnvironment
implements FontSupport, DisplayChangedListener {
@@ -8448,8 +9505,28 @@
registerFontDir(jreFontDirName);
}
registerFontsInDir(jreFontDirName, true, Font2D.JRE_RANK,
---- jdk/src/share/classes/sun/print/PSPrinterJob.java 2010-06-21 14:15:33.000000000 -0700
-+++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/share/classes/sun/nio/ch/KqueueSelectorProvider.java 2011-02-01 17:46:55.000000000 -0500
+@@ -0,0 +1,17 @@
++package sun.nio.ch;
++
++import java.io.IOException;
++import java.nio.channels.*;
++import java.nio.channels.spi.*;
++
++public class KqueueSelectorProvider
++ extends SelectorProviderImpl
++{
++ public AbstractSelector openSelector() throws IOException {
++ return new KqueueSelectorImpl(this);
++ }
++
++ public Channel inheritedChannel() throws IOException {
++ return InheritedChannel.getChannel();
++ }
++}
+--- jdk/src/share/classes/sun/print/PSPrinterJob.java 2011-01-20 18:54:30.000000000 -0500
++++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2011-02-01 17:46:55.000000000 -0500
@@ -1531,7 +1531,9 @@
pFlags |= NOSHEET;
ncomps+=1;
@@ -8461,8 +9538,8 @@
execCmd = new String[ncomps];
execCmd[n++] = "/usr/bin/lpr";
if ((pFlags & PRINTER) != 0) {
---- jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java 2010-06-21 14:15:34.000000000 -0700
-+++ jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java 2011-01-20 18:54:31.000000000 -0500
++++ jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java 2011-02-01 17:46:55.000000000 -0500
@@ -49,8 +49,12 @@
AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
public Boolean run() {
@@ -8478,8 +9555,8 @@
return new Boolean(System.getProperty
(USE_NATIVE_PROP));
}
---- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2010-06-21 14:15:34.000000000 -0700
-+++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2011-01-20 18:54:31.000000000 -0500
++++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2011-02-01 17:46:55.000000000 -0500
@@ -82,7 +82,11 @@
String osname = System.getProperty("os.name");
if (osname.startsWith("SunOS")) {
@@ -8493,8 +9570,8 @@
gssLib = "libgssapi.so";
}
}
---- jdk/src/share/classes/sun/security/krb5/Config.java 2010-06-21 14:15:34.000000000 -0700
-+++ jdk/src/share/classes/sun/security/krb5/Config.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/classes/sun/security/krb5/Config.java 2011-01-20 18:54:31.000000000 -0500
++++ jdk/src/share/classes/sun/security/krb5/Config.java 2011-02-01 17:46:55.000000000 -0500
@@ -711,7 +711,11 @@
}
} else if (osname.startsWith("SunOS")) {
@@ -8508,8 +9585,8 @@
name = "/etc/krb5.conf";
}
}
---- jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java 2010-06-21 14:15:34.000000000 -0700
-+++ jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java 2011-01-20 18:54:31.000000000 -0500
++++ jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java 2011-02-01 17:46:55.000000000 -0500
@@ -383,8 +383,12 @@
String uidStr = null;
long uid = 0;
@@ -8525,15 +9602,15 @@
try {
Class<?> c = Class.forName
("com.sun.security.auth.module.UnixSystem");
---- jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2010-06-21 14:15:36.000000000 -0700
-+++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2011-01-20 18:54:33.000000000 -0500
++++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2011-02-01 17:46:55.000000000 -0500
@@ -30,3 +30,4 @@
#[solaris]sun.tools.attach.SolarisAttachProvider
#[windows]sun.tools.attach.WindowsAttachProvider
#[linux]sun.tools.attach.LinuxAttachProvider
+#[bsd]sun.tools.attach.BsdAttachProvider
---- jdk/src/share/classes/sun/tools/jar/Main.java 2010-06-21 14:15:37.000000000 -0700
-+++ jdk/src/share/classes/sun/tools/jar/Main.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/classes/sun/tools/jar/Main.java 2011-01-20 18:54:34.000000000 -0500
++++ jdk/src/share/classes/sun/tools/jar/Main.java 2011-02-01 17:46:55.000000000 -0500
@@ -48,6 +48,7 @@
String zname = "";
String[] files;
@@ -8581,8 +9658,8 @@
if (!d.exists() && !d.mkdirs() || !d.isDirectory()) {
throw new IOException(formatMsg(
"error.create.dir", d.getPath()));
---- jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2010-06-21 14:15:37.000000000 -0700
-+++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2011-01-20 18:54:34.000000000 -0500
++++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2011-02-01 17:46:55.000000000 -0500
@@ -44,6 +44,8 @@
{0} : could not create directory
error.incorrect.length=\
@@ -8592,8 +9669,8 @@
out.added.manifest=\
added manifest
out.update.manifest=\
---- jdk/src/share/hpi/include/hpi_impl.h 2010-06-21 14:15:39.000000000 -0700
-+++ jdk/src/share/hpi/include/hpi_impl.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/hpi/include/hpi_impl.h 2011-01-20 18:54:36.000000000 -0500
++++ jdk/src/share/hpi/include/hpi_impl.h 2011-02-01 17:46:55.000000000 -0500
@@ -138,7 +138,11 @@
int sysBind(int fd, struct sockaddr *him, int len);
int sysAccept(int fd, struct sockaddr *him, int *len);
@@ -8607,8 +9684,8 @@
ssize_t sysSendTo(int fd, char *buf, int len, int flags, struct sockaddr *to,
int tolen);
ssize_t sysRecvFrom(int fd, char *buf, int nbytes, int flags,
---- jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2011-02-01 17:46:55.000000000 -0500
@@ -32,6 +32,10 @@
#include <unistd.h>
#endif
@@ -8634,8 +9711,8 @@
#ifdef _MSC_VER
typedef LONGLONG jlong;
typedef DWORDLONG julong;
---- jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp 2011-02-01 17:46:55.000000000 -0500
@@ -33,9 +33,14 @@
#include <limits.h>
#include <time.h>
@@ -8673,8 +9750,8 @@
true));
}
---- jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c 2011-02-01 17:46:55.000000000 -0500
@@ -33,7 +33,11 @@
#include <jni.h>
@@ -8687,8 +9764,8 @@
#include "SoundDefs.h"
#include "DirectAudio.h"
#include "Utilities.h"
---- jdk/src/share/native/com/sun/media/sound/Platform.c 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/com/sun/media/sound/Platform.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/com/sun/media/sound/Platform.c 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/com/sun/media/sound/Platform.c 2011-02-01 17:46:55.000000000 -0500
@@ -99,5 +99,17 @@
return com_sun_media_sound_Platform_LIB_ALSA;
}
@@ -8707,8 +9784,8 @@
+#endif
return 0;
}
---- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-02-01 17:46:55.000000000 -0500
@@ -31,6 +31,7 @@
#define X_WINDOWS 1
#define X_SOLARIS 2
@@ -8736,8 +9813,8 @@
+
+
#endif // __SOUNDDEFS_INCLUDED__
---- jdk/src/share/native/common/check_code.c 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/common/check_code.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/common/check_code.c 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/common/check_code.c 2011-02-01 17:46:56.000000000 -0500
@@ -1069,7 +1069,7 @@
* Make sure that branches don't go into the middle of nowhere.
*/
@@ -8799,8 +9876,8 @@
/* There can't be more than 64K labels because of the limit
* on per-method byte code length.
*/
---- jdk/src/share/native/java/io/io_util.h 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/java/io/io_util.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/java/io/io_util.h 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/java/io/io_util.h 2011-02-01 17:46:56.000000000 -0500
@@ -29,7 +29,15 @@
extern jfieldID IO_fd_fdID;
extern jfieldID IO_handle_fdID;
@@ -8818,8 +9895,8 @@
#define O_SYNC (0x0800)
#define O_DSYNC (0x2000)
#endif
---- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2011-02-01 17:46:56.000000000 -0500
@@ -25,6 +25,10 @@
* questions.
*/
@@ -8845,8 +9922,8 @@
/*
* ANSI/POSIX
---- jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h 2011-02-01 17:46:56.000000000 -0500
@@ -61,7 +61,7 @@
#define log1p jlog1p
#define expm1 jexpm1
@@ -8856,8 +9933,8 @@
#define __ieee754_sqrt __j__ieee754_sqrt
#define __ieee754_acos __j__ieee754_acos
#define __ieee754_acosh __j__ieee754_acosh
---- jdk/src/share/native/java/util/zip/Inflater.c 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/java/util/zip/Inflater.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/java/util/zip/Inflater.c 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/java/util/zip/Inflater.c 2011-02-01 17:46:56.000000000 -0500
@@ -65,6 +65,10 @@
return jlong_zero;
} else {
@@ -8880,8 +9957,8 @@
}
JNIEXPORT void JNICALL
---- jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/java/util/zip/zlib-1.1.3/zconf.h 2011-02-01 17:46:56.000000000 -0500
@@ -42,44 +42,49 @@
/* for _LP64 */
#include <sys/types.h>
@@ -8965,8 +10042,8 @@
#endif
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
---- jdk/src/share/native/sun/awt/debug/debug_util.h 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/sun/awt/debug/debug_util.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/debug/debug_util.h 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/sun/awt/debug/debug_util.h 2011-02-01 17:46:56.000000000 -0500
@@ -50,7 +50,9 @@
#include <stdio.h>
#include <string.h>
@@ -8977,8 +10054,8 @@
#include <limits.h>
/* keep these after the other headers */
---- jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/sun/awt/image/BufImgSurfaceData.c 2011-02-01 17:46:56.000000000 -0500
@@ -24,7 +24,11 @@
*/
@@ -8991,8 +10068,8 @@
#include "sun_awt_image_BufImgSurfaceData.h"
---- jdk/src/share/native/sun/awt/image/DataBufferNative.c 2010-06-21 14:15:40.000000000 -0700
-+++ jdk/src/share/native/sun/awt/image/DataBufferNative.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/image/DataBufferNative.c 2011-01-20 18:54:37.000000000 -0500
++++ jdk/src/share/native/sun/awt/image/DataBufferNative.c 2011-02-01 17:46:56.000000000 -0500
@@ -23,7 +23,11 @@
* questions.
*/
@@ -9005,8 +10082,8 @@
#include "SurfaceData.h"
#include "sun_awt_image_DataBufferNative.h"
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2011-02-01 17:46:56.000000000 -0500
@@ -86,7 +86,7 @@
#endif /* MLIB_USE_FTOI_CLAMPING */
@@ -9046,8 +10123,8 @@
#endif /* _NO_LONGLONG */
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2011-02-01 17:46:56.000000000 -0500
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -9087,8 +10164,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2011-02-01 17:46:56.000000000 -0500
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -9128,8 +10205,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2011-02-01 17:46:56.000000000 -0500
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -9169,8 +10246,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2011-02-01 17:46:56.000000000 -0500
@@ -95,7 +95,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -9210,8 +10287,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2011-02-01 17:46:56.000000000 -0500
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -9251,8 +10328,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2011-02-01 17:46:56.000000000 -0500
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
@@ -9292,8 +10369,8 @@
#endif /* _NO_LONGLONG */
/***************************************************************/
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2011-02-01 17:46:56.000000000 -0500
@@ -95,7 +95,7 @@
dst = dp[0];
if (ld_offset + size < 32) {
@@ -9513,8 +10590,8 @@
}
#else /* _LONGLONG */
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2011-02-01 17:46:56.000000000 -0500
@@ -168,7 +168,7 @@
}
@@ -9795,8 +10872,8 @@
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2011-02-01 17:46:56.000000000 -0500
@@ -88,7 +88,7 @@
} d64_2_f32;
@@ -9948,8 +11025,8 @@
((mlib_u32*)lh)[0] = l; ((mlib_u32*)lh)[1] = l;
((mlib_u32*)lh)[2] = l; ((mlib_u32*)lh)[3] = h;
---- jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2011-02-01 17:46:56.000000000 -0500
@@ -30,7 +30,7 @@
typedef union {
mlib_d64 db;
@@ -9959,8 +11036,8 @@
mlib_s32 int1, int0;
#else
mlib_s32 int0, int1;
---- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2011-02-01 17:46:56.000000000 -0500
@@ -275,11 +275,11 @@
for (i = 0; j <= (b_size - 4); j += 4, i++) {
src0 = src1;
@@ -10059,8 +11136,8 @@
s0 = s1;
dp += SIZE;
sp += SIZE;
---- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2011-02-01 17:46:56.000000000 -0500
@@ -120,7 +120,7 @@
} \
}
@@ -11293,8 +12370,8 @@
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
---- jdk/src/share/native/sun/awt/medialib/mlib_image.h 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_image.h 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2011-02-01 17:46:56.000000000 -0500
@@ -27,6 +27,11 @@
#ifndef MLIB_IMAGE_H
#define MLIB_IMAGE_H
@@ -11307,8 +12384,8 @@
#include <mlib_types.h>
#include <mlib_status.h>
#include <mlib_sys.h>
---- jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2011-02-01 17:46:56.000000000 -0500
@@ -26,9 +26,15 @@
#include <stdlib.h>
@@ -11339,8 +12416,8 @@
return (void *) memalign(8, size);
#endif /* _MSC_VER */
}
---- jdk/src/share/native/sun/awt/medialib/mlib_types.h 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/awt/medialib/mlib_types.h 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2011-02-01 17:46:56.000000000 -0500
@@ -59,7 +59,10 @@
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__GNUC__)
@@ -11353,8 +12430,8 @@
#include <stdint.h> /* for uintptr_t */
#include <malloc.h> /* for ptrdiff_t */
#else
---- jdk/src/share/native/sun/font/AccelGlyphCache.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/font/AccelGlyphCache.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/font/AccelGlyphCache.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/font/AccelGlyphCache.c 2011-02-01 17:46:56.000000000 -0500
@@ -23,7 +23,11 @@
* questions.
*/
@@ -11367,8 +12444,8 @@
#include "jni.h"
#include "AccelGlyphCache.h"
#include "Trace.h"
---- jdk/src/share/native/sun/font/DrawGlyphList.c 2010-06-21 14:15:41.000000000 -0700
-+++ jdk/src/share/native/sun/font/DrawGlyphList.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/font/DrawGlyphList.c 2011-01-20 18:54:38.000000000 -0500
++++ jdk/src/share/native/sun/font/DrawGlyphList.c 2011-02-01 17:46:56.000000000 -0500
@@ -26,7 +26,11 @@
#include "jlong.h"
#include "math.h"
@@ -11381,8 +12458,8 @@
#include "sunfontids.h"
#include "fontscalerdefs.h"
#include "glyphblitting.h"
---- jdk/src/share/native/sun/font/sunFont.c 2010-06-21 14:15:42.000000000 -0700
-+++ jdk/src/share/native/sun/font/sunFont.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/font/sunFont.c 2011-01-20 18:54:39.000000000 -0500
++++ jdk/src/share/native/sun/font/sunFont.c 2011-02-01 17:46:56.000000000 -0500
@@ -24,7 +24,9 @@
*/
@@ -11393,8 +12470,8 @@
#include "string.h"
#include "gdefs.h"
#include "jlong.h"
---- jdk/src/share/native/sun/java2d/SurfaceData.c 2010-06-21 14:15:42.000000000 -0700
-+++ jdk/src/share/native/sun/java2d/SurfaceData.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/java2d/SurfaceData.c 2011-01-20 18:54:39.000000000 -0500
++++ jdk/src/share/native/sun/java2d/SurfaceData.c 2011-02-01 17:46:56.000000000 -0500
@@ -28,7 +28,11 @@
#include "jni_util.h"
#include "Disposer.h"
@@ -11407,8 +12484,8 @@
#include "string.h"
/**
---- jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2010-06-21 14:15:42.000000000 -0700
-+++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2011-01-20 18:54:39.000000000 -0500
++++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2011-02-01 17:46:56.000000000 -0500
@@ -26,6 +26,9 @@
#ifndef OGLFuncs_h_Included
#define OGLFuncs_h_Included
@@ -11419,8 +12496,8 @@
#include "jni.h"
#include "J2D_GL/gl.h"
#include "J2D_GL/glext.h"
---- jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2010-06-21 14:15:42.000000000 -0700
-+++ jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2011-01-20 18:54:39.000000000 -0500
++++ jdk/src/share/native/sun/java2d/opengl/OGLRenderQueue.c 2011-02-01 17:46:56.000000000 -0500
@@ -25,7 +25,11 @@
#ifndef HEADLESS
@@ -11433,8 +12510,8 @@
#include "sun_java2d_pipe_BufferedOpCodes.h"
---- jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2010-06-21 14:15:42.000000000 -0700
-+++ jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2011-01-20 18:54:39.000000000 -0500
++++ jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2011-02-01 17:46:56.000000000 -0500
@@ -25,7 +25,11 @@
#ifndef HEADLESS
@@ -11447,8 +12524,8 @@
#include <math.h>
#include <jlong.h>
---- jdk/src/share/transport/socket/socketTransport.c 2010-06-21 14:15:43.000000000 -0700
-+++ jdk/src/share/transport/socket/socketTransport.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/share/transport/socket/socketTransport.c 2011-01-20 18:54:40.000000000 -0500
++++ jdk/src/share/transport/socket/socketTransport.c 2011-02-01 17:46:56.000000000 -0500
@@ -65,6 +65,9 @@
#define HEADER_SIZE 11
#define MAX_DATA_SIZE 1000
@@ -11536,8 +12613,8 @@
return res;
} else if (res == 0) {
break; /* eof, return nbytes which is less than len */
---- jdk/src/solaris/back/exec_md.c 2010-06-21 14:15:43.000000000 -0700
-+++ jdk/src/solaris/back/exec_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/back/exec_md.c 2011-01-20 18:54:40.000000000 -0500
++++ jdk/src/solaris/back/exec_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -30,7 +30,7 @@
#include "sys.h"
#include "util.h"
@@ -11547,8 +12624,8 @@
/* Linux */
#define FORK() fork()
#else
---- jdk/src/solaris/back/linker_md.c 2010-06-21 14:15:43.000000000 -0700
-+++ jdk/src/solaris/back/linker_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/back/linker_md.c 2011-01-20 18:54:40.000000000 -0500
++++ jdk/src/solaris/back/linker_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -48,6 +48,12 @@
#include "threads_md.h"
#endif
@@ -11574,8 +12651,8 @@
}
}
---- jdk/src/solaris/back/util_md.h 2010-06-21 14:15:43.000000000 -0700
-+++ jdk/src/solaris/back/util_md.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/back/util_md.h 2011-01-20 18:54:40.000000000 -0500
++++ jdk/src/solaris/back/util_md.h 2011-02-01 17:46:56.000000000 -0500
@@ -29,7 +29,7 @@
#include <stddef.h>
@@ -11602,8 +12679,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 2010-06-21 14:15:43.000000000 -0700
-+++ jdk/src/solaris/bin/java_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/bin/java_md.c 2011-01-20 18:54:40.000000000 -0500
++++ jdk/src/solaris/bin/java_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -24,6 +24,7 @@
*/
@@ -11818,8 +12895,8 @@
/* Coarse estimation of number of digits assuming the worst case is a 64-bit pid. */
#define MAX_PID_STR_SZ 20
---- jdk/src/solaris/bin/java_md.h 2010-06-21 14:15:43.000000000 -0700
-+++ jdk/src/solaris/bin/java_md.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/bin/java_md.h 2011-01-20 18:54:40.000000000 -0500
++++ jdk/src/solaris/bin/java_md.h 2011-02-01 17:46:56.000000000 -0500
@@ -58,10 +58,14 @@
#include <sys/time.h>
#define CounterGet() (gethrtime()/1000)
@@ -11836,8 +12913,8 @@
/*
* Function prototypes.
---- jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2010-06-21 14:15:43.000000000 -0700
-+++ jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2011-01-20 18:54:40.000000000 -0500
++++ jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2011-02-01 17:46:56.000000000 -0500
@@ -403,7 +403,7 @@
if (fontID != null) {
fileName = (String)fontNameMap.get(fontID);
@@ -11856,8 +12933,463 @@
fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
}
fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
---- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2011-02-01 17:46:56.000000000 -0500
+@@ -47,6 +47,10 @@
+ public static SelectorProvider create() {
+ String osname = AccessController.doPrivileged(
+ new GetPropertyAction("os.name"));
++ if ("FreeBSD".equals(osname)) {
++ return new sun.nio.ch.KqueueSelectorProvider();
++ }
++
+ if ("SunOS".equals(osname)) {
+ return new sun.nio.ch.DevPollSelectorProvider();
+ }
+--- jdk/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/solaris/classes/sun/nio/ch/KqueueArrayWrapper.java 2011-02-01 17:46:56.000000000 -0500
+@@ -0,0 +1,231 @@
++/*
++ * Scratched by davidxu@freebsd.org
++ */
++
++package sun.nio.ch;
++
++import sun.misc.*;
++import java.io.IOException;
++import java.util.HashMap;
++import java.util.Set;
++import java.util.Arrays;
++
++class KqueueArrayWrapper {
++
++ // Event masks copied from class AbstractPollArrayWrapper
++ static final short POLLIN = 0x0001;
++ static final short POLLOUT = 0x0004;
++ static final short POLLERR = 0x0008;
++ static final short POLLHUP = 0x0010;
++ static final short POLLNVAL = 0x0020;
++ static final short POLLREMOVE = 0x0800;
++
++ // Kevent filters
++ static final short EVFILT_READ = -1;
++ static final short EVFILT_WRITE = -2;
++
++ // Kevent flags
++ static final short EV_ADD = 0x0001;
++ static final short EV_DELETE = 0x0002;
++ static final short EV_ERROR = 0x4000;
++
++ // Miscellaneous constants
++ static final int SIZE_KEVENT = keventSize();
++
++ // Zero mask to unregister events from kqueue
++ static final Integer ZERO_MASK = new Integer(0);
++
++ // Capacity increment of some arrays
++ static final int capacityIncr = 100;
++
++ KqueueArrayWrapper() {
++ int allocationSize;
++
++ // initial size of event array
++ pollKeventSize = capacityIncr * 2;
++ allocationSize = pollKeventSize * SIZE_KEVENT;
++ pollKeventArray = new AllocatedNativeObject(allocationSize, true);
++ kqfd = kqueue();
++ }
++
++ // Machinery for remembering fd registration changes
++ private HashMap<Integer, Integer> updateMap = new HashMap<Integer, Integer>();
++ private int[] oldMasks = new int[capacityIncr];
++
++ // kevent array to receive
++ private AllocatedNativeObject pollKeventArray;
++
++ // current size of pollKeventArray
++ int pollKeventSize;
++
++ // the pollKeventSize should be larger than this
++ int nextKeventSize;
++
++ // The fd of the kqueue()
++ int kqfd;
++
++ // The fd of the interrupt line going out
++ int outgoingInterruptFD;
++
++ // The fd of the interrupt line coming in
++ int incomingInterruptFD;
++
++ // The index of the interrupt FD
++ int interruptedIndex;
++
++ // Number of updated kevent entries
++ int updated;
++
++ // ensure some array sizes are large enough with a given file handle
++ void ensureFd(int fd) {
++ ensureNextEventFd(fd);
++ if (oldMasks.length < fd+1)
++ oldMasks = Arrays.copyOf(oldMasks, fd + capacityIncr);
++ }
++
++ void ensureNextEventFd(int fd) {
++ // each file handle may have two filters, read and write.
++ if (nextKeventSize / 2 < fd+1)
++ nextKeventSize = (fd+1) * 2;
++ }
++
++ void resizeEventBuffer() {
++ if (nextKeventSize > pollKeventSize) {
++ pollKeventArray.free();
++ pollKeventSize = nextKeventSize + capacityIncr * 2;
++ int allocationSize = pollKeventSize * SIZE_KEVENT;
++ pollKeventArray = new AllocatedNativeObject(allocationSize, true);
++ }
++ }
++
++ void initInterrupt(int fd0, int fd1) {
++ outgoingInterruptFD = fd1;
++ incomingInterruptFD = fd0;
++ ensureFd(fd0);
++ register(kqfd, fd0, EVFILT_READ);
++ }
++
++ int getReventOps(int i) {
++ short filter = getKeventFilter(pollKeventArray.address(), i);
++ short flags = getKeventFlags(pollKeventArray.address(), i);
++ if ((flags & EV_ERROR) != 0)
++ return POLLERR;
++ if (filter == EVFILT_READ)
++ return POLLIN;
++ if (filter == EVFILT_WRITE)
++ return POLLOUT;
++ return (0);
++ }
++
++ int getDescriptor(int i) {
++ return getKeventIdent(pollKeventArray.address(), i);
++ }
++
++ void setInterest(int fd, int mask) {
++ if (fd <0)
++ throw new IndexOutOfBoundsException("file handle less than 0");
++ synchronized (updateMap) {
++ ensureFd(fd);
++ updateMap.put(new Integer(fd), new Integer(mask));
++ }
++ }
++
++ void release(int fd) {
++ synchronized (updateMap) {
++ updateMap.put(new Integer(fd), ZERO_MASK);
++ }
++ }
++
++ void closeKqueueFD() throws IOException {
++ FileDispatcher.closeIntFD(kqfd);
++ pollKeventArray.free();
++ }
++
++ int poll(long timeout) {
++ int changeCount = updateRegistrations();
++ updated = kevent(kqfd, pollKeventArray.address(), changeCount,
++ pollKeventArray.address(), pollKeventSize, timeout);
++ for (int i = 0; i < updated; i++) {
++ if (getDescriptor(i) == incomingInterruptFD) {
++ interruptedIndex = i;
++ interrupted = true;
++ break;
++ }
++ }
++ return updated;
++ }
++
++ int updateRegistrations() {
++ int index = 0;
++ synchronized (updateMap) {
++ resizeEventBuffer();
++
++ Set<Integer> s = updateMap.keySet();
++ /*
++ * Because resizeEventBuffer may reallocate event buffer,
++ * we must retrieve fresh address here.
++ */
++ long address = pollKeventArray.address();
++
++ for (Integer fd : s) {
++ Integer newmask = updateMap.get(fd);
++ int oldmask = oldMasks[fd];
++ if ((oldmask & POLLIN) != 0) {
++ if ((newmask & POLLIN) == 0) {
++ putKevent(address, index, fd.intValue(), EV_DELETE, EVFILT_READ);
++ index++;
++ }
++ } else {
++ if ((newmask & POLLIN) != 0) {
++ putKevent(address, index, fd.intValue(), EV_ADD, EVFILT_READ);
++ index++;
++ }
++ }
++
++ if ((oldmask & POLLOUT) != 0) {
++ if ((newmask & POLLOUT) == 0) {
++ putKevent(address, index, fd.intValue(), EV_DELETE, EVFILT_WRITE);
++ index++;
++ }
++ } else {
++ if ((newmask & POLLOUT) != 0) {
++ putKevent(address, index, fd.intValue(), EV_ADD, EVFILT_WRITE);
++ index++;
++ }
++ }
++ oldMasks[fd] = newmask;
++ }
++ updateMap.clear();
++ }
++ return index;
++ }
++
++ boolean interrupted = false;
++
++ public void interrupt() {
++ interrupt(outgoingInterruptFD);
++ }
++
++ public int interruptedIndex() {
++ return interruptedIndex;
++ }
++
++ boolean interrupted() {
++ return interrupted;
++ }
++
++ void clearInterrupted() {
++ interrupted = false;
++ }
++
++ private static native int kqueue();
++ private static native void register(int kqfd, int fd, short filter);
++ private static native int kevent(int kqfd, long changeList, int nchanges, long eventList,
++ int nevents, long timeout);
++ private static native int keventSize();
++ private static native void interrupt(int fd);
++ private static native void putKevent(long address, int index, int fd, short flag, short filter);
++ private static native short getKeventFilter(long address, int index);
++ private static native short getKeventFlags(long address, int index);
++ private static native int getKeventIdent(long address, int index);
++}
+--- jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java 2011-02-01 17:46:56.000000000 -0500
+@@ -0,0 +1,205 @@
++/*
++ * scratched by davidxu@freebsd.org
++ */
++
++package sun.nio.ch;
++
++import java.io.IOException;
++import java.nio.channels.*;
++import java.nio.channels.spi.*;
++import java.util.*;
++import sun.misc.*;
++
++
++/**
++ * An implementation of Selector for FreeBSD.
++ */
++class KqueueSelectorImpl
++ extends SelectorImpl
++{
++
++ // File descriptors used for interrupt
++ protected int fd0;
++ protected int fd1;
++
++ // The kqueue object
++ KqueueArrayWrapper kqueueWrapper;
++
++ // The number of valid channels in this Selector's poll array
++ private int totalChannels;
++
++ // Maps from file descriptors to keys
++ private HashMap fdToKey;
++
++ // True if this Selector has been closed
++ private boolean closed = false;
++
++ // Lock for interrupt triggering and clearing
++ private Object interruptLock = new Object();
++ private boolean interruptTriggered = false;
++
++ // Trace number of file handles are updated.
++ private BitSet updatedSet;
++
++ /**
++ * Package private constructor called by factory method in
++ * the abstract superclass Selector.
++ */
++ KqueueSelectorImpl(SelectorProvider sp) {
++ super(sp);
++ int[] fdes = new int[2];
++ IOUtil.initPipe(fdes, false);
++ fd0 = fdes[0];
++ fd1 = fdes[1];
++ kqueueWrapper = new KqueueArrayWrapper();
++ totalChannels = 1;
++ kqueueWrapper.initInterrupt(fd0, fd1);
++ updatedSet = new BitSet();
++ fdToKey = new HashMap();
++ }
++
++ protected int doSelect(long timeout)
++ throws IOException
++ {
++ if (closed)
++ throw new ClosedSelectorException();
++ processDeregisterQueue();
++ try {
++ begin();
++ kqueueWrapper.poll(timeout);
++ } finally {
++ end();
++ }
++ processDeregisterQueue();
++ int numKeysUpdated = updateSelectedKeys();
++ if (kqueueWrapper.interrupted()) {
++ // Clear the wakeup pipe
++ synchronized (interruptLock) {
++ kqueueWrapper.clearInterrupted();
++ IOUtil.drain(fd0);
++ interruptTriggered = false;
++ }
++ }
++ return numKeysUpdated;
++ }
++
++ /**
++ * Update the keys whose fd's have been selected by the kqueue.
++ * Add the ready keys to the ready queue.
++ */
++ private int updateSelectedKeys() {
++ int entries = kqueueWrapper.updated;
++ int numKeysUpdated = 0;
++ SelectionKeyImpl ski;
++ int fd;
++ int i;
++
++ updatedSet.clear();
++ for (i = 0; i < entries; i++) {
++ fd = kqueueWrapper.getDescriptor(i);
++ ski = (SelectionKeyImpl) fdToKey.get(new Integer(fd));
++ // ski is null in the case of an interrupt
++ if (ski != null)
++ ski.nioReadyOps(0);
++ }
++
++ for (i = 0; i < entries; i++) {
++ fd = kqueueWrapper.getDescriptor(i);
++ ski = (SelectionKeyImpl) fdToKey.get(new Integer(fd));
++ // ski is null in the case of an interrupt
++ if (ski != null) {
++ int rOps = kqueueWrapper.getReventOps(i);
++ if (selectedKeys.contains(ski)) {
++ if (ski.channel.translateAndUpdateReadyOps(rOps, ski)) {
++ if (!updatedSet.get(fd)) {
++ updatedSet.set(fd);
++ numKeysUpdated++;
++ }
++ }
++ } else {
++ ski.channel.translateAndUpdateReadyOps(rOps, ski);
++ if ((ski.nioReadyOps() & ski.nioInterestOps()) != 0) {
++ selectedKeys.add(ski);
++ if (!updatedSet.get(fd)) {
++ updatedSet.set(fd);
++ numKeysUpdated++;
++ }
++ }
++ }
++ }
++ }
++ return numKeysUpdated;
++ }
++
++ protected void implClose() throws IOException {
++ if (!closed) {
++ closed = true;
++ FileDispatcher.closeIntFD(fd0);
++ FileDispatcher.closeIntFD(fd1);
++ if (kqueueWrapper != null) {
++ kqueueWrapper.release(fd0);
++ kqueueWrapper.closeKqueueFD();
++ kqueueWrapper = null;
++ selectedKeys = null;
++
++ // Deregister channels
++ Iterator i = keys.iterator();
++ while (i.hasNext()) {
++ SelectionKeyImpl ski = (SelectionKeyImpl)i.next();
++ deregister(ski);
++ SelectableChannel selch = ski.channel();
++ if (!selch.isOpen() && !selch.isRegistered())
++ ((SelChImpl)selch).kill();
++ i.remove();
++ }
++ totalChannels = 0;
++
++ }
++ fd0 = -1;
++ fd1 = -1;
++ }
++ }
++
++ protected void implRegister(SelectionKeyImpl ski) {
++ int fd = IOUtil.fdVal(ski.channel.getFD());
++ fdToKey.put(new Integer(fd), ski);
++ totalChannels++;
++ keys.add(ski);
++ }
++
++ protected void implDereg(SelectionKeyImpl ski) throws IOException {
++ int i = ski.getIndex();
++ assert (i >= 0);
++ int fd = ski.channel.getFDVal();
++ fdToKey.remove(new Integer(fd));
++ kqueueWrapper.release(fd);
++ totalChannels--;
++ ski.setIndex(-1);
++ keys.remove(ski);
++ selectedKeys.remove(ski);
++ deregister((AbstractSelectionKey)ski);
++ SelectableChannel selch = ski.channel();
++ if (!selch.isOpen() && !selch.isRegistered())
++ ((SelChImpl)selch).kill();
++ }
++
++ void putEventOps(SelectionKeyImpl sk, int ops) {
++ int fd = IOUtil.fdVal(sk.channel.getFD());
++ kqueueWrapper.setInterest(fd, ops);
++ }
++
++ public Selector wakeup() {
++ synchronized (interruptLock) {
++ if (!interruptTriggered) {
++ kqueueWrapper.interrupt();
++ interruptTriggered = true;
++ }
++ }
++ return this;
++ }
++
++ static {
++ Util.load();
++ }
++
++}
+--- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2011-02-01 17:46:56.000000000 -0500
@@ -119,7 +119,11 @@
}
@@ -11871,8 +13403,8 @@
}
static final int UNINITIALIZED = -1;
---- jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java 2010-06-27 11:37:43.000000000 -0700
-+++ jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java 2011-02-01 17:20:23.000000000 -0500
++++ jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java 2011-02-01 17:46:56.000000000 -0500
@@ -38,9 +38,6 @@
*/
public class BsdVirtualMachine extends HotSpotVirtualMachine {
@@ -11976,8 +13508,8 @@
- isBsdThreads = isBsdThreads();
}
}
---- jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/demo/jvmti/hprof/hprof_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -33,7 +33,7 @@
#include <sys/stat.h>
#include <fcntl.h>
@@ -12023,8 +13555,8 @@
addr = (void*)&Agent_OnLoad;
#else
/* Just using &Agent_OnLoad will get the first external symbol with
---- jdk/src/solaris/hpi/include/interrupt.h 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/include/interrupt.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/include/interrupt.h 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/include/interrupt.h 2011-02-01 17:46:56.000000000 -0500
@@ -75,7 +75,7 @@
* N_INTERRUPTS - The number of interrupt channels. These
* are numbered from 0 to (N_INTERRUPTS - 1).
@@ -12045,8 +13577,8 @@
#ifdef SA_SIGINFO
/* Thread implementation dependent interrupt dispatcher. */
void intrDispatchMD(int sig, siginfo_t *info, void *uc);
---- jdk/src/solaris/hpi/include/largefile.h 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/include/largefile.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/include/largefile.h 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/include/largefile.h 2011-02-01 17:46:56.000000000 -0500
@@ -34,6 +34,10 @@
#include "largefile_linux.h"
#endif
@@ -12058,8 +13590,8 @@
/*
* Prototypes for wrappers that we define. These wrapper functions
* are low-level I/O routines that will use 64 bit versions if
---- jdk/src/solaris/hpi/include/largefile_bsd.h 2010-06-27 11:37:43.000000000 -0700
-+++ jdk/src/solaris/hpi/include/largefile_bsd.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/include/largefile_bsd.h 2011-02-01 17:20:23.000000000 -0500
++++ jdk/src/solaris/hpi/include/largefile_bsd.h 2011-02-01 17:46:56.000000000 -0500
@@ -23,14 +23,28 @@
* questions.
*/
@@ -12096,8 +13628,8 @@
+#define pwrite64 pwrite
+
+#endif /* _JAVASOFT_BSD_LARGEFILE_SUPPORT_H_ */
---- jdk/src/solaris/hpi/native_threads/include/threads_md.h 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/native_threads/include/threads_md.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/native_threads/include/threads_md.h 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/native_threads/include/threads_md.h 2011-02-01 17:46:56.000000000 -0500
@@ -36,6 +36,8 @@
#define N_TRACED_REGS 12
#elif i386
@@ -12144,8 +13676,8 @@
#ifdef __linux__
extern thread_key_t intrJmpbufkey;
---- jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/native_threads/src/condvar_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -58,7 +58,7 @@
{
int err;
@@ -12155,8 +13687,8 @@
err = pthread_cond_destroy((cond_t *) &condvar->cond);
#else
err = cond_destroy((cond_t *) condvar);
---- jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/native_threads/src/monitor_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -147,7 +147,7 @@
mid->monitor_owner = self;
mid->entry_count = 1;
@@ -12166,8 +13698,8 @@
if (mid->monitor_owner == self) {
mid->entry_count++;
return SYS_OK;
---- jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/native_threads/src/sys_api_td.c 2011-02-01 17:46:56.000000000 -0500
@@ -39,6 +39,10 @@
#include <sys/ioctl.h>
#endif
@@ -12190,8 +13722,8 @@
#ifdef NO_INTERRUPTIBLE_IO
#undef CLOSEIO
#else
---- jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2010-06-27 11:37:43.000000000 -0700
-+++ jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2011-02-01 17:20:23.000000000 -0500
++++ jdk/src/solaris/hpi/native_threads/src/threads_bsd.c 2011-02-01 17:46:56.000000000 -0500
@@ -23,79 +23,44 @@
* questions.
*/
@@ -13067,8 +14599,8 @@
-
- print_lwps();
}
---- jdk/src/solaris/hpi/native_threads/src/threads_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/native_threads/src/threads_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/native_threads/src/threads_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/native_threads/src/threads_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -54,6 +54,10 @@
#error That can NOT possibly be right.
#endif
@@ -13150,8 +14682,8 @@
info.isMP = (cpus < 0) ? 1 : (cpus > 1);
info.name = "native threads";
---- jdk/src/solaris/hpi/src/linker_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/src/linker_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/src/linker_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/src/linker_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -44,11 +44,19 @@
#include "threads_md.h"
#endif
@@ -13218,8 +14750,8 @@
#endif
/*
* This is a bit of bulletproofing to catch the commonly occurring
---- jdk/src/solaris/hpi/src/memory_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/src/memory_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/src/memory_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/src/memory_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -50,12 +50,24 @@
#include <stdlib.h>
#include <stdio.h> /* For perror() */
@@ -13309,8 +14841,8 @@
ret = committedAddr;
#else
ret = requestedAddr;
---- jdk/src/solaris/hpi/src/system_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/hpi/src/system_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/hpi/src/system_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/hpi/src/system_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -41,6 +41,7 @@
#include <dlfcn.h>
@@ -13364,8 +14896,8 @@
fd = open64_w(path, oflag, mode);
if (delete != 0) {
unlink(path);
---- jdk/src/solaris/instrument/EncodingSupport_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/instrument/EncodingSupport_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/instrument/EncodingSupport_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/instrument/EncodingSupport_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -28,7 +28,10 @@
#include <string.h>
#include <ctype.h>
@@ -13395,8 +14927,8 @@
/* Open conversion descriptors */
iconvToPlatform = iconv_open(codeset, "UTF-8");
---- jdk/src/solaris/javavm/export/jvm_md.h 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/javavm/export/jvm_md.h 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/javavm/export/jvm_md.h 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/javavm/export/jvm_md.h 2011-02-01 17:46:56.000000000 -0500
@@ -39,7 +39,14 @@
#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
@@ -13421,8 +14953,8 @@
/* Signals */
---- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -32,10 +32,16 @@
#include <sys/types.h>
@@ -13585,8 +15117,8 @@
}
JNIEXPORT jlong JNICALL
---- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -41,6 +41,11 @@
#include "java_io_FileSystem.h"
#include "java_io_UnixFileSystem.h"
@@ -13642,8 +15174,8 @@
struct stat sb;
if (stat(path, &sb) == 0) {
---- jdk/src/solaris/native/java/io/canonicalize_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/io/canonicalize_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/native/java/io/canonicalize_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/io/canonicalize_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -33,7 +33,9 @@
#include <sys/stat.h>
#include <errno.h>
@@ -13654,8 +15186,8 @@
/* Note: The comments in this file use the terminology
---- jdk/src/solaris/native/java/io/io_util_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/io/io_util_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/native/java/io/io_util_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/io/io_util_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -36,7 +36,7 @@
WITH_PLATFORM_STRING(env, path, ps) {
FD fd;
@@ -13665,8 +15197,8 @@
/* Remove trailing slashes, since the kernel won't */
char *p = (char *)ps + strlen(ps) - 1;
while ((p > ps) && (*p == '/'))
---- jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -28,6 +28,11 @@
#include "jni.h"
#include "jni_util.h"
@@ -13707,8 +15239,8 @@
jbyteArray var, val;
const char * valBeg = varEnd + 1;
jsize varLength = varEnd - environ[i];
---- jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -40,7 +40,11 @@
#include <stdlib.h>
#include <sys/types.h>
@@ -13911,8 +15443,8 @@
/* Close the parent sides of the pipe.
Give the child sides of the pipes the right fileno's.
Closing pipe fds here is redundant, since closeDescriptors()
---- jdk/src/solaris/native/java/lang/java_props_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/lang/java_props_md.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/native/java/lang/java_props_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/lang/java_props_md.c 2011-02-01 17:46:56.000000000 -0500
@@ -23,7 +23,7 @@
* questions.
*/
@@ -14046,8 +15578,8 @@
return &sprops;
}
---- jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2010-06-20 21:56:27.000000000 -0700
+--- jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2011-02-01 17:46:56.000000000 -0500
@@ -35,17 +35,293 @@
#include <stdlib.h>
#include <ctype.h>
@@ -14404,8 +15936,8 @@
#define SET_NONBLOCKING(fd) { \
int flags = fcntl(fd, F_GETFL); \
flags |= O_NONBLOCK; \
---- jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2011-02-01 17:46:56.000000000 -0500
@@ -32,6 +32,9 @@
#include <strings.h>
#include <stdlib.h>
@@ -14455,8 +15987,8 @@
}
return (*env)->NewStringUTF(env, hostname);
}
---- jdk/src/solaris/native/java/net/NetworkInterface.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/net/NetworkInterface.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/net/NetworkInterface.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/net/NetworkInterface.c 2011-02-01 17:46:56.000000000 -0500
@@ -23,13 +23,13 @@
* questions.
*/
@@ -14733,8 +16265,8 @@
memset((char *) &if2, 0, sizeof(if2));
strcpy(if2.ifr_name, name_utf);
---- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2011-02-01 17:46:56.000000000 -0500
@@ -23,12 +23,12 @@
* questions.
*/
@@ -14841,8 +16373,8 @@
}
}
}
---- jdk/src/solaris/native/java/net/PlainSocketImpl.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/net/PlainSocketImpl.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/net/PlainSocketImpl.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/net/PlainSocketImpl.c 2011-02-01 17:46:57.000000000 -0500
@@ -528,9 +528,11 @@
if (connect_rv == JVM_IO_INTR) {
JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException",
@@ -14855,8 +16387,8 @@
} else if (errno == ECONNREFUSED) {
NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException",
"Connection refused");
---- jdk/src/solaris/native/java/net/bsd_close.c 2010-06-27 11:37:43.000000000 -0700
-+++ jdk/src/solaris/native/java/net/bsd_close.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/net/bsd_close.c 2011-02-01 17:20:23.000000000 -0500
++++ jdk/src/solaris/native/java/net/bsd_close.c 2011-02-01 17:46:57.000000000 -0500
@@ -57,7 +57,7 @@
/*
* Signal to unblock thread
@@ -14866,8 +16398,8 @@
/*
* The fd table and the number of file descriptors
---- jdk/src/solaris/native/java/net/net_util_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/net/net_util_md.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/net/net_util_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/net/net_util_md.c 2011-02-01 17:46:57.000000000 -0500
@@ -34,6 +34,15 @@
#include <stdlib.h>
#include <dlfcn.h>
@@ -15038,8 +16570,8 @@
return setsockopt(fd, level, opt, arg, len);
}
---- jdk/src/solaris/native/java/net/net_util_md.h 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/net/net_util_md.h 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/net/net_util_md.h 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/net/net_util_md.h 2011-02-01 17:46:57.000000000 -0500
@@ -37,7 +37,7 @@
#endif
@@ -15049,8 +16581,8 @@
extern int NET_Timeout(int s, long timeout);
extern int NET_Read(int s, void* buf, size_t len);
extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
---- jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/nio/MappedByteBuffer.c 2011-02-01 17:46:57.000000000 -0500
@@ -38,7 +38,11 @@
jlong address, jlong len)
{
@@ -15075,8 +16607,8 @@
unsigned long lAddress = address;
jlong offset = lAddress % pageSize;
---- jdk/src/solaris/native/java/util/FileSystemPreferences.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/util/FileSystemPreferences.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/util/FileSystemPreferences.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/util/FileSystemPreferences.c 2011-02-01 17:46:57.000000000 -0500
@@ -47,8 +47,11 @@
return (jint) result;
}
@@ -15114,8 +16646,8 @@
if (rc < 0) {
close(fd);
---- jdk/src/solaris/native/java/util/TimeZone_md.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/java/util/TimeZone_md.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/java/util/TimeZone_md.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/java/util/TimeZone_md.c 2011-02-01 17:46:57.000000000 -0500
@@ -31,7 +31,7 @@
#include <errno.h>
#include <stddef.h>
@@ -15248,8 +16780,8 @@
sprintf(buf, (const char *)"GMT%c%02d:%02d",
sign, (int)(offset/3600), (int)((offset%3600)/60));
return strdup(buf);
---- jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2011-01-20 18:54:41.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2011-02-01 17:46:57.000000000 -0500
@@ -25,6 +25,7 @@
#include <jni.h>
@@ -15272,8 +16804,8 @@
if (handle == NULL) {
return JNI_FALSE;
}
---- jdk/src/solaris/native/sun/awt/VDrawingArea.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/VDrawingArea.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/VDrawingArea.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/VDrawingArea.c 2011-02-01 17:46:57.000000000 -0500
@@ -31,7 +31,11 @@
#endif /* !HEADLESS */
@@ -15286,8 +16818,8 @@
#ifdef __linux__
/* XXX: Shouldn't be necessary. */
---- jdk/src/solaris/native/sun/awt/X11Color.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/X11Color.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/X11Color.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/X11Color.c 2011-02-01 17:46:57.000000000 -0500
@@ -33,7 +33,9 @@
#include <math.h>
#include <sys/time.h>
@@ -15298,8 +16830,8 @@
#ifndef HEADLESS
#include <X11/Xlib.h>
#include <X11/Xatom.h>
---- jdk/src/solaris/native/sun/awt/XDrawingArea.c 2010-06-21 14:15:44.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/XDrawingArea.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/XDrawingArea.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/XDrawingArea.c 2011-02-01 17:46:57.000000000 -0500
@@ -30,7 +30,11 @@
#include <Xm/XmP.h>
@@ -15312,8 +16844,8 @@
#ifdef DEBUG
#include <jvm.h> /* To get jio_fprintf() */
---- jdk/src/solaris/native/sun/awt/awt_Font.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_Font.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_Font.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_Font.c 2011-02-01 17:46:57.000000000 -0500
@@ -334,7 +334,7 @@
if (strcmp(style, "regular") == 0) {
altstyle = "roman";
@@ -15323,8 +16855,8 @@
if (!strcmp(family, "lucidasans")) {
family = "lucida";
}
---- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2011-02-01 17:46:57.000000000 -0500
@@ -40,6 +40,7 @@
#include <jni.h>
#include <jni_util.h>
@@ -15351,7 +16883,7 @@
typedef struct {
int screen_number;
short x_org;
-@@ -631,19 +634,22 @@
+@@ -600,19 +603,22 @@
#endif /* HEADLESS */
#ifndef HEADLESS
@@ -15379,7 +16911,7 @@
XineramaQueryScreens = (XineramaQueryScreensFunc*)
dlsym(libHandle, XineramaQueryScreensName);
-@@ -679,11 +685,10 @@
+@@ -648,11 +654,10 @@
}
}
#endif
@@ -15393,7 +16925,7 @@
unsigned char fbhints[MAXFRAMEBUFFERS];
int32_t locNumScr = 0;
/* load and run XineramaGetInfo */
-@@ -692,8 +697,8 @@
+@@ -661,8 +666,8 @@
XineramaGetInfoFunc* XineramaSolarisFunc = NULL;
/* load library */
@@ -15404,7 +16936,7 @@
XineramaSolarisFunc = (XineramaGetInfoFunc*)dlsym(libHandle, XineramaGetInfoName);
XineramaSolarisCenterFunc =
(XineramaGetCenterHintFunc*)dlsym(libHandle, XineramaGetCenterHintName);
-@@ -740,11 +745,11 @@
+@@ -709,11 +714,11 @@
}
DTRACE_PRINTLN("Xinerama extension is available");
@@ -15418,7 +16950,7 @@
}
#endif /* HEADLESS */
-@@ -1600,7 +1605,7 @@
+@@ -1568,7 +1573,7 @@
{
jobject point = NULL;
#ifndef HEADLESS /* return NULL in HEADLESS, Linux */
@@ -15427,7 +16959,7 @@
int x,y;
AWT_LOCK();
-@@ -1613,7 +1618,7 @@
+@@ -1581,7 +1586,7 @@
DTRACE_PRINTLN("unable to call XineramaSolarisCenterFunc: symbol is null");
}
AWT_FLUSH_UNLOCK();
@@ -15436,7 +16968,7 @@
#endif /* HEADLESS */
return point;
}
-@@ -1678,7 +1683,11 @@
+@@ -1646,7 +1651,11 @@
{
int rr_maj_ver = 0, rr_min_ver = 0;
@@ -15449,8 +16981,8 @@
if (pLibRandR == NULL) {
J2dRlsTraceLn(J2D_TRACE_ERROR,
"X11GD_InitXrandrFuncs: Could not open libXrandr.so.2");
---- jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2011-02-01 17:46:57.000000000 -0500
@@ -69,7 +69,7 @@
XIMPreeditDrawCallbackStruct *);
static void PreeditCaretCallback(XIC, XPointer,
@@ -15612,7 +17144,7 @@
static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) {
JNIEnv *env = GetJNIEnv();
-@@ -1522,14 +1522,14 @@
+@@ -1514,14 +1514,14 @@
/* Use IMInstantiate call back only on Linux, as there is a bug in Solaris
(4768335)
*/
@@ -15629,7 +17161,7 @@
}
#endif
-@@ -1593,13 +1593,13 @@
+@@ -1585,13 +1585,13 @@
#endif /* XAWT */
globalRef = (*env)->NewGlobalRef(env, this);
pX11IMData->x11inputmethod = globalRef;
@@ -15646,7 +17178,7 @@
pX11IMData->lookup_buf = 0;
pX11IMData->lookup_buf_len = 0;
-@@ -1746,14 +1746,14 @@
+@@ -1738,14 +1738,14 @@
setXICFocus(pX11IMData->current_ic, req);
currentX11InputMethodInstance = pX11IMData->x11inputmethod;
currentFocusWindow = XtWindow(w);
@@ -15663,7 +17195,7 @@
onoffStatusWindow(pX11IMData, 0, False);
if (pX11IMData->current_ic != NULL)
#endif
-@@ -1770,7 +1770,7 @@
+@@ -1762,7 +1762,7 @@
Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env,
jobject this)
{
@@ -15672,7 +17204,7 @@
X11InputMethodData *pX11IMData;
StatusWindow *statusWindow;
-@@ -1867,7 +1867,7 @@
+@@ -1859,7 +1859,7 @@
X11InputMethodData *pX11IMData;
XVaNestedList status;
@@ -15681,7 +17213,7 @@
/*do nothing for linux? */
#else
AWT_LOCK();
-@@ -1973,7 +1973,7 @@
+@@ -1965,7 +1965,7 @@
JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow
(JNIEnv *env, jobject this, jlong window)
{
@@ -15690,8 +17222,8 @@
AWT_LOCK();
adjustStatusWindow(window);
AWT_UNLOCK();
---- jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c 2011-02-01 17:46:57.000000000 -0500
@@ -260,7 +260,11 @@
}
}
@@ -15704,8 +17236,8 @@
JNU_CallStaticMethodByName(env, NULL, "java/lang/System", "load",
"(Ljava/lang/String;)V",
---- jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_MToolkit.c 2011-02-01 17:46:57.000000000 -0500
@@ -63,8 +63,9 @@
extern JavaVM *jvm;
@@ -15726,8 +17258,8 @@
statusWindowEventHandler(xev);
#endif
xembed_eventHandler(&xev);
---- jdk/src/solaris/native/sun/awt/awt_Mlib.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_Mlib.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_Mlib.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_Mlib.c 2011-02-01 17:46:57.000000000 -0500
@@ -32,6 +32,7 @@
#include <dlfcn.h>
#include "jni.h"
@@ -15750,8 +17282,8 @@
}
if (handle == NULL) {
---- jdk/src/solaris/native/sun/awt/awt_Robot.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_Robot.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2011-02-01 17:46:57.000000000 -0500
@@ -45,7 +45,7 @@
#include "wsutils.h"
#include "list.h"
@@ -15761,8 +17293,8 @@
#include <sys/socket.h>
#endif
---- jdk/src/solaris/native/sun/awt/awt_util.h 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_util.h 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_util.h 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_util.h 2011-02-01 17:46:57.000000000 -0500
@@ -187,15 +187,20 @@
#ifdef __solaris__
extern Widget awt_util_getXICStatusAreaWindow(Widget w);
@@ -15785,8 +17317,8 @@
typedef struct _XmImRefRec {
Cardinal num_refs; /* Number of referencing widgets. */
Cardinal max_refs; /* Maximum length of refs array. */
---- jdk/src/solaris/native/sun/awt/awt_wm.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_wm.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_wm.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_wm.c 2011-02-01 17:46:57.000000000 -0500
@@ -121,12 +121,19 @@
static Atom XA_KWM_WIN_MAXIMIZED;
@@ -15884,8 +17416,8 @@
awt_wmgr = OPENLOOK_WM;
}
else {
---- jdk/src/solaris/native/sun/awt/awt_wm.h 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/awt_wm.h 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/awt_wm.h 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/awt_wm.h 2011-02-01 17:46:57.000000000 -0500
@@ -45,7 +45,10 @@
KDE2_WM,
SAWFISH_WM,
@@ -15898,8 +17430,8 @@
};
extern void awt_wm_init(void);
---- jdk/src/solaris/native/sun/awt/extutil.h 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/extutil.h 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/extutil.h 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/extutil.h 2011-02-01 17:46:57.000000000 -0500
@@ -58,7 +58,7 @@
*/
/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */
@@ -15915,8 +17447,8 @@
-#endif /* __linux__ */
+#endif /* __linux__ || _ALLBSD_SOURCE */
---- jdk/src/solaris/native/sun/awt/fontpath.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/fontpath.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/fontpath.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/fontpath.c 2011-02-01 17:46:57.000000000 -0500
@@ -23,7 +23,7 @@
* questions.
*/
@@ -16074,8 +17606,8 @@
if (libfontconfig == NULL) {
return NULL;
}
---- jdk/src/solaris/native/sun/awt/gtk2_interface.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/gtk2_interface.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/gtk2_interface.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/gtk2_interface.c 2011-02-01 17:46:57.000000000 -0500
@@ -30,8 +30,9 @@
#include <string.h>
#include "gtk2_interface.h"
@@ -16087,8 +17619,8 @@
#define G_TYPE_INVALID G_TYPE_MAKE_FUNDAMENTAL (0)
#define G_TYPE_NONE G_TYPE_MAKE_FUNDAMENTAL (1)
---- jdk/src/solaris/native/sun/awt/list.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/list.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/list.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/list.c 2011-02-01 17:46:57.000000000 -0500
@@ -66,7 +66,11 @@
----------------------------------------------------------------------- **/
@@ -16101,8 +17633,8 @@
#include "list.h"
---- jdk/src/solaris/native/sun/awt/robot_common.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/awt/robot_common.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/awt/robot_common.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/awt/robot_common.c 2011-02-01 17:46:57.000000000 -0500
@@ -27,6 +27,9 @@
#error This file should not be included in headless library
#endif
@@ -16113,8 +17645,8 @@
#include "robot_common.h"
/*
---- jdk/src/solaris/native/sun/font/X11FontScaler.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/font/X11FontScaler.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/font/X11FontScaler.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/font/X11FontScaler.c 2011-02-01 17:46:57.000000000 -0500
@@ -32,7 +32,11 @@
* into X11FontScaler_md.c, which is compiled into another library.
*/
@@ -16127,8 +17659,8 @@
#include <ctype.h>
#include <sys/utsname.h>
---- jdk/src/solaris/native/sun/font/X11TextRenderer.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/font/X11TextRenderer.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/font/X11TextRenderer.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/font/X11TextRenderer.c 2011-02-01 17:46:57.000000000 -0500
@@ -39,7 +39,11 @@
#include "GraphicsPrimitiveMgr.h"
#include "glyphblitting.h"
@@ -16141,8 +17673,8 @@
JNIEXPORT void JNICALL AWTDrawGlyphList
---- jdk/src/solaris/native/sun/java2d/j2d_md.h 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/java2d/j2d_md.h 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2011-02-01 17:46:57.000000000 -0500
@@ -28,11 +28,11 @@
#include <sys/types.h>
@@ -16158,8 +17690,8 @@
typedef unsigned char jubyte;
typedef unsigned short jushort;
---- jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/java2d/loops/mlib_ImageZoom_NN.c 2011-02-01 17:46:57.000000000 -0500
@@ -66,6 +66,10 @@
* MLIB_EDGE_SRC_PADDED
*/
@@ -16265,8 +17797,8 @@
LOGIC(da[0], dtmp, dtmp1, |);
}
else { /* aligned */
---- jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2011-02-01 17:46:57.000000000 -0500
@@ -794,7 +794,7 @@
static int initialized;
static int usevis = JNI_TRUE;
@@ -16276,8 +17808,8 @@
# define ULTRA_CHIP "sparc64"
#else
# define ULTRA_CHIP "sun4u"
---- jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/java2d/opengl/OGLFuncs_md.h 2011-02-01 17:46:57.000000000 -0500
@@ -27,7 +27,10 @@
#define OGLFuncs_md_h_Included
@@ -16298,8 +17830,8 @@
} \
OGL_LIB_HANDLE = dlopen(libGLPath, RTLD_LAZY | RTLD_LOCAL); \
} \
---- jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c 2011-02-01 17:46:57.000000000 -0500
@@ -32,6 +32,7 @@
#include "gdefs.h"
@@ -16317,8 +17849,8 @@
}
dgaAvailable = JNI_FALSE;
if (lib != NULL) {
---- jdk/src/solaris/native/sun/jdga/dgalock.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/jdga/dgalock.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/jdga/dgalock.c 2011-01-20 18:54:42.000000000 -0500
++++ jdk/src/solaris/native/sun/jdga/dgalock.c 2011-02-01 17:46:57.000000000 -0500
@@ -44,6 +44,7 @@
#include <X11/Xlib.h>
@@ -16341,8 +17873,8 @@
void *sym = dlsym(handle, "IsXineramaOn");
IsXineramaOn = (IsXineramaOnFunc *)sym;
if (IsXineramaOn != 0 && (*IsXineramaOn)(display)) {
---- jdk/src/solaris/native/sun/management/FileSystemImpl.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/management/FileSystemImpl.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/management/FileSystemImpl.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/management/FileSystemImpl.c 2011-02-01 17:46:57.000000000 -0500
@@ -26,6 +26,10 @@
#include <sys/types.h>
#include <sys/stat.h>
@@ -16354,8 +17886,8 @@
#include "jni.h"
#include "jni_util.h"
#include "sun_management_FileSystemImpl.h"
---- jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/net/dns/ResolverConfigurationImpl.c 2011-02-01 17:46:57.000000000 -0500
@@ -33,7 +33,7 @@
#include <strings.h>
#endif
@@ -16365,8 +17897,8 @@
#include <string.h>
#endif
---- jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c 2011-02-01 17:46:57.000000000 -0500
@@ -26,11 +26,12 @@
#include "jni.h"
#include "jni_util.h"
@@ -16393,8 +17925,8 @@
gconf_ver = 2;
}
if (gconf_ver > 0) {
---- jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2011-02-01 17:46:57.000000000 -0500
@@ -35,7 +35,7 @@
#include <string.h>
#include <errno.h>
@@ -16444,8 +17976,8 @@
}
#endif
---- jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2011-02-01 17:46:57.000000000 -0500
@@ -72,7 +72,7 @@
m.msg_accrightslen = 0;
#endif
@@ -16464,8 +17996,8 @@
m.msg_control = NULL;
m.msg_controllen = 0;
#endif
---- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2011-02-01 17:46:57.000000000 -0500
@@ -26,15 +26,21 @@
#include "jni.h"
#include "jni_util.h"
@@ -16607,8 +18139,8 @@
if (lockResult < 0) {
JNU_ThrowIOExceptionWithLastError(env, "Release failed");
}
---- jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/nio/ch/FileDispatcher.c 2011-02-01 17:46:57.000000000 -0500
@@ -32,8 +32,12 @@
#include <sys/socket.h>
#include <fcntl.h>
@@ -16622,8 +18154,8 @@
static int preCloseFD = -1; /* File descriptor to which we dup other fd's
before closing them for real */
---- jdk/src/solaris/native/sun/nio/ch/FileKey.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/nio/ch/FileKey.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/nio/ch/FileKey.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/nio/ch/FileKey.c 2011-02-01 17:46:57.000000000 -0500
@@ -30,6 +30,10 @@
#include "nio_util.h"
#include "sun_nio_ch_FileKey.h"
@@ -16635,8 +18167,197 @@
static jfieldID key_st_dev; /* id for FileKey.st_dev */
static jfieldID key_st_ino; /* id for FileKey.st_ino */
---- jdk/src/solaris/native/sun/nio/ch/Net.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/nio/ch/Net.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c 1969-12-31 19:00:00.000000000 -0500
++++ jdk/src/solaris/native/sun/nio/ch/KqueueArrayWrapper.c 2011-02-01 17:46:57.000000000 -0500
+@@ -0,0 +1,186 @@
++/*
++ * Scratched by davidxu@freebsd.org
++ */
++
++#include "jni.h"
++#include "jni_util.h"
++#include "jvm.h"
++#include "jlong.h"
++
++#include "sun_nio_ch_KqueueArrayWrapper.h"
++
++#include <errno.h>
++#include <sys/types.h>
++#include <sys/event.h>
++#include <sys/time.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++static int
++restartable_kevent(int kqfd, struct kevent *changelist, int nchanges,
++ struct kevent *eventlist, int nevents);
++
++static int
++timeout_kevent(int kqfd, struct kevent *changelist, int nchanges,
++ struct kevent *eventlist, int nevents, int timo);
++
++JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_kqueue
++ (JNIEnv *env, jclass cls)
++{
++ int kqfd = kqueue();
++ if (kqfd < 0) {
++ JNU_ThrowIOExceptionWithLastError(env, "Error creating kqueue");
++ return -1;
++ }
++ return kqfd;
++}
++
++JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_register
++ (JNIEnv *env, jclass cls, jint kqfd, jint fd, jshort filter)
++{
++ struct kevent ev;
++ struct timespec ts;
++
++ ev.ident = fd;
++ ev.filter = filter;
++ ev.flags = EV_ADD;
++ ev.fflags = 0;
++ ev.data = 0;
++ ev.udata = NULL;
++ ts.tv_sec = 0;
++ ts.tv_nsec = 0;
++ if (kevent(kqfd, &ev, 1, NULL, 0, &ts) < 0) {
++ JNU_ThrowIOExceptionWithLastError(env, "Error register kqueue event");
++ }
++}
++
++JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_kevent
++ (JNIEnv *env, jclass cls, jint kqfd, jlong changelist_addr, jint nchanges,
++ jlong eventlist_addr, jint nevents, jlong timeout)
++{
++ struct kevent *changelist = (struct kevent *)jlong_to_ptr(changelist_addr);
++ struct kevent *eventlist = (struct kevent *)jlong_to_ptr(eventlist_addr);
++ int result;
++
++ if (timeout < 0) {
++ result = restartable_kevent(kqfd, changelist, nchanges,
++ eventlist, nevents);
++ } else {
++ result = timeout_kevent(kqfd, changelist, nchanges, eventlist,
++ nevents, timeout);
++ }
++
++ if (result < 0) {
++ JNU_ThrowIOExceptionWithLastError(env, "Error polling kevent");
++ return -1;
++ }
++ return result;
++}
++
++static int
++restartable_kevent(int kqfd, struct kevent *changelist, int nchanges,
++ struct kevent *eventlist, int nevents)
++{
++ int result;
++
++ for (;;) {
++ result = kevent(kqfd, changelist, nchanges, eventlist,
++ nevents, NULL);
++ if (result == -1 && errno == EINTR) {
++ continue;
++ } else {
++ return result;
++ }
++ }
++}
++
++static int
++timeout_kevent(int kqfd, struct kevent *changelist, int nchanges,
++ struct kevent *eventlist, int nevents, int timo)
++{
++ struct timeval timeout, now, end;
++ int result;
++
++ timeout.tv_sec = timo / 1000;
++ timeout.tv_usec = (timo % 1000) * 1000;
++ gettimeofday(&now, NULL);
++ timeradd(&now, &timeout, &end);
++
++ for (;;) {
++ struct timespec ts;
++
++ ts.tv_sec = timeout.tv_sec;
++ ts.tv_nsec = timeout.tv_usec * 1000;
++ result = kevent(kqfd, changelist, nchanges, eventlist, nevents,
++ &ts);
++ if (result == -1 && (errno == EINTR)) {
++ gettimeofday(&now, NULL);
++ if (timercmp(&now, &end, >=))
++ return 0;
++ timersub(&end, &now, &timeout);
++ } else {
++ return result;
++ }
++ }
++}
++
++JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_keventSize
++ (JNIEnv *env, jclass cls)
++{
++ return sizeof(struct kevent);
++}
++
++JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_interrupt
++ (JNIEnv *env, jclass cls, jint fd)
++{
++ int fakebuf[1];
++
++ fakebuf[0] = 1;
++ if (write(fd, fakebuf, 1) < 0) {
++ JNU_ThrowIOExceptionWithLastError(env,
++ "Write to interrupt fd failed");
++ }
++}
++
++JNIEXPORT void JNICALL Java_sun_nio_ch_KqueueArrayWrapper_putKevent
++ (JNIEnv *env, jclass cls, jlong address, jint index, jint fd, jshort flags, jshort filter)
++{
++ struct kevent *ev = (struct kevent *)jlong_to_ptr(address);
++
++ ev[index].ident = fd;
++ ev[index].flags = flags;
++ ev[index].filter = filter;
++ ev[index].fflags = 0;
++ ev[index].data = 0;
++ ev[index].udata = NULL;
++}
++
++JNIEXPORT jshort JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventFilter
++ (JNIEnv *env, jclass cls, jlong address, jint index)
++{
++ struct kevent *ev = (struct kevent *)jlong_to_ptr(address);
++
++ return ev[index].filter;
++}
++
++JNIEXPORT jshort JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventFlags
++ (JNIEnv *env, jclass cls, jlong address, jint index)
++{
++ struct kevent *ev = (struct kevent *)jlong_to_ptr(address);
++
++ return ev[index].flags;
++}
++
++JNIEXPORT jint JNICALL Java_sun_nio_ch_KqueueArrayWrapper_getKeventIdent
++ (JNIEnv *env, jclass cls, jlong address, jint index)
++{
++ struct kevent *ev = (struct kevent *)jlong_to_ptr(address);
++
++ return (int)ev[index].ident;
++}
++
++#ifdef __cplusplus
++}
++#endif
+--- jdk/src/solaris/native/sun/nio/ch/Net.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/nio/ch/Net.c 2011-02-01 17:46:57.000000000 -0500
@@ -140,8 +140,31 @@
SOCKADDR sa;
int sa_len = SOCKADDR_LEN;
@@ -16778,8 +18499,8 @@
case ECONNREFUSED:
xn = JNU_JAVANETPKG "ConnectException";
break;
---- jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c 2011-02-01 17:46:57.000000000 -0500
@@ -26,7 +26,9 @@
#include <stdio.h>
#include <stdlib.h>
@@ -16790,8 +18511,8 @@
#include "NativeFunc.h"
/* standard GSS method names (ordering is from mapfile) */
---- jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2011-02-01 17:46:57.000000000 -0500
@@ -28,12 +28,19 @@
#include <string.h>
@@ -16834,8 +18555,8 @@
(*env)->ReleaseStringUTFChars(env, jLibName, libName);
dprintf2("-handle: %u (0X%X)\n", hModule, hModule);
---- jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/security/pkcs11/wrapper/p11_md.c 2011-02-01 17:46:57.000000000 -0500
@@ -64,7 +64,9 @@
#include <assert.h>
@@ -16846,8 +18567,8 @@
#include <jni.h>
---- jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2010-06-21 14:15:45.000000000 -0700
-+++ jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c 2011-02-01 17:46:57.000000000 -0500
@@ -29,7 +29,9 @@
#include <assert.h>
@@ -16858,8 +18579,8 @@
#include <winscard.h>
---- jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2010-06-27 11:37:43.000000000 -0700
-+++ jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2011-02-01 17:20:23.000000000 -0500
++++ jdk/src/solaris/native/sun/tools/attach/BsdVirtualMachine.c 2011-02-01 17:46:57.000000000 -0500
@@ -35,10 +35,10 @@
#include <dirent.h>
#include <ctype.h>
@@ -17164,8 +18885,8 @@
+ JNU_ReleaseStringPlatformChars(env, path, _path);
+ }
+}
---- jdk/src/solaris/native/sun/xawt/XWindow.c 2010-06-21 14:15:46.000000000 -0700
-+++ jdk/src/solaris/native/sun/xawt/XWindow.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/xawt/XWindow.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/xawt/XWindow.c 2011-02-01 17:46:57.000000000 -0500
@@ -228,10 +228,10 @@
{java_awt_event_KeyEvent_VK_DOWN, XK_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD},
@@ -17190,8 +18911,8 @@
/* The following code on Linux will cause the keypad keys
* not to echo on JTextField when the NumLock is on. The
* keysyms will be 0, because the last parameter 2 is not defined.
---- jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2010-06-21 14:15:46.000000000 -0700
-+++ jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/native/sun/xawt/awt_Desktop.c 2011-02-01 17:46:57.000000000 -0500
@@ -24,6 +24,7 @@
*/
@@ -17218,8 +18939,8 @@
if (gnome_handle == NULL) {
#ifdef INTERNAL_BUILD
fprintf(stderr, "can not load libgnome-2.so\n");
---- jdk/src/solaris/npt/npt_md.h 2010-06-21 14:15:46.000000000 -0700
-+++ jdk/src/solaris/npt/npt_md.h 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/npt/npt_md.h 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/npt/npt_md.h 2011-02-01 17:46:57.000000000 -0500
@@ -32,9 +32,10 @@
#include <string.h>
#include <errno.h>
@@ -17242,8 +18963,8 @@
if ( _handle == NULL ) NPT_ERROR("Cannot open library"); \
_sym = dlsym(_handle, "nptInitialize"); \
if ( _sym == NULL ) NPT_ERROR("Cannot find nptInitialize"); \
---- jdk/src/solaris/transport/socket/socket_md.c 2010-06-21 14:15:46.000000000 -0700
-+++ jdk/src/solaris/transport/socket/socket_md.c 2010-06-20 21:56:28.000000000 -0700
+--- jdk/src/solaris/transport/socket/socket_md.c 2011-01-20 18:54:43.000000000 -0500
++++ jdk/src/solaris/transport/socket/socket_md.c 2011-02-01 17:46:57.000000000 -0500
@@ -36,7 +36,7 @@
#ifdef __solaris__
#include <thread.h>
@@ -17262,8 +18983,8 @@
int
dbgsysTlsAlloc() {
pthread_key_t key;
---- langtools/src/share/classes/com/sun/tools/javah/Util.java 2010-06-21 14:16:21.000000000 -0700
-+++ langtools/src/share/classes/com/sun/tools/javah/Util.java 2010-06-20 21:56:28.000000000 -0700
+--- langtools/src/share/classes/com/sun/tools/javah/Util.java 2011-01-20 18:55:18.000000000 -0500
++++ langtools/src/share/classes/com/sun/tools/javah/Util.java 2011-02-01 17:46:57.000000000 -0500
@@ -180,6 +180,14 @@
os = "win32";
} else if (os.indexOf("Linux") >= 0) {
diff --git a/java/openjdk6/files/plugin.patch b/java/openjdk6/files/plugin.patch
index 636478e46df0..64d8816bc9b9 100644
--- a/java/openjdk6/files/plugin.patch
+++ b/java/openjdk6/files/plugin.patch
@@ -1,6 +1,6 @@
$FreeBSD$
-Applied patches from IcedTea6-1.9.2:
+Applied patches from IcedTea6-1.9.4 and updated for IcedTea-Web 1.0:
patches/hotspot/original/update-bootclasspath.patch
patches/icedtea-demo-swingapplet.patch
@@ -11,17 +11,17 @@ patches/extensions/liveconnect.patch
Note: patches/hotspot/original/update-bootclasspath.patch was applied without
rhino support.
---- hotspot/src/share/vm/runtime/os.cpp.orig 2010-06-21 17:12:21.000000000 -0400
-+++ hotspot/src/share/vm/runtime/os.cpp 2010-09-09 16:24:52.000000000 -0400
-@@ -884,6 +884,8 @@
+--- hotspot/src/share/vm/runtime/os.cpp.orig 2011-01-20 18:51:22.000000000 -0500
++++ hotspot/src/share/vm/runtime/os.cpp 2011-01-25 15:56:17.000000000 -0500
+@@ -1032,6 +1032,8 @@
"%/lib/jsse.jar:"
"%/lib/jce.jar:"
"%/lib/charsets.jar:"
-+ "%/lib/netx.jar:"
-+ "%/lib/plugin.jar:"
- "%/classes";
- char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep);
- if (sysclasspath == NULL) return false;
++ "%/lib/netx.jar:"
++ "%/lib/plugin.jar:"
+
+ // ## TEMPORARY hack to keep the legacy launcher working when
+ // ## only the boot module is installed (cf. j.l.ClassLoader)
--- jdk/make/docs/NON_CORE_PKGS.gmk.orig 2010-06-21 17:15:08.000000000 -0400
+++ jdk/make/docs/NON_CORE_PKGS.gmk 2010-09-09 16:26:01.000000000 -0400
@@ -84,6 +84,10 @@
@@ -43,9 +43,16 @@ Note: patches/hotspot/original/update-bootclasspath.patch was applied without
+ $(SMARTCARDIO_PKGS) \
+ $(JNLP_PKGS) \
+ $(JAVASCRIPT_PKGS)
---- jdk/make/launchers/Makefile.orig 2010-06-21 17:15:08.000000000 -0400
-+++ jdk/make/launchers/Makefile 2010-09-09 16:25:05.000000000 -0400
-@@ -67,6 +67,7 @@
+--- jdk/make/launchers/Makefile.orig 2011-01-20 18:54:05.000000000 -0500
++++ jdk/make/launchers/Makefile 2011-02-09 12:58:47.000000000 -0500
+@@ -61,12 +61,14 @@
+ $(call make-launcher, apt, com.sun.tools.apt.Main, , )
+ $(call make-launcher, extcheck, com.sun.tools.extcheck.Main, , )
+ $(call make-launcher, idlj, com.sun.tools.corba.se.idl.toJavaPortable.Compile, , )
++$(call make-launcher, itweb-settings, net.sourceforge.jnlp.controlpanel.ControlPanel, , )
+ $(call make-launcher, jar, sun.tools.jar.Main, , )
+ $(call make-launcher, jarsigner, sun.security.tools.JarSigner, , )
+ $(call make-launcher, javac, com.sun.tools.javac.Main, , )
$(call make-launcher, javadoc, com.sun.tools.javadoc.Main, , )
$(call make-launcher, javah, com.sun.tools.javah.Main, , )
$(call make-launcher, javap, sun.tools.javap.Main, , )