Mercurial > hg > openjdk7.svn
view j2se/src/share/classes/com/sun/tools/example/doc/trace.html @ 4:bf1d8af0651f trunk
[svn] Load openjdk/jdk7/b16 into jdk/trunk.
author | xiomara |
---|---|
date | Fri, 20 Jul 2007 21:22:05 +0000 |
parents | 64ed597c0ad3 |
children | 27e0bf49438e |
line wrap: on
line source
<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <TITLE>trace example</TITLE> </HEAD> <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#000077" ALINK="#FF0000"> <H2>trace example</H2> <B>Trace</B> runs the Java language program passed as an argument and generates a trace of its execution. <B>Trace</B> is a simple command line tool that uses the <A HREF="http://java.sun.com/j2se/1.4/docs/guide/jpda/architecture.html#jdi"> Java Debug Interface (JDI)</A>. Programs need not be compiled for debugging since this information is not used. <P> <B>Trace</B> can be invoked as follows: <PRE> java com.sun.tools.example.trace.Trace <i>options class args</i> </PRE> Your classpath must include the JDI Library (see <A HREF="index.html#SETUP">set-up</A>), the path to the compiled <b>trace</b> class files, and the path for the application being traced. <P> Available <i>options</i> are: <PRE> -output <i>filename</i> Set destination for output trace. By default output goes to the terminal. -all Include system classes in output. By default java.*, javax.*, sun.* and com.sun.* events are not diplayed. -fields Also show assignments into fields. -help Print a help message </PRE> <i>class</i> is the program to trace. <i>args</i> are the arguments to <i>class</i>. <P> <H2>Source for trace</H2> Full source code for <b>trace</b> is included in the <code>trace</code> directory of <code>examples.jar</code>. Source code for these example applications is included to provide concrete examples for debugger developers. Example code may be used, modified and redistributed by debugger developers providing they adhere to the terms in the COPYRIGHT notice. <P> <H2>Building trace</H2> To completely rebuild the <b>trace</b> classes from the provided source files in the <code>trace</code> directory, you need only to compile them. No special options are required, aside from those which set your classpath to include the <A HREF="index.html#SETUP">JDI Library</A>. <P> <hr> <address><a href="mailto:java-debugger@java.sun.com">java-debugger@java.sun.com</a></address> </P> <P> <FONT SIZE=-1>@(#) trace.html 1.4 07/04/04 00:31:04</FONT> </P> </BODY> </HTML>