Tom Tromey wrote:
* Why put the optimization diary into the object file?
  Why not just have -Wdiary and print it along with all the warnings?
  (I'm sure there's an answer to this, it would just be nice if it
  were in the document...)
These are not warnings and they should not cause build failures
when -Werror is used, hence warnings are not suitable medium to
communicate this info.

However, GCC provides hints along with warnings and errors. But they
all reside in build log. While doing performance analysis, build log
may not be available hence it is required to have it on disk somewhere.

And text format is not suitable because of two reasons:
1) It is verbose. Try -opt_report in ICC.
2) This info is consumed by other tools (e.g. IDE, performance analyzer).
It makes sense for a tool like Shark to use dwarf reader to get this info
then parse raw text output.

So, if
1) we need to keep this info on disk and available with final binary
and 2) we use binary format to encode this info)
then dwarf in object file is a natural selection.

Command line developer can use extended dwarf reader to get the text
messages.

-
Devang

Reply via email to