[dtrace-discuss] Visualizing a call graph

Amit k. Saha
Mon, 24 Nov 2008 11:13:07 -0000

Hello Jon,


On Mon, Nov 24, 2008 at 3:21 PM, Jon Haslam <Jonathan.Haslam at sun.com>
wrote:
> Hi Amit,
>
>> Basically, I would like to have a graphical display showing me the
>> call flow between the various functions- starting and ending at the
>> starting function. I have thought about it a bit. I have written a
>> regex to identify the various columns. After some intermediate data
>> storage using a stack, I shall use the information to prepare a
''dot''
>> file which I plan to feed to ''dotty'' (Graphviz) to
give me the call
>> graph.
>>
>> Is this a good approach? Has anybody tried something similar?

Thanks for your reply. My comments inline:

>
> A good while ago now I did exactly this with pretty good results. I put
> a brief blog together on what was done:
>
> http://blogs.sun.com/jonh/entry/dtrace_and_visualisation

This is what exactly what I have in mind. Did you do it the way I am
thinking? The ''jzgraph'' project is well but dead. So, probably
I shall
have to generate a ''dot'' file and then externally feed it to
''dotty''.

>
> Simon Ritter improved on this first pass attempt and developed a more
> interactive experience for generating call graphs:
>
> http://blogs.sun.com/simonri/entry/i_m_sorry_dave_i
>
> The software that Simon developed (called ''DAVE'') is
actually pretty
> nice. The last time I saw it you could graph Java and native methods
> together and even do some database related graphing.
>
> Over this summer though Simon and I have taken this idea one step further.
> We''re now using the Java Monkey Engine (a 3D games engine) to
visualise
> the graphs (we''re still obviously using DTrace as the
instrumentation
> technology and the graphviz libraries for the core graph generation).
> Using the Monkey Engine we can generate interactive 3D call graphs
> which we can move through and manipulate in 3D object space. In fact,
> rather gratuitously really, we''ve implemented an anaglyph
technique so you
> can even wear 3D glasses (red/cyan) so the graph comes out the screen at
> you! All good fun.

Ah awesome fun. Any blog posts/etc?


Thanks,
Amit