java-callgraph

Documentation fixes

6/13/2011 1:19:15 PM

Changes

README.md 30(+19 -11)

Details

README.md 30(+19 -11)

diff --git a/README.md b/README.md
index 48a1727..7cd0a3d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-java-callgraph: Java Call Graph Utils
-=====================================
+java-callgraph: Java Call Graph Utilities
+=========================================
 
 A suite of programs for generating static and dynamic call graphs in Java.
 
@@ -27,19 +27,23 @@ graph generator
 
 #### Run
 
+Instructions for running the callgraph generators
+
 ##### Static
 
+`javacg-static` accepts as arguments the jars to analyze.
+
 <code>
 java -jar javacg-0.1-SNAPSHOT-static.jar lib1.jar lib2.jar...
 </code>
 
 ##### Dynamic
 
-`javacg-dynamic` uses the
+`javacg-dynamic` uses 
 [javassist](http://www.csg.is.titech.ac.jp/~chiba/javassist/) to insert probes
 at method entry and exit points. To be able to analyze a class `javassist` must
 resolve all dependent classes at instrumentation time.  To do so, it reads
-classes from the JVM's boot classloader. However the JVM sets the boot
+classes from the JVM's boot classloader. By default, the JVM sets the boot
 classpath to use Java's default classpath implementation (`rt.jar` on
 Win/Linux, `classes.jar` on the Mac).  The boot classpath can be extended using
 the `-Xbootclasspath` option, which works the same as the traditional
@@ -51,7 +55,7 @@ Moreover, since instrumenting all methods will produce huge callgraphs which
 are not necessarily helpful (e.g. it will include Java's default classpath
 entries), `javacg-dynamic` includes support for restricting the set of classes
 to be implemented through include and exclude statements. The options are
-appended to the `-javaagent` switch and has the following format
+appended to the `-javaagent` argument and has the following format
 
 <code>-javaagent:javacg-dycg-agent.jar="incl=mylib.*,mylib2.*,java.nio.*;excl=java.nio.charset.*"</code>
 
@@ -59,9 +63,13 @@ The example above will instrument all classes under the the `mylib`, `mylib2` an
 `java.nio` namespaces, except those that fall under the `java.nio.charset` namespace.
 
 <code>
-java -Xbootclasspath::/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:mylib.jar -javaagent:javacg-0.1-SNAPSHOT-dycg-agent.jar="incl=mylib.*;" -classpath mylib.jar mylib.Mainclass 
+java
+-Xbootclasspath:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:mylib.jar
+-javaagent:javacg-0.1-SNAPSHOT-dycg-agent.jar="incl=mylib.*;"
+-classpath mylib.jar mylib.Mainclass 
 </code>
 
+
 #### Examples
 
 The following examples instrument the 
@@ -75,7 +83,8 @@ Running the batik Dacapo benchmark:
 
 <code>
 java -Xbootclasspath:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:jar/batik-all.jar:jar/xml-apis-ext.jar -javaagent:target/javacg-0.1-SNAPSHOT-dycg-agent.jar="incl=org.apache.batik.*,org.w3c.*;" -jar dacapo-9.12-bach.jar batik -s small |tail -n 10
-
+</code>
+<code>
 [...]
 org.apache.batik.dom.AbstractParentNode:appendChild org.apache.batik.dom.AbstractParentNode:fireDOMNodeInsertedEvent 6270
 org.apache.batik.dom.AbstractParentNode:fireDOMNodeInsertedEvent org.apache.batik.dom.AbstractDocument:getEventsEnabled 6280
@@ -85,14 +94,14 @@ org.apache.batik.dom.util.DoublyIndexedTable:put org.apache.batik.dom.util.Doubl
 org.apache.batik.dom.AbstractElement:invalidateElementsByTagName org.apache.batik.dom.AbstractElement:getNodeType 7198
 org.apache.batik.dom.AbstractElement:invalidateElementsByTagName org.apache.batik.dom.AbstractDocument:getElementsByTagName 14396
 org.apache.batik.dom.AbstractElement:invalidateElementsByTagName org.apache.batik.dom.AbstractDocument:getElementsByTagNameNS 28792
-
 </code>
 
 Running the lucene Dacapo benchmark:
 
 <code>
 java -Xbootclasspath:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:jar/lucene-core-2.4.jar:jar/luindex.jar -javaagent:target/javacg-0.1-SNAPSHOT-dycg-agent.jar="incl=org.apache.lucene.*;" -jar dacapo-9.12-bach.jar luindex -s small |tail -n 10
-
+</code>
+<code>
 [...]
 org.apache.lucene.analysis.Token:setTermBuffer org.apache.lucene.analysis.Token:growTermBuffer 43449
 org.apache.lucene.analysis.CharArraySet:getSlot org.apache.lucene.analysis.CharArraySet:getHashCode 43472
@@ -107,8 +116,6 @@ org.apache.lucene.analysis.Token:termLength org.apache.lucene.analysis.Token:ini
 
 </code>
 
-
-
 #### Known Restrictions
 
 * The static call graph generator does not account for methods invoked via
@@ -121,3 +128,4 @@ Georgios Gousios <gousiosg@gmail.com>
 #### License
 
 [2-clause BSD](http://www.opensource.org/licenses/bsd-license.php)
+