aboutsummaryrefslogtreecommitdiff
path: root/gold/parameters.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-10-18 00:06:10 +0000
committerCary Coutant <ccoutant@google.com>2011-10-18 00:06:10 +0000
commitb490c0bbaf81fb741c6751eff30082883343e2ff (patch)
treefbfdd4a8a314245629467b77cc7fa4203fac6a23 /gold/parameters.h
parent41835e6a39b581ab4f7fba25e02aba01e50a8521 (diff)
downloadgdb-b490c0bbaf81fb741c6751eff30082883343e2ff.zip
gdb-b490c0bbaf81fb741c6751eff30082883343e2ff.tar.gz
gdb-b490c0bbaf81fb741c6751eff30082883343e2ff.tar.bz2
* 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.
Diffstat (limited to 'gold/parameters.h')
-rw-r--r--gold/parameters.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/parameters.h b/gold/parameters.h
index 09b0516..10de2ae 100644
--- a/gold/parameters.h
+++ b/gold/parameters.h
@@ -28,6 +28,7 @@ namespace gold
class General_options;
class Errors;
+class Timer;
class Target;
template<int size, bool big_endian>
class Sized_target;
@@ -57,6 +58,9 @@ class Parameters
set_errors(Errors* errors);
void
+ set_timer(Timer* timer);
+
+ void
set_options(const General_options* options);
void
@@ -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_;
@@ -196,6 +206,9 @@ extern void
set_parameters_errors(Errors* errors);
extern void
+set_parameters_timer(Timer* timer);
+
+extern void
set_parameters_options(const General_options* options);
extern void