public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* tools for getting call-graph info after compilation
@ 2000-01-06 17:39 JAY LULLA
  2000-01-07 10:26 ` Phil McRevis
  2000-04-01  0:00 ` JAY LULLA
  0 siblings, 2 replies; 4+ messages in thread
From: JAY LULLA @ 2000-01-06 17:39 UTC (permalink / raw)
  To: help-gcc

Hi. I was wondering if anyone knows of GNU tools that can generate
call-graph info while compiling and linking a big multi-file program.

This info shows
which functions call other functions. If it is possible to get a nice
graph / tree / table of this info, that would be great. If that is not
possible, we would be glad to get the raw data in text form.

For example, one minimal way to represent the data would be a matrix:

                Func A  Func B  Func C  ...     Func X
function A      0       1       1               0
func    B       0       0       1               1
func    C       1       0       0               0
.
.
func    X       0       1       0               0

ie 1's or 0's represent whether the function in the column is called by
the function in the row.

Since this info is independent of run-time behavior, it should be
possible to get the info after compilation.
--------------------------------------------
I believe that there is a tool called "gcov" which indicates which parts
of the code are covered by input data, but I believe that it is a
run-time tool, not one that shows the structural info from compilation.

Nonetheless, if you have used "gcov", perhaps you can send me some info
on its use, and at what step in compiling / linking (/ running) the
program you use it.
---------------------------------------------

Thanks!

Jay Lulla
jay.lulla@ebay.sun.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tools for getting call-graph info after compilation
  2000-01-06 17:39 tools for getting call-graph info after compilation JAY LULLA
@ 2000-01-07 10:26 ` Phil McRevis
  2000-04-01  0:00   ` Phil McRevis
  2000-04-01  0:00 ` JAY LULLA
  1 sibling, 1 reply; 4+ messages in thread
From: Phil McRevis @ 2000-01-07 10:26 UTC (permalink / raw)
  To: help-gcc

JAY LULLA <JAY.LULLA@Sun.COM> spake the secret code
< 387540DC.C07890F7@Sun.COM > thusly:

>Hi. I was wondering if anyone knows of GNU tools that can generate
>call-graph info while compiling and linking a big multi-file program.

What your describing is what I've heard called a "cross reference
generator" program.  The cygnus folks have a C++ source code analyzer
that does this (and more, apprently) and they have added some small
hooks to gcc in order to gather the necessary data.  I don't think
those hooks are enabled by default.  Cygnus only makes the source
available on some CD you buy from them, I think.  This particular
variation of gcc isn't completely available by FTP.
-- 
http://www.xmission.com/~legalize	Legalize Adulthood!
legalize@xmission.com
``Ain't it funny that they all fire the pistol,     <URL: http://
  at the wrong end of the race?''--PDBT     www.eden.com/~thewho>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* tools for getting call-graph info after compilation
  2000-01-06 17:39 tools for getting call-graph info after compilation JAY LULLA
  2000-01-07 10:26 ` Phil McRevis
@ 2000-04-01  0:00 ` JAY LULLA
  1 sibling, 0 replies; 4+ messages in thread
From: JAY LULLA @ 2000-04-01  0:00 UTC (permalink / raw)
  To: help-gcc

Hi. I was wondering if anyone knows of GNU tools that can generate
call-graph info while compiling and linking a big multi-file program.

This info shows
which functions call other functions. If it is possible to get a nice
graph / tree / table of this info, that would be great. If that is not
possible, we would be glad to get the raw data in text form.

For example, one minimal way to represent the data would be a matrix:

                Func A  Func B  Func C  ...     Func X
function A      0       1       1               0
func    B       0       0       1               1
func    C       1       0       0               0
.
.
func    X       0       1       0               0

ie 1's or 0's represent whether the function in the column is called by
the function in the row.

Since this info is independent of run-time behavior, it should be
possible to get the info after compilation.
--------------------------------------------
I believe that there is a tool called "gcov" which indicates which parts
of the code are covered by input data, but I believe that it is a
run-time tool, not one that shows the structural info from compilation.

Nonetheless, if you have used "gcov", perhaps you can send me some info
on its use, and at what step in compiling / linking (/ running) the
program you use it.
---------------------------------------------

Thanks!

Jay Lulla
jay.lulla@ebay.sun.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tools for getting call-graph info after compilation
  2000-01-07 10:26 ` Phil McRevis
@ 2000-04-01  0:00   ` Phil McRevis
  0 siblings, 0 replies; 4+ messages in thread
From: Phil McRevis @ 2000-04-01  0:00 UTC (permalink / raw)
  To: help-gcc

JAY LULLA <JAY.LULLA@Sun.COM> spake the secret code
< 387540DC.C07890F7@Sun.COM > thusly:

>Hi. I was wondering if anyone knows of GNU tools that can generate
>call-graph info while compiling and linking a big multi-file program.

What your describing is what I've heard called a "cross reference
generator" program.  The cygnus folks have a C++ source code analyzer
that does this (and more, apprently) and they have added some small
hooks to gcc in order to gather the necessary data.  I don't think
those hooks are enabled by default.  Cygnus only makes the source
available on some CD you buy from them, I think.  This particular
variation of gcc isn't completely available by FTP.
-- 
http://www.xmission.com/~legalize	Legalize Adulthood!
legalize@xmission.com
``Ain't it funny that they all fire the pistol,     <URL: http://
  at the wrong end of the race?''--PDBT     www.eden.com/~thewho>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-06 17:39 tools for getting call-graph info after compilation JAY LULLA
2000-01-07 10:26 ` Phil McRevis
2000-04-01  0:00   ` Phil McRevis
2000-04-01  0:00 ` JAY LULLA

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 read-only IMAP folder(s) and NNTP newsgroup(s).