== Code Visualization == Execution Graph generated in one of our [wiki:Architecture four phases] can be a useful utility for day-to-day development or tuning and optimization, as it can give developers hints about parallel execution patterns or hot-spot code which is candidate for further manual optimization and code rewriting. As an option to our virtual machine prototype, we generate graphical representation for our execution graph. The following commands shows an example of using our visualization feature. The second line uses the generated representation from our engine to generate graph using [http://www.graphviz.org GraphViz] tool. {{{ .//rvm -X:hydra:dumb=true -X:hydra:class=Test Test > plotXX dot -Tps plotXX -o graphXX.ps }}} We can narrow the visualization output to the scope of one class or certain package using '-X:hydra:class=...' and '-X:hydra:package=...' respectively. The generated graph composed of ''nodes'' that represents blocks and variables, and ''edges'' that shows the access frequency or the type of operation done on variables (read or write). Nodes start with 'B' represent basic blocks, and it is followed by a number in which higher order digits are the method identifier and lower order ones for the block identifier. Nodes with 'V' prefix are the variables, the numbers indicate it is global variable if it is larger than 1000, and local variable otherwise. Edges connecting blocks are weighted with the number of times program flow moved between these two blocks, while edges connected to variables represent memory access from blocks to these variables; green edges for read and red ones for write.[[BR]] The graph can be simplified by filtering out memory access (variables access) in favor of focusing on control flow by using the following command. {{{ .//rvm -X:hydra:dumb=true -X:hydra:class=Test -X:hydra:novar=true Test > plotXX }}} === Examples === We tried our tool with [http://www-ali.cs.umass.edu/DaCapo/benchmarks.html JOlden benchmark] a Java version of [http://www.martincarlisle.com/olden.html Olden Benchmark] and the following links are the execution graphs generated. * [/chrome/site/jolden/tsp.pdf TSP]: probabilistic analysis of partitioning algorithms for the traveling-salesman problem in the plane * [/chrome/site/jolden/em3d.pdf EM3D]: electromagnetic waves through objects in 3 dimensions * [/chrome/site/jolden/health.pdf Health]: Columbian health-care system * [/chrome/site/jolden/mst.pdf MST]: computes the minimum spanning tree of a graph using Bentley's algorithm * [/chrome/site/jolden/perimeter.pdf Perimeter]: pomputing perimeters of regions in images represented by Quadtrees * [/chrome/site/jolden/power.pdf Power]: decentralized optimal power pricing * [/chrome/site/jolden/treeadd.pdf TreeAdd]: performs a recursive depth first traversal of a binary tree and sums the value of each element in the tree