mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 18:41:27 +00:00
* gold.cc: Include timer.h.
(queue_middle_tasks): Stamp time. (queue_final_tasks): Likewise. * main.cc (main): Store timer in parameters. Print timers for each pass. * parameters.cc (Parameters::Parameters): Initialize timer_. (Parameters::set_timer): New function. (set_parameters_timer): New function. * parameters.h (Parameters::set_timer): New function. (Parameters::timer): New function. (Parameters::timer_): New data member. (set_parameters_timer): New function. * timer.cc (Timer::stamp): New function. (Timer::get_pass_time): New function. * timer.h (Timer::stamp): New function. (Timer::get_pass_time): New function. (Timer::pass_times_): New data member.
This commit is contained in:
@@ -28,6 +28,7 @@ namespace gold
|
||||
|
||||
class General_options;
|
||||
class Errors;
|
||||
class Timer;
|
||||
class Target;
|
||||
template<int size, bool big_endian>
|
||||
class Sized_target;
|
||||
@@ -56,6 +57,9 @@ class Parameters
|
||||
void
|
||||
set_errors(Errors* errors);
|
||||
|
||||
void
|
||||
set_timer(Timer* timer);
|
||||
|
||||
void
|
||||
set_options(const General_options* options);
|
||||
|
||||
@@ -70,6 +74,11 @@ class Parameters
|
||||
errors() const
|
||||
{ return this->errors_; }
|
||||
|
||||
// Return the timer object.
|
||||
Timer*
|
||||
timer() const
|
||||
{ return this->timer_; }
|
||||
|
||||
// Whether the options are valid. This should not normally be
|
||||
// called, but it is needed by gold_exit.
|
||||
bool
|
||||
@@ -177,6 +186,7 @@ class Parameters
|
||||
friend class Set_parameters_target_once;
|
||||
|
||||
Errors* errors_;
|
||||
Timer* timer_;
|
||||
const General_options* options_;
|
||||
Target* target_;
|
||||
bool doing_static_link_valid_;
|
||||
@@ -195,6 +205,9 @@ extern const Parameters* parameters;
|
||||
extern void
|
||||
set_parameters_errors(Errors* errors);
|
||||
|
||||
extern void
|
||||
set_parameters_timer(Timer* timer);
|
||||
|
||||
extern void
|
||||
set_parameters_options(const General_options* options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user