From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3998C3F1.53440381@earthlink.net> Date: Mon, 14 Aug 2000 21:15:45 -0700 From: "D. Brownlee" MIME-Version: 1.0 To: 9fans@cse.psu.edu Subject: Re: [9fans] prof References: <200008111418.KAA13127@cse.psu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: fb22dd42-eac8-11e9-9e20-41e7f4b1d025 forsyth@vitanuova.com wrote: > > >>Another question: has anyone done anything with the > >>compiler to generate a static flow graph -- something > >>like 'cflow'? > > i have changes to one of the linkers somewhere. > it also checked stack depth. I got curious and came up with this after a minor change: %term diff /sys/src/cmd/8l/pass.c pass.c 306a307 > mydiag("%s calls %s", TNAME, s->name); 308d308 < diag("undefined: %s in %s\n", s->name, TNAME); void mydiag(char *fmt, ...); -- after diag() in list.c This yields alot of lines of the form: caller calls callee It looks like a fairly simple job for 'awk', maybe 'rc', to process those lines and produce the flow graph. Thanks for the clue about using the linker instead of the compiler; I'll even get things that were written in assembler. Later, D. Brownlee