wiki:Visualization

Version 1 (modified by msaad, 54 years ago) (diff)

--

Code Visualization

Execution Graph generated in one of our 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 GraphViz tool.

./<hydra vm directory>/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.

The graph can be simplified by filtering out memory access (variables access) in favor of focusing on control flow by using the following command.

./<hydra vm directory>/rvm -X:hydra:dumb=true -X:hydra:class=Test -X:hydra:novar=true Test > plotXX

Examples

We tried our tool with JOlden benchmark a Java version of Olden Benchmark and the following links are the execution graphs generated.

  • TSP: probabilistic analysis of partitioning algorithms for the traveling-salesman problem in the plane
  • EM3D: electromagnetic waves through objects in 3 dimensions
  • Health: Columbian health-care system
  • MST: computes the minimum spanning tree of a graph using Bentley's algorithm
  • Perimeter: pomputing perimeters of regions in images represented by Quadtrees
  • Power: decentralized optimal power pricing
  • TreeAdd: performs a recursive depth first traversal of a binary tree and sums the value of each element in the tree