[![Download](https://api.bintray.com/packages/btraceio/releases/btrace/images/download.svg) ](https://bintray.com/btraceio/releases/btrace/_latestVersion) [![Build Status](https://travis-ci.org/btraceio/btrace.svg?branch=master)](https://travis-ci.org/btraceio/btrace) [![codecov.io](https://codecov.io/github/btraceio/btrace/coverage.svg?branch=master)](https://codecov.io/github/btraceio/btrace?branch=master) [![Join the chat at https://gitter.im/jbachorik/btrace](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/btraceio/btrace?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Project Stats](https://www.openhub.net/p/btrace/widgets/project_thin_badge.gif)](https://www.openhub.net/p/btrace)
# btrace
A safe, dynamic tracing tool for the Java platform
## Version
1.3.9 ([Release Page](https://github.com/jbachorik/btrace/releases/latest))
## 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
* Based on [ASM](http://asm.ow2.org/)
* Powered by [JCTools](https://github.com/JCTools/JCTools)
* Powered by [hppcrt](https://github.com/vsonnier/hppcrt)
* Optimized with [JProfiler Java Profiler](http://www.ej-technologies.com/products/jprofiler/overview.html)
## Building BTrace
### Setup
You will need the following applications installed
* [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) (preferrably JDK8)
* [Git](http://git-scm.com/downloads)
* [Gradle](http://gradle.org)
* (optionally) [Ant](http://ant.apache.org/bindownload.cgi)
* (optionally) [Maven3](http://maven.apache.org/download.cgi)
### Build
#### Gradle
```sh
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)
```sh
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](https://github.com/btraceio/btrace/releases/latest). 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](https://github.com/btraceio/btrace/wiki/Home).
### Maven Integration
The [maven plugin](https://github.com/btraceio/btrace-maven) 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**
* **btrace.users@librelist.com**
* **btrace.dev@librelist.com**
* **btrace.commits@librelist.com**
## Contributing - !!! Important !!!
Pull requests can be accepted only from the signers of [Oracle Contributor Agreement](http://www.oracle.com/technetwork/community/oca-486395.html)
### 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.
没有合适的资源?快使用搜索试试~ 我知道了~
btrace-bin-1.3.9.tgz
5星 · 超过95%的资源 需积分: 9 19 下载量 192 浏览量
2017-11-17
18:05:20
上传
评论 1
收藏 1.06MB TGZ 举报
温馨提示
共74个文件
java:49个
d:4个
bat:3个
Java的安全动态追踪工具 BTrace通过运行Java程序的动态(字节码)工具类来工作。 BTrace将追踪操作插入正在运行的Java程序的类中,并将被追踪的程序类热插拔。
资源推荐
资源详情
资源评论
收起资源包目录
btrace-bin-1.3.9.tgz (74个子文件)
README.md 4KB
LICENSE-3RD-PARTY.txt 13KB
COPYRIGHT 3KB
CHANGELOG.md 24KB
bin
btracec 1KB
btracec.bat 741B
com
sun
btrace
samples
AllMethods.class 1KB
btrace 2KB
btracer 3KB
btracer.bat 3KB
btrace.bat 721B
blackboard
support
perf
btrace
RemoteAdminServletStats.class 2KB
docs
usersguide.html 27KB
LICENSE 19KB
THIRDPARTYLICENSEREADME.txt 2KB
build
i386
libbtrace.so 13KB
btrace-agent.jar 398KB
btrace-boot.jar 333KB
btrace-client.jar 403KB
samples
AllLines.java 2KB
ThreadCounter.java 2KB
DTraceRefDemo.java 2KB
AllCalls2.java 2KB
DTraceInline.java 2KB
syscalls.d 72B
AllMethodsSampled.java 2KB
classload.d 388B
Memory.java 2KB
jthread.d 184B
NewComponent.java 2KB
NewArray.java 2KB
btracedefs.h 2KB
java.net.socket.xml 3KB
ThreadStart.java 2KB
MemAlerter.java 2KB
AllCalls3.java 2KB
ProbeExit.java 2KB
AllSync.java 2KB
Profiling.java 3KB
HistogramBean.java 2KB
HistoOnEvent.java 2KB
CommandArg.java 2KB
Test.java 1KB
AllMethodsLevels.java 2KB
JInfo.java 2KB
Classload.java 2KB
AWTEventTracer.java 2KB
FileTracker.java 3KB
Histogram.java 2KB
ThreadBean.java 2KB
URLTracker.java 3KB
SubtypeTracer.java 2KB
SysProp.java 2KB
AllCalls3Sampled.java 2KB
Timers.java 2KB
OnThrow.java 3KB
Sizeof.java 2KB
JdbcQueries.java 6KB
LogTracer.java 2KB
AllCalls1.java 2KB
Deadlock.java 2KB
AllCalls2Sampled.java 2KB
JStack.java 2KB
FinalizeTracker.java 2KB
jurls.d 247B
AllMethods.java 2KB
AllCalls1Sampled.java 2KB
JMap.java 2KB
SocketTracker1.java 3KB
WebServiceTracker.java 3KB
ThreadCounterBean.java 2KB
SocketTracker.java 4KB
MultiClass.java 2KB
ArgArray.java 2KB
共 74 条
- 1
资源评论
- 教练、我想打篮球2018-01-02感谢分享, 可以使用
无始之名
- 粉丝: 129
- 资源: 28
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功