This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Fix sys time reporting
- From: Rafael Espindola <espindola at google dot com>
- To: Binutils <binutils at sourceware dot org>
- Cc: Chris Demetriou <cgd at google dot com>, Neil Vachharajani <nvachhar at google dot com>
- Date: Tue, 29 Dec 2009 18:48:17 -0500
- Subject: [patch] Fix sys time reporting
I committed the attached patch as obvious. Thanks to Chirs for noticing it.
2009-12-29 Rafael Espindola <espindola@google.com>
* main.cc (main): Fix the sys time reporting.
* workqueue.cc (Workqueue::find_and_run_task): Fix the sys time reporting.
Cheers,
--
Rafael Ãvila de EspÃndola
diff --git a/gold/main.cc b/gold/main.cc
index c9d0d79..5d6cbd5 100644
--- a/gold/main.cc
+++ b/gold/main.cc
@@ -254,7 +254,7 @@ main(int argc, char** argv)
"(user: %ld.%06ld sys: %ld.%06ld wall: %ld.%06ld)\n"),
program_name,
elapsed.user / 1000, (elapsed.user % 1000) * 1000,
- elapsed.sys / 1000, (elapsed.user % 1000) * 1000,
+ elapsed.sys / 1000, (elapsed.sys % 1000) * 1000,
elapsed.wall / 1000, (elapsed.wall % 1000) * 1000);
#ifdef HAVE_MALLINFO
diff --git a/gold/workqueue.cc b/gold/workqueue.cc
index c713dca..6449bba 100644
--- a/gold/workqueue.cc
+++ b/gold/workqueue.cc
@@ -327,7 +327,7 @@ Workqueue::find_and_run_task(int thread_number)
"(user: %ld.%06ld sys: %ld.%06ld wall: %ld.%06ld)",
thread_number, t->name().c_str(),
elapsed.user / 1000, (elapsed.user % 1000) * 1000,
- elapsed.sys / 1000, (elapsed.user % 1000) * 1000,
+ elapsed.sys / 1000, (elapsed.sys % 1000) * 1000,
elapsed.wall / 1000, (elapsed.wall % 1000) * 1000);
}