changeset in /hg/icedtea6: 2009-02-18 Lillian Angel <langel at re...
Lillian Angel
langel at redhat.com
Wed Feb 18 11:12:14 PST 2009
changeset a2763653f8cf in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a2763653f8cf
description:
2009-02-18 Lillian Angel <langel at redhat.com>
Tomas Hurka <tomas.hurka at sun.com>
* INSTALL: Updated requirements.
* Makefile.am: Added building support for VisualVM with NetBeans 6.5.
* acinclude.m4: Added check for NetBeans.
* configure.ac: Added --enable-visualvm option.
* visualvm.desktop: New file.
diffstat:
6 files changed, 231 insertions(+), 5 deletions(-)
ChangeLog | 9 +++
INSTALL | 3 +
Makefile.am | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
acinclude.m4 | 25 ++++++++
configure.ac | 31 ++++++++++
visualvm.desktop | 9 +++
diffs (399 lines):
diff -r 0a28d5bcf18e -r a2763653f8cf ChangeLog
--- a/ChangeLog Tue Feb 17 15:55:13 2009 +0000
+++ b/ChangeLog Wed Feb 18 14:12:09 2009 -0500
@@ -1,3 +1,12 @@ 2009-02-17 Gary Benson <gbenson at redhat
+2009-02-18 Lillian Angel <langel at redhat.com>
+ Tomas Hurka <tomas.hurka at sun.com>
+
+ * INSTALL: Updated requirements.
+ * Makefile.am: Added building support for VisualVM with NetBeans 6.5.
+ * acinclude.m4: Added check for NetBeans.
+ * configure.ac: Added --enable-visualvm option.
+ * visualvm.desktop: New file.
+
2009-02-17 Gary Benson <gbenson at redhat.com>
* ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: Updated copyright year.
diff -r 0a28d5bcf18e -r a2763653f8cf INSTALL
--- a/INSTALL Tue Feb 17 15:55:13 2009 +0000
+++ b/INSTALL Wed Feb 18 14:12:09 2009 -0500
@@ -34,6 +34,9 @@ For building the PulseAudio based mixer,
For building the PulseAudio based mixer, you will need
pulseaudio-libs-devel >= 0.9.11
pulseaudio >= 0.9.11
+
+For building VisualVM, you will need
+netbeans = 6.5
For building the zero-assembler port (see below), you will need libffi.
diff -r 0a28d5bcf18e -r a2763653f8cf Makefile.am
--- a/Makefile.am Tue Feb 17 15:55:13 2009 +0000
+++ b/Makefile.am Wed Feb 18 14:12:09 2009 -0500
@@ -4,6 +4,9 @@ OPENJDK_VERSION = b14
CACAO_VERSION = 0.99.3
CACAO_MD5SUM = 80de3ad344c1a20c086ec5f1390bd1b8
+
+NETBEANS_PROFILER_MD5SUM = 35f9dc474dfc19ed3713f362139b099a
+VISUALVM_MD5SUM = 1174486e82a65840b44c47166d79f212
if ENABLE_GCJWEBPLUGIN
GCJWEBPLUGIN_CLEAN = clean-gcjwebplugin
@@ -48,7 +51,7 @@ endif
all-local: icedtea-against-icedtea
-distclean-local: clean-copy clean-jtreg clean-jtreg-reports clean-pulse-java
+distclean-local: clean-copy clean-jtreg clean-jtreg-reports clean-pulse-java
rm -rf stamps
rm -f rt-source-files.txt \
hotspot-tools-source-files.txt \
@@ -60,6 +63,8 @@ distclean-local: clean-copy clean-jtreg
rm -rf openjdk
rm -rf hotspot-tools
rm -rf rt/netscape
+ rm -rf visualvm
+ rm -rf netbeans
if ENABLE_PLUGIN
rm -f IcedTeaPlugin.o IcedTeaPlugin.so
else
@@ -78,7 +83,7 @@ install:
clean-bootstrap-directory-symlink clean-bootstrap-directory-ecj \
clean-bootstrap-directory-symlink-ecj icedtea icedtea-debug \
clean-icedtea icedtea-against-icedtea clean-icedtea-ecj clean-plugs \
- clean-tools-jar clean-shared-objects \
+ clean-tools-jar clean-shared-objects clean-visualvm clean-nbplatform \
clean-copy clean-hotspot-tools clean-rt $(GCJWEBPLUGIN_CLEAN) \
$(ICEDTEAPLUGIN_CLEAN) hotspot hotspot-helper clean-extra \
clean-jtreg clean-jtreg-reports
@@ -87,7 +92,7 @@ EXTRA_DIST = rt generated \
patches/* \
gcjwebplugin.cc tools-copy contrib ports \
extra overlays \
- javaws.png javaws.desktop \
+ javaws.png javaws.desktop visualvm.desktop \
jconsole.desktop policytool.desktop \
test/jtreg \
IcedTeaPlugin.cc \
@@ -304,6 +309,14 @@ else
CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz
endif
+# VisualVM sources. Alternatives cannot be used here.
+NETBEANS_PROFILER_URL = http://icedtea.classpath.org/visualvm/
+NETBEANS_PROFILER_SRC_ZIP = netbeans-profiler-visualvm_release65_mod.tar.gz
+
+VISUALVM_URL = https://visualvm.dev.java.net/files/documents/7163/127067/
+VISUALVM_SRC_ZIP = visualvm-11-src.tar.gz
+
+
stamps/hgforest.stamp:
if OPENJDK_SRC_DIR_FOUND
else
@@ -381,6 +394,29 @@ endif
endif
endif
endif
+if WITH_VISUALVM
+ if ! echo "$(NETBEANS_PROFILER_MD5SUM) $(NETBEANS_PROFILER_SRC_ZIP)" \
+ | $(MD5SUM) --check ; \
+ then \
+ if [ $(NETBEANS_PROFILER_SRC_ZIP) ] ; \
+ then \
+ mv $(NETBEANS_PROFILER_SRC_ZIP) $(NETBEANS_PROFILER_SRC_ZIP).old ; \
+ fi ; \
+ $(WGET) $(NETBEANS_PROFILER_URL)$(NETBEANS_PROFILER_SRC_ZIP) \
+ -O $(NETBEANS_PROFILER_SRC_ZIP) ; \
+ fi
+
+ if ! echo "$(VISUALVM_MD5SUM) $(VISUALVM_SRC_ZIP)" \
+ | $(MD5SUM) --check ; \
+ then \
+ if [ $(VISUALVM_SRC_ZIP) ] ; \
+ then \
+ mv $(VISUALVM_SRC_ZIP) $(VISUALVM_SRC_ZIP).old ; \
+ fi ; \
+ $(WGET) $(VISUALVM_URL)$(VISUALVM_SRC_ZIP) \
+ -O $(VISUALVM_SRC_ZIP) ; \
+ fi
+endif
mkdir -p stamps
touch stamps/download.stamp
@@ -392,6 +428,10 @@ clean-download:
rm -f $(OPENJDK_SRC_ZIP)
if WITH_CACAO
rm -f $(CACAO_SRC_ZIP)
+endif
+if WITH_VISUALVM
+ rm -f $(VISUALVM_SRC_ZIP)
+ rm -f $(NETBEANS_PROFILER_SRC_ZIP)
endif
# Link ports sources into tree
@@ -659,6 +699,18 @@ if !USE_SYSTEM_CACAO
fi
endif
endif
+if WITH_VISUALVM
+ if ! test -d netbeans ; \
+ then \
+ mkdir netbeans ; \
+ $(TAR) xf $(NETBEANS_PROFILER_SRC_ZIP) -C netbeans ; \
+ fi
+
+ if ! test -d visualvm ; \
+ then \
+ $(TAR) xf $(VISUALVM_SRC_ZIP) ; \
+ fi
+endif
if [ ! -e $(abs_top_builddir)/generated ]; then \
cp -a $(abs_top_srcdir)/generated $(abs_top_builddir); \
find $(abs_top_builddir)/generated -type f -exec chmod 640 '{}' ';' \
@@ -1028,7 +1080,7 @@ stamps/icedtea.stamp: stamps/bootstrap-d
stamps/hotspot-tools.stamp stamps/plugs.stamp \
stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \
$(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) \
- extra-lib/about.jar stamps/cacao.stamp \
+ extra-lib/about.jar stamps/cacao.stamp stamps/visualvm.stamp \
stamps/pulse-java.stamp
$(ARCH_PREFIX) $(MAKE) \
$(ICEDTEA_ENV) \
@@ -1057,6 +1109,26 @@ if ENABLE_PULSE_JAVA
cp -pPRf pulse-java.jar \
$(BUILD_OUTPUT_DIR)/j2re-image/lib/ext
endif
+if WITH_VISUALVM
+ mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \
+ mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \
+ sed "s/APPNAME=\`basename.*\`/APPNAME=visualvm/" \
+ visualvm/launcher/visualvm >> \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \
+ chmod a+x $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \
+ cp visualvm/launcher/visualvm.conf \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \
+ echo visualvm >> \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \
+ echo profiler3 >> \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \
+ cp -r visualvm/build/cluster/* \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \
+ cp -r netbeans/nbbuild/netbeans_visualvm/platform9 \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm ; \
+ cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm
+endif
cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/about.jnlp \
extra-lib/about.jar \
$(BUILD_OUTPUT_DIR)/j2re-image/lib ; \
@@ -1071,7 +1143,7 @@ stamps/icedtea-debug.stamp: stamps/boots
stamps/hotspot-tools.stamp stamps/plugs.stamp \
stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \
$(GCJWEBPLUGIN_TARGET) $(ICEDTEAPLUGIN_TARGET) \
- extra-lib/about.jar stamps/cacao.stamp \
+ extra-lib/about.jar stamps/cacao.stamp stamps/visualvm.stamp \
stamps/pulse-java.stamp
$(ARCH_PREFIX) $(MAKE) \
$(ICEDTEA_ENV) \
@@ -1099,6 +1171,26 @@ if ENABLE_PULSE_JAVA
$(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib/ext
cp -pPRf pulse-java.jar \
$(BUILD_OUTPUT_DIR)-debug/j2re-image/lib/ext
+endif
+if WITH_VISUALVM
+ mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \
+ mkdir -p $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \
+ sed "s/APPNAME=\`basename.*\`/APPNAME=visualvm/" \
+ visualvm/launcher/visualvm >> \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \
+ chmod a+x $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/jvisualvm ; \
+ cp visualvm/launcher/visualvm.conf \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc ; \
+ echo visualvm >> \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \
+ echo profiler3 >> \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/etc/visualvm.clusters ; \
+ cp -r visualvm/build/cluster/* \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm/visualvm ; \
+ cp -r netbeans/nbbuild/netbeans_visualvm/platform9 \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm ; \
+ cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 \
+ $(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm
endif
cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/default.jnlp \
extra-lib/about.jar \
@@ -1666,6 +1758,59 @@ jtregcheck: jtreg check-hotspot check-la
check-local: jtregcheck
+# VisualVM
+
+stamps/visualvm.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/download.stamp \
+ stamps/extract.stamp stamps/nbplatform.stamp
+if WITH_VISUALVM
+ cd visualvm ; \
+ ln -s $(abs_top_srcdir)/netbeans/nbbuild/netbeans_visualvm netbeans ; \
+ JAVA_HOME=$(ICEDTEA_HOME) $(ANT) build
+endif
+ mkdir -p stamps
+ touch $@
+
+clean-visualvm:
+ rm -rf visualvm
+ rm -f stamps/visualvm.stamp
+
+stamps/nbplatform.stamp: $(BOOTSTRAP_DIRECTORY_STAMP) stamps/extract.stamp \
+ stamps/download.stamp
+if WITH_VISUALVM
+ mkdir netbeans ; \
+ cd netbeans ; \
+ rm nbbuild/external/binaries-list ; \
+ rm -r lib.profiler/release/lib/deployed ; \
+ mkdir -p lib.profiler/release/lib/deployed/jdk15/linux ; \
+ mkdir -p lib.profiler/release/lib/deployed/jdk16/linux ; \
+ mkdir -p ./nbbuild/netbeans_visualvm/ ; \
+ ln -s $(SYSTEM_NETBEANS_DIR)/platform9/ ./nbbuild/netbeans_visualvm/platform9 ; \
+ ln -s $(SYSTEM_NETBEANS_DIR)/apisupport1/ ./nbbuild/netbeans_visualvm/apisupport1 ; \
+ ln -s $(SYSTEM_NETBEANS_DIR)/harness/ ./nbbuild/netbeans_visualvm/harness ; \
+ cd lib.profiler/native/build ; \
+ if ! (uname -a | grep x86_64) ; then \
+ buildscript=./buildnative-linux-15.sh ; \
+ else \
+ buildscript=./buildnative-linux64-15.sh ; \
+ fi ; \
+ JAVA_HOME_15=$(ICEDTEA_HOME) JAVA_HOME_16=$(ICEDTEA_HOME) \
+ $$buildscript ; \
+ cd ../../.. ; \
+ JAVA_HOME=$(ICEDTEA_HOME) $(ANT) -Dpermit.jdk6.builds=true \
+ -f nbbuild/build.xml bootstrap ; \
+ for dir in lib.profiler lib.profiler.ui lib.profiler.common profiler ; do \
+ JAVA_HOME=$(ICEDTEA_HOME) $(ANT) -Dpermit.jdk6.builds=true -Dbuildnumber=081204 \
+ -Dnetbeans.dest.dir=../nbbuild/netbeans_visualvm \
+ -f $$dir/build.xml ; \
+ done
+endif
+ mkdir -p stamps
+ touch $@
+
+clean-nbplatform:
+ rm -rf netbeans
+ rm -f stamps/nbplatform.stamp
+
# fsg-tarball
# Creates archive of openjdk that is compliant with Free Software guidelines.
@@ -1685,6 +1830,10 @@ bootstrap-directory-symlink: stamps/boot
cacao: stamps/cacao.stamp
+visualvm: stamps/visualvm.stamp
+
+nbplatform: stamps/nbplatform.stamp
+
copy-source-files: stamps/copy-source-files.stamp
download: stamps/download.stamp
diff -r 0a28d5bcf18e -r a2763653f8cf acinclude.m4
--- a/acinclude.m4 Tue Feb 17 15:55:13 2009 +0000
+++ b/acinclude.m4 Wed Feb 18 14:12:09 2009 -0500
@@ -557,6 +557,31 @@ AC_DEFUN([FIND_XERCES2_JAR],
AC_SUBST(XERCES2_JAR)
])
+AC_DEFUN([FIND_NETBEANS],
+[
+ AC_ARG_WITH([netbeans],
+ [AS_HELP_STRING(--with-netbeans,specify location of netbeans)],
+ [
+ if test -f "${withval}"; then
+ AC_MSG_CHECKING(netbeans)
+ NETBEANS="${withval}"
+ AC_MSG_RESULT(${withval})
+ else
+ AC_PATH_PROG(NETBEANS, "${withval}")
+ fi
+ ],
+ [
+ NETBEANS=
+ ])
+ if test -z "${NETBEANS}"; then
+ AC_PATH_PROG(NETBEANS, "netbeans")
+ fi
+ if test -z "${NETBEANS}"; then
+ AC_MSG_ERROR("NetBeans was not found.")
+ fi
+ AC_SUBST(NETBEANS)
+])
+
AC_DEFUN([FIND_RHINO_JAR],
[
AC_MSG_CHECKING(whether to include Javascript support via Rhino)
diff -r 0a28d5bcf18e -r a2763653f8cf configure.ac
--- a/configure.ac Tue Feb 17 15:55:13 2009 +0000
+++ b/configure.ac Wed Feb 18 14:12:09 2009 -0500
@@ -55,6 +55,24 @@ AM_CONDITIONAL(WITH_ICEDTEA, test "${wit
AM_CONDITIONAL(WITH_ICEDTEA, test "${with_icedtea}" = true)
AC_MSG_RESULT(${with_icedtea})
+AC_MSG_CHECKING([for a NetBeans installation])
+AC_ARG_WITH([netbeans-home],
+ [AS_HELP_STRING([--with-netbeans-home],
+ [NetBeans home directory (default is /usr/share/netbeans)])],
+ [
+ if test "x${withval}" = x
+ then
+ SYSTEM_NETBEANS_DIR=/usr/share/netbeans
+ else
+ SYSTEM_NETBEANS_DIR=${withval}
+ fi
+ ],
+ [
+ SYSTEM_NETBEANS_DIR=/usr/share/netbeans
+ ])
+AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}])
+AC_SUBST(SYSTEM_NETBEANS_DIR)
+
AC_MSG_CHECKING([whether to build using an existing installation of OpenJDK])
AC_ARG_WITH([openjdk],
[AS_HELP_STRING([--with-openjdk],
@@ -90,6 +108,14 @@ AC_ARG_WITH([ant-home],
])
AC_SUBST(SYSTEM_ANT_DIR)
AC_MSG_RESULT(${SYSTEM_ANT_DIR})
+
+AC_MSG_CHECKING(whether to build VisualVM)
+AC_ARG_ENABLE([visualvm],
+ [AS_HELP_STRING([--enable-visualvm],
+ [Enable compilation of visualvm.])],
+ [enable_visualvm="${enableval}"], [enable_visualvm="no"])
+AM_CONDITIONAL(WITH_VISUALVM, test "x${enable_visualvm}" = "xyes")
+AC_MSG_RESULT(${enable_visualvm})
AC_MSG_CHECKING([whether to build the LiveConnect plugin])
AC_ARG_ENABLE([liveconnect],
@@ -239,6 +265,11 @@ ENABLE_HG
ENABLE_HG
AC_CHECK_WITH_HG_REVISION
+if test "x${enable_visualvm}" = "xyes"
+then
+ FIND_NETBEANS
+fi
+
if test "x${enable_pulse_java}" = "xyes"
then
FIND_PULSEAUDIO
diff -r 0a28d5bcf18e -r a2763653f8cf visualvm.desktop
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/visualvm.desktop Wed Feb 18 14:12:09 2009 -0500
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=OpenJDK VisualVM
+Comment=Integrates commandline JDK tools and profiling capabilites.
+Exec=/usr/bin/jvisualvm
+Icon=java
+Terminal=false
+Type=Application
+Categories=Development;Java;
+Version=1.0
More information about the distro-pkg-dev
mailing list