On 12/28/2010 05:54 PM, Yose Widjaja wrote:
Hi,
Is there a way to get compilation reports for things such as class
sizes, function call statistics etc for some static analysis?
If not a report, any intermediate file that can be used to generate such things?
Cheers
As far as I know, there is not just a single report for all the
information you are searching for, but there are various (internal) dump
formats of intermediate representations, just check out the
-fdump-*
switches from the man page, e.g.
-fdump-class-hierarchy[-n] for class specific information
(including class sizes)
To get a whole bunch of internal dumps, you could use:
# gcc/g++ [options] -fdump-tree-all-raw -O2
The inline-specific dumps for example contain a lot of information about
statically estimated function sizes/times.
I'm not sure what your plans are, but if you intend to build some
scripts which analyze these internal dumps, please note that that the
format is not standardized and could be changed from release to release.
Andi