[gold][patch] Add more timing information

Rafael Espindola espindola@google.com
Wed Dec 16 23:21:00 GMT 2009


The attached patch adds an utility class Timer which uses some ideas
from gcc's timevar.c. The patch also uses Timer to report user, system
and wall time of each task and of the full run.

Things to note:
*) Timer uses "times" or get_run_time. Not as portable as timevar.c but not a
regression since gold used only get_run_time before.
*) The resolution of times is not very good, but getting better wall time would
require a second syscall.

2009-12-16  Rafael Avila de Espindola  <espindola@google.com>

	* Makefile.am (CCFILES): Add timer.cc.
	(HFILES): Add timer.h.
	* configure.ac: Check for sysconf and times.
	* main.cc: include timer.h.
	(main): Use Timer instead of get_run_time.
	* timer.cc: New.
	* timer.h: New.
	* workqueue.cc: include timer.h.
	(Workqueue::find_and_run_task):
	Report user, sys and wall time.
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
	* configure: Regenerate.

Cheers,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timer.patch
Type: text/x-patch
Size: 8595 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20091216/3a8cd001/attachment.bin>


More information about the Binutils mailing list