[Patch] Fix 'make bench' on MIPS where HP_TIMING_AVAIL is not defined
Steve Ellcey
sellcey@mips.com
Tue Nov 12 21:11:00 GMT 2013
I just tried running 'make bench' to do some performance testing on MIPS
and it failed because CLOCK_PROCESS_CPUTIME_ID was not defined in
benchtests/bench-timing.h. I fixed this by including time.h in the
section of code that gets compiled when HP_TIMING_AVAIL is not defined
(or USE_CLOCK_GETTIME is defined).
I was then able to run 'make bench'. OK to checkin?
Steve Ellcey
sellcey@mips.com
2013-11-12 Steve Ellcey <sellcey@mips.com>
* benchtests/bench-timing.h: Include time.h.
diff --git a/benchtests/bench-timing.h b/benchtests/bench-timing.h
index 48a8521..619994f 100644
--- a/benchtests/bench-timing.h
+++ b/benchtests/bench-timing.h
@@ -41,6 +41,8 @@ typedef hp_timing_t timing_t;
(min) / (d_iters), 1e6 * (d_total_i) / (d_total_s));
#else
+
+#include <time.h>
typedef uint64_t timing_t;
/* Measure the resolution of the clock so we can scale the number of
More information about the Libc-alpha
mailing list