BTrace - a safe, dynamic tracing tool for the Java platform
Java Shell Batchfile C HTML Makefile
Permalink
Failed to load latest commit information.
benchmark Update ASM to 5.2 and JCTools to 2.0.1 Jan 11, 2017
bin Support JDK 1.7+ on OS X Jun 24, 2015
docs removing javadocs from the repository - they are accessible at http:/… Dec 21, 2009
gradle/wrapper Upgrade to gradle 3.4.1 Mar 12, 2017
lib Update ASM to 5.2 and JCTools to 2.0.1 Jan 11, 2017
make moving the NB freeform project into make folder not to interfere with… Oct 31, 2015
nbproject Fix sync instrumentor Mar 12, 2017
packaging/debian/btrace adding postinst for deb build Feb 9, 2015
samples fix sample JdbcQueries.java (#272) Apr 5, 2017
src Fixes #266 - missed execution of @OnExit event Apr 17, 2017
test-lib add missing test library Jan 11, 2017
.gitignore add missing test library Jan 11, 2017
.hgignore BTRACE-118: Add a microbenchmark for measuring the overhead of variou… Jul 21, 2014
.travis.yml Switch deployment to the btraceio organization repository Apr 18, 2016
COPYRIGHT Initial commit. Mar 6, 2008
LICENSE Introducing JCTools Queues for performance critical code Nov 7, 2015
LICENSE-3RD-PARTY.txt Use hppcrt library for primitive collections Sep 26, 2016
README.md Update README.md Feb 27, 2017
THIRDPARTYLICENSEREADME.txt Update THIRDPARTYLICENSEREADME.txt Aug 29, 2014
bintray.json Update bintray.json May 9, 2016
btraceio.png Add files via upload Oct 9, 2016
btraceio_small.png Add files via upload Oct 9, 2016
build.gradle fix DEB dependencies for newer repos Jan 11, 2017
gradlew Upgrade to gradle 3.4.1 Mar 12, 2017
gradlew.bat Upgrade to gradle 3.4.1 Mar 12, 2017
index.html Update index.html Oct 6, 2014
settings.gradle reverting the project name May 15, 2015

README.md

Download Build Status codecov.io Join the chat at https://gitter.im/jbachorik/btrace Project Stats

btrace

A safe, dynamic tracing tool for the Java platform

Version

1.3.9 (Release Page)

Quick Summary

BTrace is a safe, dynamic tracing tool for the Java platform.

BTrace can be used to dynamically trace a running Java program (similar to DTrace for OpenSolaris applications and OS). BTrace dynamically instruments the classes of the target application to inject tracing code ("bytecode tracing").

Credits

Building BTrace

Setup

You will need the following applications installed

Build

Gradle

cd <btrace>
./gradlew build
./gradlew buildDistributions

The binary dist packages can be found in <btrace>/build/distributions as the *.tar.gz, *.zip, *.rpm and *.deb files.

Ant (legacy build)

cd <btrace>/make
ant dist

The binary dist packages can be found in <btrace>/dist as the *.tar.gz and *.zip files

Using BTrace

Installation

Download a distribution file from the release page. Explode the binary distribution file (either *.tar.gz or *.zip) to a directory of your choice.

You may set the system environment variable BTRACE_HOME to point to the directory containing the exploded distribution.

You may enhance the system environment variable PATH with $BTRACE_HOME/bin for your convenience.

Or, alternatively, you may install one of the *.rpm or *.deb packages

Running

  • <btrace>/bin/btrace <PID> <trace_script> will attach to the java application with the given PID and compile and submit the trace script
  • <btrace>/bin/btracec <trace_script> will compile the provided trace script
  • <btrace>/bin/btracer <compiled_script> <args to launch a java app> will start the specified java application with the btrace agent running and the script previously compiled by btracec loaded

For the detailed user guide, please, check the Wiki.

Maven Integration

The maven plugin is providing easy compilation of BTrace scripts as a part of the build process. As a bonus you can utilize the BTrace Project Archetype to bootstrap developing BTrace scripts.

Mailing lists

These mailing lists are hosted at http://librelist.com

Contributing - !!! Important !!!

Pull requests can be accepted only from the signers of Oracle Contributor Agreement

Deb Repository

Using the command line, add the following to your /etc/apt/sources.list system config file:

echo "deb http://dl.bintray.com/btraceio/deb trusty universe" | sudo tee -a /etc/apt/sources.list

Or, add the repository URLs using the "Software Sources" admin UI:

deb http://dl.bintray.com/btraceio/deb trusty universe

RPM Repository

Grab the *.repo file wget https://bintray.com/btraceio/rpm/rpm -O bintray-btraceio-rpm.repo and use it.