Looking for static analysis tool to generate call graphs
Zajcev Evgeny
zevlg at yandex.ru
Tue Mar 2 22:43:06 PST 2004
Robert Watson <rwatson at freebsd.org> writes:
> 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
Actually it looks kind a mess. Maybe use dot's clustering or ranking
to organize callgraph a little?
like this:
Clustering output:
digraph cg {
a -> b; b->c; a->c; c->d; a->d;
subgraph "cluster_one.c" { label="one.c"; a; b;};
subgraph "cluster_two.c" { label="two.c"; c; d;}
}
Layered output:
digraph cg {
a -> b; b->c; a->c; c->d; a->d;
{ rank = same; a; c; }
{ rank = same; b; d; }
}
So soXXX functions may be with same rank, also some high level
functions such as `accept', `listen', `send', etc may have same rank,
so callgraph will look like subroutine was designed on paper.
Unfortunately there is no way in dot to use clustering and ranking for
same node :(.
--
lg
More information about the freebsd-hackers
mailing list