improve profiling script

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@983208 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2010-08-07 11:03:52 +00:00
parent ab39d82dd1
commit 0579e639c2
1 changed files with 11 additions and 4 deletions

View File

@ -33,10 +33,6 @@
# set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# ----------------------------------------------------------------------------
YJPLIB=/applications/YourKit.app/bin/mac/libyjpagent.jnilib
MAVEN_OPTS=-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal
QUOTED_ARGS=""
while [ "$1" != "" ] ; do
@ -69,6 +65,10 @@ case "`uname`" in
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
fi
if [ -z "$YJP_HOME" ]; then
YJP_HOME=/Applications/YourKit.app
fi
YJPLIB=$YJP_HOME/bin/mac/libyjpagent.jnilib
;;
esac
@ -158,6 +158,13 @@ if $cygwin; then
HOME=`cygpath --path --windows "$HOME"`
fi
if [ ! -f "$YJPLIB" ]; then
echo "Unable to autodetect the YJP library location. Please set YJPLIB variable"
exit 1
fi
MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS"
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \