summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-08-15 11:44:28 +0000
committerRoy Marples <uberlord@gentoo.org>2006-08-15 11:44:28 +0000
commit2bf662759e0a61218e5cc88a944216d1adc02218 (patch)
tree8f1376e8d224bcbe1f37d7a3861cf988a3608781 /app-benchmarks
parentDEPEND=dev-libs/zziplib -> sys-libs/zlib. (diff)
downloadhistorical-2bf662759e0a61218e5cc88a944216d1adc02218.tar.gz
historical-2bf662759e0a61218e5cc88a944216d1adc02218.tar.bz2
historical-2bf662759e0a61218e5cc88a944216d1adc02218.zip
Initial import, #74425 thanks to Paul Pacheco.
Package-Manager: portage-2.1.1_pre5-r1
Diffstat (limited to 'app-benchmarks')
-rw-r--r--app-benchmarks/bootchart/ChangeLog11
-rw-r--r--app-benchmarks/bootchart/Manifest28
-rw-r--r--app-benchmarks/bootchart/bootchart-0.9.ebuild112
-rw-r--r--app-benchmarks/bootchart/files/bootchart7
-rw-r--r--app-benchmarks/bootchart/files/bootchart-0.9-gentoo.patch48
-rw-r--r--app-benchmarks/bootchart/files/digest-bootchart-0.93
-rw-r--r--app-benchmarks/bootchart/files/profiling-functions.sh86
-rw-r--r--app-benchmarks/bootchart/metadata.xml11
8 files changed, 306 insertions, 0 deletions
diff --git a/app-benchmarks/bootchart/ChangeLog b/app-benchmarks/bootchart/ChangeLog
new file mode 100644
index 000000000000..608bdda1f705
--- /dev/null
+++ b/app-benchmarks/bootchart/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for app-benchmarks/bootchart
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart/ChangeLog,v 1.1 2006/08/15 11:44:28 uberlord Exp $
+
+*bootchart-0.9 (15 Aug 2006)
+
+ 15 Aug 2006; Roy Marples <uberlord@gentoo.org>
+ +files/bootchart-0.9-gentoo.patch, +files/bootchart,
+ +files/profiling-functions.sh, +metadata.xml, +bootchart-0.9.ebuild:
+ Initial import, #74425 thanks to Paul Pacheco.
+
diff --git a/app-benchmarks/bootchart/Manifest b/app-benchmarks/bootchart/Manifest
new file mode 100644
index 000000000000..721ff313b908
--- /dev/null
+++ b/app-benchmarks/bootchart/Manifest
@@ -0,0 +1,28 @@
+AUX bootchart 158 RMD160 5729364e885d6f77ef67071edf24d23fc00ac9c0 SHA1 00c2bce14f62613e94ada34fc6df673a6457c748 SHA256 1e6dacfd95dc35808bce726a2a8517650095b4a6e7026d75de9a9eb3a2d7f898
+MD5 b42fd51c5154f39ba1bce1d374ca0746 files/bootchart 158
+RMD160 5729364e885d6f77ef67071edf24d23fc00ac9c0 files/bootchart 158
+SHA256 1e6dacfd95dc35808bce726a2a8517650095b4a6e7026d75de9a9eb3a2d7f898 files/bootchart 158
+AUX bootchart-0.9-gentoo.patch 1409 RMD160 521904d9bdc04be31236bc27496d1ca55420f576 SHA1 4f9e4d38a4f9e96a609d386111e33ff07913b3fe SHA256 f629a2607763dc9a0b0c9238814d58c9f4359bde6477dedb198652bbd814cd71
+MD5 7496720d35965dcd5e5652be438549db files/bootchart-0.9-gentoo.patch 1409
+RMD160 521904d9bdc04be31236bc27496d1ca55420f576 files/bootchart-0.9-gentoo.patch 1409
+SHA256 f629a2607763dc9a0b0c9238814d58c9f4359bde6477dedb198652bbd814cd71 files/bootchart-0.9-gentoo.patch 1409
+AUX profiling-functions.sh 1834 RMD160 d1b0b3c695b0f0aa8882af834d7703eb54cdfc15 SHA1 d81a72e9979a232a8d3bae81072575804f4ca39e SHA256 399f831b6fb0421c8e9f3f8fcbf2e240281145e6c061a84031a6f073a06dd7e8
+MD5 96fc74d7aba9aaa13f90092d129d219c files/profiling-functions.sh 1834
+RMD160 d1b0b3c695b0f0aa8882af834d7703eb54cdfc15 files/profiling-functions.sh 1834
+SHA256 399f831b6fb0421c8e9f3f8fcbf2e240281145e6c061a84031a6f073a06dd7e8 files/profiling-functions.sh 1834
+DIST bootchart-0.9.tar.bz2 222558 RMD160 c271bf634117c9bcd530055927abffead134b73a SHA1 3e74e4844e0616c5c6514f8152262638f36d72ac SHA256 7738399ecfcfb2242e9f99a316b13a5f59e89052de05074dbf705ccf4edc327d
+EBUILD bootchart-0.9.ebuild 2857 RMD160 7db729a36f9772efcf300d31d1679e7f1d0b9724 SHA1 fcb22f83c60a4730b29c603ca7f2d05eb18f55ef SHA256 2ef4cce784052f14ce7f374a2557689c41a12d6e40565144d9b9861be4d534f2
+MD5 970c7cfc6ee7fce41377a710b7705e9d bootchart-0.9.ebuild 2857
+RMD160 7db729a36f9772efcf300d31d1679e7f1d0b9724 bootchart-0.9.ebuild 2857
+SHA256 2ef4cce784052f14ce7f374a2557689c41a12d6e40565144d9b9861be4d534f2 bootchart-0.9.ebuild 2857
+MISC ChangeLog 478 RMD160 046decc461632ebc8baac5125804741dffe0cc74 SHA1 2d952ffcde92159fe129f6d20588e0a0b9a481cf SHA256 f27a13a3ba24be06ba5c8e35a9780353015ed55cae8aae84d1dcd4ed548854ee
+MD5 3a40d407b2b297faa08074dcdf5875e4 ChangeLog 478
+RMD160 046decc461632ebc8baac5125804741dffe0cc74 ChangeLog 478
+SHA256 f27a13a3ba24be06ba5c8e35a9780353015ed55cae8aae84d1dcd4ed548854ee ChangeLog 478
+MISC metadata.xml 365 RMD160 c06f3d4bff68a5e0f8ab2da3dc62c3d0cc570a20 SHA1 a123414bf441b960af386b5bc08bba88777011ae SHA256 0a477bd6a9085aca7e4538f81c3b9d7710cead2395d222f9903c898df57b3e63
+MD5 a20195e09a3313e5b377c3c4ecc29e26 metadata.xml 365
+RMD160 c06f3d4bff68a5e0f8ab2da3dc62c3d0cc570a20 metadata.xml 365
+SHA256 0a477bd6a9085aca7e4538f81c3b9d7710cead2395d222f9903c898df57b3e63 metadata.xml 365
+MD5 a8ebf0349681c519872e0a4a791aeace files/digest-bootchart-0.9 244
+RMD160 a0069073b8af5d6bf6fbe2872c6bfc6a15acfe48 files/digest-bootchart-0.9 244
+SHA256 f985390d16d75832f275f3b9a6a1ac7633589bad459e9ead7d056a3dbc965336 files/digest-bootchart-0.9 244
diff --git a/app-benchmarks/bootchart/bootchart-0.9.ebuild b/app-benchmarks/bootchart/bootchart-0.9.ebuild
new file mode 100644
index 000000000000..1a743ab26a7a
--- /dev/null
+++ b/app-benchmarks/bootchart/bootchart-0.9.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-benchmarks/bootchart/bootchart-0.9.ebuild,v 1.1 2006/08/15 11:44:28 uberlord Exp $
+
+inherit eutils java-pkg
+
+DESCRIPTION="Performance analysis and visualization of the system boot process"
+HOMEPAGE="http://www.bootchart.org"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+DEPEND="
+ java? (
+ >=virtual/jdk-1.3
+ >=dev-java/ant-1.4
+ jikes? ( dev-java/jikes )
+ dev-java/commons-cli
+ )
+"
+
+RDEPEND="
+ java? (
+ >=virtual/jdk-1.3
+ dev-java/commons-cli
+ )
+ acct? sys-process/acct
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="acct debug doc java jikes"
+KEYWORDS="~amd64 ~x86"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/${PN}-0.9-gentoo.patch"
+
+ # delete the included commons-cli and use gentoo's instead
+ rm -rf lib/org/apache/commons/cli lib/org/apache/commons/lang
+
+ if use java ; then
+ sed -i -e 's,AUTO_RENDER="no",AUTO_RENDER="yes",g' \
+ script/bootchartd.conf
+ fi
+
+ if use acct ; then
+ sed -i -e 's,PROCESS_ACCOUNTING="no",PROCESS_ACCOUNTING="yes",g' \
+ script/bootchartd.conf
+ fi
+}
+
+src_compile() {
+ if use java ; then
+ local antflags="jar "
+ use doc && antflags="${antflags} javadoc"
+
+ antflags="${antflags} -Dcompiler.nowarn=true"
+ use debug || antflags="${antflags} -Dbuild.debug=false"
+ use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
+ CLASSPATH=$(java-config -p commons-cli-1) ant ${antflags} \
+ || die "compile failed"
+ fi
+}
+
+src_install() {
+ dodoc README README.logger ChangeLog COPYING TODO
+
+ insinto /lib/rcscripts/addons
+ doins "${FILESDIR}/profiling-functions.sh"
+
+ into /
+ newsbin script/bootchartd bootchartd
+ into /usr
+
+ # This dir is normally empty, but is used to bind to the
+ # temporary dir bootchart normally makes. We do this so
+ # that our profiling script can write to a fixed location.
+ keepdir /lib/bootchart
+
+ insinto /etc
+ doins script/bootchartd.conf
+
+ if use java ; then
+ java-pkg_dojar "${PN}.jar"
+ use doc && java-pkg_dohtml -r build/docs/api
+ newbin "${FILESDIR}/bootchart" bootchart
+ fi
+}
+
+pkg_postinst() {
+ einfo "To generate the chart, set RC_USE_BOOTCHART=\"yes\""
+ einfo "in /etc/conf.d/rc and reboot"
+ einfo
+
+ if use java; then
+ einfo "The chart will be saved as /var/log/bootchart.png"
+ else
+ einfo "Post the file /var/log/bootchart.tgz here:"
+ einfo " http://www.bootchart.org/download.html"
+ einfo "to render the chart"
+ fi
+
+ einfo
+ einfo "For best results: "
+ einfo " Enable BSD process accounting v3 in the kernel"
+ einfo " This will produce more accurate process trees"
+ einfo " Set AUTO_RENDER_FORMAT to svg in /etc/bootchartd.conf"
+ einfo " and view /var/log/bootchart.svgz with batik or"
+ einfo " Adobe SVG viewer. This will give you additional"
+ einfo " information about the processes in tooltips"
+}
diff --git a/app-benchmarks/bootchart/files/bootchart b/app-benchmarks/bootchart/files/bootchart
new file mode 100644
index 000000000000..812f6be2ca52
--- /dev/null
+++ b/app-benchmarks/bootchart/files/bootchart
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+. /etc/profile
+
+java -Djava.awt.headless=true \
+ -cp "$(java-config -p commons-cli-1):$(java-config -pbootchart)" \
+ org.bootchart.Main "$@"
diff --git a/app-benchmarks/bootchart/files/bootchart-0.9-gentoo.patch b/app-benchmarks/bootchart/files/bootchart-0.9-gentoo.patch
new file mode 100644
index 000000000000..af85b1b2477c
--- /dev/null
+++ b/app-benchmarks/bootchart/files/bootchart-0.9-gentoo.patch
@@ -0,0 +1,48 @@
+Get bootchart to mount $LOG_DIR to /lib/bootchart so our profiling
+functions know where to create init_pidname.log
+
+--- script.orig/bootchartd 2005-11-13 17:40:01.000000000 +0000
++++ script/bootchartd 2006-08-04 13:25:00.000000000 +0100
+@@ -27,16 +27,15 @@
+ elif [ -f $CONF ]; then
+ . $CONF
+ else
+- echo "$CONF missing"
++ echo "$CONF missing" >&2
+ exit 1
+ fi
+
+-
+ # Start the boot logger.
+ start()
+ {
+ # Make sure only a single instance is running
+- [ -f "$BOOTLOG_LOCK" ] && return
++ [ -f "/lib/bootchart/$BOOTLOG_LOCK" ] && return
+
+ # Mount the temporary file system for log file storage. If possible,
+ # a temporary directory is created. In most cases though (i.e. during
+@@ -49,8 +48,13 @@
+ LAZY_UMOUNT="yes"
+ mount -n -t tmpfs -o size=$TMPFS_SIZE none "$LOG_DIR" >/dev/null 2>&1
+ fi
++
+ cd "$LOG_DIR"
+ > "$BOOTLOG_LOCK"
++
++ # OK, now bind to a fixed directory so we can create init_pidname.log
++ mount --bind "$LOG_DIR" /lib/bootchart
++
+ [ -n "$LAZY_UMOUNT" ] && umount -nfl "$LOG_DIR"
+
+ # Enable process accounting if configured
+@@ -168,6 +172,9 @@
+ rmdir "$LOG_DIR"
+ fi
+
++ # We're done, so we can release the mount
++ umount /lib/bootchart
++
+ # Render the chart if configured (and the renderer is installed)
+ [ "$AUTO_RENDER" = "yes" -a -x /usr/bin/bootchart ] && \
+ /usr/bin/bootchart -o "$AUTO_RENDER_DIR" -f $AUTO_RENDER_FORMAT "$BOOTLOG_DEST"
diff --git a/app-benchmarks/bootchart/files/digest-bootchart-0.9 b/app-benchmarks/bootchart/files/digest-bootchart-0.9
new file mode 100644
index 000000000000..8488ebb31c32
--- /dev/null
+++ b/app-benchmarks/bootchart/files/digest-bootchart-0.9
@@ -0,0 +1,3 @@
+MD5 4be91177d19069e21beeb106f2f77dff bootchart-0.9.tar.bz2 222558
+RMD160 c271bf634117c9bcd530055927abffead134b73a bootchart-0.9.tar.bz2 222558
+SHA256 7738399ecfcfb2242e9f99a316b13a5f59e89052de05074dbf705ccf4edc327d bootchart-0.9.tar.bz2 222558
diff --git a/app-benchmarks/bootchart/files/profiling-functions.sh b/app-benchmarks/bootchart/files/profiling-functions.sh
new file mode 100644
index 000000000000..28ca599713ab
--- /dev/null
+++ b/app-benchmarks/bootchart/files/profiling-functions.sh
@@ -0,0 +1,86 @@
+# profiling hook script for bootchart in baselayout
+
+[[ -e /etc/bootchartd.conf ]] && . /etc/bootchartd.conf
+
+BC_LOG_DIR=/lib/bootchart
+BC_PID_LOG="${BC_LOG_DIR}/init_pidname.log"
+BC_PID_LOCK="${BC_LOG_DIR}/init_pidname.lock"
+BC_LOCK="${BC_LOG_DIR}/${BOOTLOG_LOCK}"
+
+profiling() {
+ [[ ${RC_BOOTCHART} == "yes" && -x /sbin/bootchartd ]] || return 0
+
+ local opt="$1"
+ shift
+
+ case "${opt}" in
+ start)
+ profiling_start "$@"
+ ;;
+ name)
+ profiling_name "$@"
+ ;;
+ esac
+}
+
+# Gets a lock, or blocks until the lock is released and then gets the lock
+profiling_get_lock()
+{
+ local lockfile="$1" buffer=
+
+ while ! mkfifo "${lockfile}" &> /dev/null ; do
+ buffer=$(<"${lockfile}")
+ done
+}
+
+# Releases a lock and wakes up whoever is waiting on the lock
+profiling_release_lock()
+{
+ local lockfile="$1" tempname=$(mktemp "$1.XXXXXXXXXX")
+
+ mv -f "${lockfile}" "${tempname}"
+ touch "${tempname}"
+ rm -f "${tempname}"
+}
+
+profiling_name()
+{
+ local line= subroutine= file= frame=
+
+ # $$ does not work in subshels, that is why finding out
+ # my pid is so nasty
+ if [[ -f $BC_LOCK ]]; then
+
+ # when doing parallel startup, this function can be called
+ # by several processes at the same time,
+ # and bash >> is not atomic so
+ # some synchronization is needed to prevent corrupting the pid file
+ profiling_get_lock "${BC_PID_LOCK}"
+
+ {
+
+ bash -c 'echo -n "${PPID}"'
+ echo " = $@ \\n\\"
+
+ frame=0;
+ while caller "${frame}" &> /dev/null ; do
+ caller "${frame}" | {
+ read line subroutine file
+ echo "${file}: ${subroutine}(${line}) \\n\\"
+ }
+ frame=$((${frame} + 1))
+ done
+
+ echo
+
+ } >> "${BC_PID_LOG}"
+
+ profiling_release_lock "${BC_PID_LOCK}"
+ fi
+}
+
+profiling_start()
+{
+ einfo "Profiling init using bootchart"
+ /sbin/bootchartd init >/dev/null
+}
diff --git a/app-benchmarks/bootchart/metadata.xml b/app-benchmarks/bootchart/metadata.xml
new file mode 100644
index 000000000000..52986f7fa179
--- /dev/null
+++ b/app-benchmarks/bootchart/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<maintainer>
+ <email>uberlord@gentoo.org</email>
+ <name>Roy Marples</name>
+</maintainer>
+<longdescription>Eternal Lands is a FREE MMORPG (massively multiplayer online
+ role playing game)</longdescription>
+</pkgmetadata>