This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Patch] Fix 'make bench' on MIPS where HP_TIMING_AVAIL is not defined
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 13 Nov 2013 10:34:33 +0100
- Subject: Re: [Patch] Fix 'make bench' on MIPS where HP_TIMING_AVAIL is not defined
- Authentication-results: sourceware.org; auth=none
- References: <7a88fd9b-611f-4748-abdc-78ed762d152b at BAMAIL02 dot ba dot imgtec dot org>
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