Skip to Content Java Solaris Communities Partners My Sun Sun Store United States Worldwide

»  Spotlight Articles
»  Projects
»  Publications
»  People
»  Awards
»  Events
»  Downloads
»  Internships
»  Contrarian Minds
»  About Sun Labs

The Tracing VM

Mario Wolczko Sun Microsystems Laboratories
Mailstop UMTV29-117, 2600 Casey Ave., Mountain View, CA 94043, U.S.A.,
+1 (650) 336 6022, fax +1 (650) 969 7269.

The Tracing VM is a modified JavaTM Virtual Machine which can be used to gather data on the behavior of Java applications. The Tracing VM is based on a production-quality JVM (the Research VM) in which the interpreter and object management system have been modified so that it can emit data about how objects, stacks, classes, etc., are being used in the execution of a Java application. The data are recorded in trace files which characterize some aspect of the execution behavior. Traces can be analyzed to learn about what the application is doing, used as input to simulators of new JVM implementations, etc. The trace-recording module of the Tracing VM can be modified or substituted to record data in different ways, or to perform analyses while the VM is running. It runs on the SolarisTM operating environment, versions 2.5.1, 2.6 and 2.7 (SPARCTM and Intel).

Documentation

A document describing the Tracing VM and its uses can be found here. The document contains installation instructions.

Software

The executable version is available for non-commercial research use here.

Q. What is the Tracing VM good for?

A. It is useful for gathering data on the object- and class-level behavior of a Java application. You have to supply your own analysis tools, but this is usually a simple matter of writing an awk/perl/scripting-language-of-your choice program. Typical questions which are easily answered with the Tracing VM:
  • How many objects does the program create? How big are they? What's the mix of objects and arrays?
  • Which classes are loaded? Which of those are resolved? How many instances of each class are created? How often are they read/written?
  • How deeply nested are the calls in a particular thread? How deep are the operand stacks? How many local variables in a frame on average?
It can also serve as a source of traces for simulated implementations of garbage collectors (e.g., if you want to know how quickly objects are reclaimed), other memory simulators, and, to a lesser extent, dynamic compilers (there is scant information on the code executed). Note that you have to write your own simulator; none are provided with the Tracing VM.

The traces are at a very low level. A good rule of thumb is: if you are building JVMs, the Tracing VM can probably be of use to you. If you are an application developer with a performance problem, it's very unlikely that the Tracing VM is for you.

Q. What is the Tracing VM no good for?

A. It is useless for
  • understanding the performance characteristics of any particular JVM, including the Exact VM, because it is highly intrusive in its operation, and unrepresentative of JVMs in general.
  • understanding the temporal behavior of a program (e.g., how long does this method take?), for the same reason, and also that it provides no time information.
The purpose of the Tracing VM is to get traces of object-level behavior from an application, not to learn about the VM itself.
Sun, Sun Microsystems, the Sun logo, Java-based trademarks and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SPARC is a trademark or registered trademark of SPARC International, Inc.
Maintained by Mario Wolczko
Last modified: Thu Feb 13 14:39:14 PST
Would you recommend this Sun site to a friend or colleague?
Contact About Sun News Employment Privacy Terms of Use Trademarks Copyright 1994-2008 Sun Microsystems, Inc.