Skip to contentSkip to conversation

headergraphs - kernel header dependency visualizer

ANNOUNCE Ray Lehtiniemi 3 participants 7 messages Sep 20, 2006 – Sep 21, 2006

lore
Share & tools
lore
#1 lore raw
Quoted 8 lines · Ray Lehtiniemi

Greetings,

I got interested in tracing kernel header file dependencies and wrote yet another Perl script to generate PostScript using graphviz. Folks interested in that sort of thing are invited to check out:

http://www.kernel.org/pub/linux/kernel/people/rayl/headergraphs/

Hi Ray.

Look nice. My gsview (on my windoze box) did not recognize media size so I had to manually adjust it afterwards.
Is it possible to make the images smaller so we could fit more information in less space?

Sam

#2 lore raw
Quoted 7 lines · Sam Ravnborg
Quoted 6 lines · Ray Lehtiniemi

Greetings,

I got interested in tracing kernel header file dependencies and wrote yet another Perl script to generate PostScript using graphviz. Folks interested in that sort of thing are invited to check out:

Quoted 5 lines
Quoted 1 line

http://www.kernel.org/pub/linux/kernel/people/rayl/headergraphs/

Hi Ray.

Look nice.

thanks :-)

Quoted 2 lines

My gsview (on my windoze box) did not recognize media size so I had to manually adjust it afterwards.

i have switched from postscript to png. png files seem to render a heck of a lot faster than postscript does. hopefully there's a good windows png viewer available...

Quoted 2 lines

Is it possible to make the images smaller so we could fit more information in less space?

i've made a few changes to increase the graph density, but it's still a little on the sparse side. please check the url above for updated readme and sample images.

ray

#3 lore raw
Quoted 7 lines
Quoted 3 lines

My gsview (on my windoze box) did not recognize media size so I had to manually adjust it afterwards.

i have switched from postscript to png. png files seem to render a heck of a lot faster than postscript does. hopefully there's a good windows png viewer available...

graphviz (/usr/bin/dot) can do SVG too.

Jan Engelhardt

#4 lore raw
Quoted 9 lines · Jan Engelhardt
Quoted 7 lines
Quoted 3 lines

My gsview (on my windoze box) did not recognize media size so I had to manually adjust it afterwards.

i have switched from postscript to png. png files seem to render a heck of a lot faster than postscript does. hopefully there's a good windows png viewer available...

graphviz (/usr/bin/dot) can do SVG too.

Reminds me...
Arnaldo (acme) made a few simple scripts that was based on dot. They are at his home directory at kernel.org.

Care to take at look at these to see if there is something to be learned. One good feature was that each level had a different color, and I recall the graphs was more dense with less (confusing?) info.

Sam

#5 lore raw
Quoted 3 lines · Sam Ravnborg

Reminds me...
Arnaldo (acme) made a few simple scripts that was based on dot. They are at his home directory at kernel.org.

yah, the very first commit in my tree is an import of those scripts for reference purposes :-)

Quoted 3 lines

Care to take at look at these to see if there is something to be learned. One good feature was that each level had a different color, and I recall the graphs was more dense with less (confusing?) info.

those graphs contain _much_ less information.

the primary complexity reduction mechanism in hviz appears to be that it adds the current file to the done list immediately before it starts the breadth-first search of the children. this eliminates the possibility of back edges to previously seen headers, which is why those graphs flow so nicely from left to right. unfortunately, it also discards most of the dependency information.

my goal was to retain and present information from _all_ edges in the graph, not just those which lead to new children. even for relatively small hierarchies, these graphs generally wind up looking like a big ball of yarn, which is where all the confusing colors and numbers come into play. they are the distilled remnants of all the edges that have been pruned. only a select few edges remain to tie the whole thing together.

ray

#6 lore raw
In reply to Jan Engelhardt
Quoted 8 lines · Jan Engelhardt
Quoted 6 lines
Quoted 2 lines

My gsview (on my windoze box) did not recognize media size so I had to manually adjust it afterwards.

i have switched from postscript to png. png files seem to render a heck of a lot faster than postscript does. hopefully there's a good windows png viewer available...

graphviz (/usr/bin/dot) can do SVG too.

yes, i tried viewing those with inkscape, but the strings were rendered too large... didn't bother to dig into whose fault it was, since png worked nicely when i tried it.

if this ends up being a generally useful tool, it'll be trivial to select the output format as a runtime option anyway.

ray