BTrace - a dynamic tracing tool for Java

Are you interested in a byte code instrumentation (BCI) based dynamic tracing solution for the Java platform? If so, please visit https://btrace.dev.java.net. BTrace is a safe, dynamic tracing solution for Java. You can express tracing code in Java and run it against a running Java application. Your Java application should be running on JDK 6 or above for BTrace to work. You may be using VisualVM, the all-in-one Java troubleshooting tool. VisualVM supports plugin model to extend it's capabilities. BTrace plugin for VisualVM will be available soon. When BTrace plugin is available, you can trace your application from VisualVM tool. In the meanwhile, you can use BTrace command line tools. You may want to check out the user guide for the command line access.

Comments:

StackTrace provides similar functionality for older JVMs where dynamic byte code instrumentation is not possible.
http://www.adaptj.com

Posted by AdaptJ on March 07, 2008 at 04:43 PM IST #

Would you mind to write up some info about BTrace for the ASM users page at http://asm.objectweb.org/users.html ?

Posted by Eugene Kuleshov on March 07, 2008 at 05:05 PM IST #

Hi "AdaptJ" - I did a quick glance at Adaptj. But, will take a detailed look later. In the meanwhile, please check out whether there are common elements that can be used across the tools.

Hi Eugene Kuleshov - I'll send you a write up about BTrace for ASM users page.

Posted by A. Sundararajan on March 08, 2008 at 02:45 AM IST #

Hi Eugene: Not sure my description for "ASM users" page reached you or not by email. I'm reproducing the same here:

BTrace (https://btrace.dev.java.net) is a safe, dynamic tracing tool for the Java platform. BTrace works by dynamically bytecode instrumenting (BCI) .class files of running a Java application to insert tracing code. The tracing code is expressed in Java programming language. BTrace uses ASM 3.0 to instrument .class files at runtime. On OpenSolaris platform, there is integration with OpenSolaris DTrace (dynamic tracing for Solaris OS and applications) as well. It is possible to raise DTrace probes from BTrace code and also execute an associated D-script. There is a command line access as well as GUI access to BTrace. VisualVM (http://visualvm.dev.java.net) is all-in-one troubleshooting tool for Java. VisualVM supports plugin model to extend it's capabilities. A VisualVM plugin for BTrace is being developed. It will be available soon.

Posted by A. Sundrarajan on March 10, 2008 at 06:06 AM IST #

If that appeals to you, you might also be interested in JIP : The Java Interactive Profiler.

http://jiprof.sourceforge.net/

Posted by Curt Cox on March 10, 2008 at 12:34 PM IST #

Since this is not really targeted at performance how does compare to JXInsight's Diagnostics which provides a debugger like interface but at a much higher level of abstraction. One immediate difference is that JXInsight is based on a execution and meta model which can be pulled on-demand from a remote console rather than the obvious push and unfiltered System.out like statement mechanism offered here.

Diagnostics Tutorial
http://blog.jinspired.com/?p=35

Component State in Diagnostics Global Frame
http://blog.jinspired.com/?p=44

William

Posted by William Louth on March 11, 2008 at 07:01 AM IST #

How to print method arguments. For example if I add probe to monitor Socket.connect method. How do I print arguments passed to connect method.
Also how this dynamic tracing works ?.

Madhu

Posted by madhu on March 19, 2008 at 04:56 AM IST #

Yes, you can print arguments. Please see "SocketTracker.java", "SocketTracker1.java", "ArgArray.java" samples in BTrace "samples" directory.

BTrace works by instrumenting .class files loaded in the target application and hot-swapping (a.k.a redefine classes) those.

Posted by A. Sundararajan on March 19, 2008 at 05:02 AM IST #

Post a Comment:
Comments are closed for this entry.
About

sundararajan

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Links

No bookmarks in folder

Blogroll

No bookmarks in folder

News

No bookmarks in folder