Hi Alexandre! On 2019-10-26T01:35:43-0300, Alexandre Oliva wrote: > This was first submitted many years ago > https://gcc.gnu.org/ml/gcc-patches/2010-10/msg02468.html > > The command line option -fcallgraph-info is added and makes the > compiler generate another output file (xxx.ci) for each compilation > unit Yay, for such analysis tools! :-) But I'm curious: > which is a valid VCG file (you can launch your favorite VCG > viewer on it unmodified) What should be my "favorite VCG viewer"? Google lead me to , where I downloaded 'vcg.20050204.tgz' (which I understand is the 1995 sources with just some licensing changed?), which I managed to build, but which fails to run on a simple file: Wait....................e*** stack smashing detected ***: terminated Aborted (core dumped) I found the patch from to cure that one problem. (It seems that vcg is not packaged in Debian/Ubuntu anymore, nowadays?) > --- a/gcc/doc/invoke.texi > +++ b/gcc/doc/invoke.texi > +@item -fcallgraph-info > +@itemx -fcallgraph-info=@var{MARKERS} > +@opindex fcallgraph-info > +Makes the compiler output callgraph information for the program, on a > +per-file basis. The information is generated in the common VCG format. Eh, "common VCG format" -- maybe common in the mid-90s? ;-) > +It can be decorated with additional, per-node and/or per-edge information, > +if a list of comma-separated markers is additionally specified. When the > +@code{su} marker is specified, the callgraph is decorated with stack usage > +information; it is equivalent to @option{-fstack-usage}. When the @code{da} > +marker is specified, the callgraph is decorated with information about > +dynamically allocated objects. I tried that, but 'xvcg' didn't render anything useful for a '-fcallgraph-info=su,da' dump, hmm. Also, I found that many years ago, in 2012, Steven Bosscher did "Rework RTL CFG graph dumping to dump DOT format" (that's Graphviz), and then did "remove vcg CFG dumper". Note that I'm not actively objecting VCG if there's a good reason to use unmaintained mid-90s software, containing obfuscated layout/rendering source code (as far as I understand), not really in spirit of its GPL license? (But I'm not a lawyer, of course.) So I guess I'm just curious why it's now coming back. Grüße Thomas