Looking for static analysis tool to generate call graphs

Robert Watson rwatson at FreeBSD.org
Tue Mar 2 19:19:42 PST 2004


On Mon, 1 Mar 2004, Robert Watson wrote:

> I'd like to generate static call graphs from sections of src/sys/kern,
> src/sys/net, and src/sys/netinet, and ideally, get an output that looks
> pretty when printed to a (perhaps large) piece of paper.  It doesn't
> need to be able to handle function pointer magic in structures (vnode
> operations, socket operations, file descriptor operations, sysinits,
> etc); I just want a fairly high-level graph to get a feel for particular
> chunks of code spanning a couple of C files.  Anyone have any
> recommendations? Preferably something that can actually parse the
> variant of C we use in our kernel :-).

Well, using a scary combination of grep, awk, a long list of "omit this"
regexp's, and prcc from cflow, I got the following: 

    http://www.watson.org/~robert/freebsd/20040302-sockets.ps

Duck and cover. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Senior Research Scientist, McAfee Research




More information about the freebsd-hackers mailing list