This is ART, the University of Arizona/Microsoft Research program renderer. Copyright September 2000, Regents of the University of Arizona and Microsoft Research. Rights are granted to freely copy, modify, and redistribute this system, as long as this copyright notice is included and remains intact. If you manage to make any money off of this stuff, send us some. Authors: Christian Collberg, collberg@cs.arizona.edu Sean Davey, sdavey@cs.arizona.edu Todd A. Proebsting, toddpro@microsoft.com ========================== SUPPORTING SOURCE ======================= Included in this package is 1) modified source for jikes, version 0.48, copyright by IBM. 2) BIT v0.2 by Han B. Lee (hanlee@cs.colorado.edu), copyright by the University of Colorado. You'll also need to have TeX, dvips, MetaPost, and Python installed. ============================= INSTALLATION ========================== Edit 'bin/art' and set the following variables to paths that work for you: set CP = /usr/java1.2/jre/lib/rt.jar set MPPATH = /space/local/teTeX/texmf/metapost/base set jikes = bin/linux/jikes ================================= USAGE ============================= # To render simple.java do $ bin/art simple art_defs # or $ bin/art simple nowords_style # To merge in execution profiles do $ bin/art simple -p simple.prof ================================= USAGE ============================= # Here's a more wordy description that explains how the different # parts of ART are connectetd and how they can be called individually. # Compile your java program, say, simple.java, with the modified jikes to # produce a metapost file, simple.mp, and a TeX file, simple.tex: $ bin/solaris/jikes -classpath /usr/java1.2/jre/lib/rt.jar +MP -nowrite simple.java # If you want to make use of profile information you should # also add the +SS flag: $ bin/solaris/jikes -classpath /usr/java1.2/jre/lib/rt.jar +MP +SS -nowrite simple.java # and merge in the execution counts generate by BIT: $ bin/merge_profile simple.mp simple.prof > simple1.mp # Make sure that metapost uses latex to process TeX commands: $ setenv TEX latex # Make sure that the style files in the mp directory are on your # TeX/MetaPost paths: $ setenv TEXINPUTS "$TEXINPUTS":mp $ setenv MPINPUTS .:/space/local/teTeX/texmf/metapost/base:mp # Obviously, you should include your own actual path to the # standard MetaPost macros. # Render the program: $ bin/render simple art_defs # You may have to edit mp/render to change the name of metapost; # it might be "mp", "mpost", or something else on your system. # Run latex: $ latex simple.tex # Run dvips: $ dvips -o simple.ps simple # The rendered program is in simple.ps =============================== Using BIT =========================== To produce execution counts do the following: 1) Set the appropriate path (use whatever works for you): > setenv CLASSPATH .:/home/...../ART Compile LCount.java: > javac LCount.java 2) Assume that the program you want to profile is in directory test: > ls test t.class t.java t.java~ 3) Compile the test program: > cd test > javac t.java 4) Instrument the code: > mkdir -p test1 > java LCount test test1 Instrumented copies of the class-files are constructed in directory test1. 5) Run the instrumented program: > cd test1 > java -classpath .:.. t | ../rank t P 3 50 04.7 2 t P 4 50 04.7 2 t P 5 50 04.7 2 t P 6 500 47.5 1 t main 10 1 00.1 3 t main 11 1 00.1 3 t main 12 1 00.1 3 t main 13 100 09.5 1 t main 14 50 04.7 2 t main 16 50 04.7 2 t main 17 50 04.7 2 t main 18 50 04.7 2 t main 19 50 04.7 2 t main 20 50 04.7 2 The format is: class-name method-name line-number execution-count percent rank The execution-count and percent numbers are global within the program. The rank number is local within each procedure. Line-numbers are global within each class. ================================= FILES ============================= bin/compile_style translates an art xml file to metapost macros usage: compile_style art.xml > art_defs.mp bin/merge_profile merges execution counts into the generated metapost file. usage: merge_profile file.mp profile bin/render usage bin/render source spec 'source' is the MetaPost file generated by jikes. It should be given first on the command line, and without the '.mp' extension. 'spec' is the MetaPost style file generated by compile_style, for example, 'art_defs'. bin/solaris/jikes precompiled binary of the modified jikes. usage: jikes +MP x.java > x.mp mp/art.xml mp/nowords.xml ART style files. mp/art.dtd XML data type definition for the style files. mp/art_util.mp mp/java.tex mp/mp.sty Various standard style files for MetaPost and TeX. They must be on the right paths so that LaTeX and MetaPost can find them. mp/art_defs.mp mp/nowords_style.mp Metapost macros compiled from art_defs.mp and nowords_style.mp, respectively.