[Patch] Fix 'make bench' on MIPS where HP_TIMING_AVAIL is not defined
Ondřej Bílka
neleai@seznam.cz
Wed Nov 13 09:59:00 GMT 2013
On Tue, Nov 12, 2013 at 01:11:05PM -0800, Steve Ellcey wrote:
> 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?
>
Adding appropriate header is considered obvious.
> 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