This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gold patch] Add timers for each pass


Ian,

This patch adds separate timers for each of the three linker passes
(initial, middle, final). I find them useful for investigating (at a
coarse level) where --threads is helping.

It doesn't necessarily need to get checked in, but I thought I'd ask
if you think it could be generally useful.

For links out of tmpfs, it turns out that the entire speed up due to
multi-threading is in pass 3.

-cary


	* gold/gold.cc: Include timer.h.
	(queue_middle_tasks): Stamp time.
	(queue_final_tasks): Likewise.
	* gold/main.cc (main): Store timer in parameters.  Print timers
	for each pass.
	* gold/parameters.cc (Parameters::Parameters): Initialize timer_.
	(Parameters::set_timer): New function.
	(set_parameters_timer): New function.
	* gold/parameters.h (Parameters::set_timer): New function.
	(Parameters::timer): New function.
	(Parameters::timer_): New data member.
	(set_parameters_timer): New function.
	* gold/timer.cc (Timer::stamp): New function.
	(Timer::get_pass_time): New function.
	* gold/timer.h (Timer::stamp): New function.
	(Timer::get_pass_time): New function.
	(Timer::pass_times_): New data member.

Attachment: gold-pass-timers-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]