instrumenting us release

Upload: niel162000

Post on 14-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Instrumenting Us Release

    1/2

    $Id: Instrumenting.txt,v 1.3 2005/03/24 09:52:28 vauclair Exp $

    This file documents how to use EJP to profile any kind of application runninginside a JVM.

    Specific startup scripts are included for JBoss Application Server (see thejboss sub-directory).

    Adding the EJP library to library path======================================

    Let be the location of your EJP installation.

    * On Windows, you must add the directory containg tracer.dll to the PATHenvironment variable:

    set PATH="\lib";%PATH%* On MacOS X, you must add the directory containg libtracer.jnilib to theDYLD_LIBRARY_PATH environment variable:

    export DYLD_LIBRARY_PATH=/lib:${DYLD_LIBRARY_PATH}

    * On all other supported platforms, you must add the directory containglibtracer.so to the LD_LIBRARY_PATH environment variable:

    export LD_LIBRARY_PATH=/lib:${LD_LIBRARY_PATH}

    Requesting the JVM to run EJP=============================

    You must add the following argument to your JVM application startup:

    -Xruntracer[:config=]

    * standard Java tool from the command line: add the argument just after thejava tool name:

    java -Xruntracer

    * JBoss from the command line: set the JAVA_OPTS environment variable beforecalling run.bat / run.sh:

    set JAVA_OPTS=-Xruntracercd /d \bincall run.bat

    * Java application run from Eclipse: add the argument to the "VM arguments"(from the "Arguments" tab of your Launch configuration).

    If you cannot figure out how to configure EJP for your system, feel free to askon Forums or open a Support request on http://ejp.sourceforge.net.

    Configuring package/class filters=================================

  • 7/27/2019 Instrumenting Us Release

    2/2

    By default, all packages and classes are traced. You may optionaly request EJPto filter out specific packages and/or classes. These filters are defined in afile that you provide to EJP using the :config= optionalargument.

    This file contains an ordered list of rules. Filter rules are checked from thetop down. A rule specifies whether matching classes should be filtered out.

    Rule syntax: i|e i forces inclusion of matching classese forces exclusion of matching classes prefix of matching classes

    An empty prefix matches all classes.

    An implicit "include all" rule is added at the bottom of filter configuration,i.e. classes are included if not explicitely excluded.

    Comments can be added to filter configuration files by starting a line with asharp ('#') character.

    Examples:

    * The following rule list will filter out classes from any java.* package,

    except for those from the java.lang.ref package; trailing dots are added toensure filtering is done on intended package (e.g. "java.lang.ref." patterndoes not concern the java.lang.reflect package):

    i java.lang.ref.e java.

    * The following rule list will remove all invocations to methods of classes inany java.* package, but not to java.lang.String:

    i java.lang.Stringe java.i