More‎ > ‎

YACA-Monitor 1.0 - How to Enhance Static Call-Graph Analysis with Dynamic Data from Profiling?


Static code analysis has been used for many years to find hints concerning errors, design weaknesses and/or compliance to guidelines. With static code analysis you may measure and improve the code quality.

Call-graphs out of pure static code analysis give not in all situations a clear picture of the inner structure of software. This is especially true for software which uses extensive late binding and/or inversion of control frameworks. The following sample application demonstrates this (see video).


Modern enterprise software based on Java EE or Spring Framework is a good sample. In these cases static code analysis gives an overview about the single components (beans), but the dynamic call dependencies are missing. In this situation a developer has either to read a lot of source code or just starts the development environment, setting some breakpoints, debugs and analyses the call dependencies of the running software. 

Manual analysis of call dependencies is very time consuming and annoying. This was the motivation for me to combine static and dynamic analysis and write a graphic monitor to view the software in vivo. 

YouTube Video

The following video gives a impression about the approach:

The Solution consists of two parts (i) a small agent which collects data and (ii) a web client for visualization.
  • Collection of data is done by the so called YacaAgent - a small java program - that collects the data for static call-graph analysis based on the ASM (Java byte code manipulation and analysis) framework. Data of the dynamic analysis are collected directly from the VM of the running Java software with the tools.jar library (of the JDK 1.6.0_23 or higher). The result can be fetched over HTTP (JSON with Padding - call back interface).

  • Visualization of data is done by the so called Yaca-Monitor (see - a small GWT application based on Googles AppEngine - that displays data from the YacaAgent in short intervals. Because the browser has to run a lot of JavaScript code, it is strongly recommended to use a modern browser like Google Chrome. The visualization of Yaca-Monitor is based on the d3.js ( library.
This sample implementation is still in an experimental state, but it should demonstrates the benefit of the enhancement of static with dynamic call-graph analysis. 

Find Code on GitHub

Sponsored Link