9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "D. Brownlee" <ancipites@earthlink.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] prof
Date: Mon, 14 Aug 2000 21:15:45 -0700	[thread overview]
Message-ID: <3998C3F1.53440381@earthlink.net> (raw)
In-Reply-To: <200008111418.KAA13127@cse.psu.edu>



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


  parent reply	other threads:[~2000-08-15  4:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-11 14:19 forsyth
2000-08-11 18:22 ` D. Brownlee
2000-08-15  4:15 ` D. Brownlee [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-11 21:14 forsyth
2000-08-11 14:23 Russ Cox
2000-08-11 13:10 D. Brownlee
2000-08-11 14:03 ` D. Brownlee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3998C3F1.53440381@earthlink.net \
    --to=ancipites@earthlink.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).