This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/6] Refactor hp-timing rtld usage
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Fri, 15 Feb 2019 12:09:55 +0000
- Subject: Re: [PATCH 5/6] Refactor hp-timing rtld usage
- References: <20190208183343.29914-1-adhemerval.zanella@linaro.org> <20190208183343.29914-5-adhemerval.zanella@linaro.org> <HE1PR08MB1035E53604BB93C6B9DF83DF83670@HE1PR08MB1035.eurprd08.prod.outlook.com>,<87bm3dl1li.fsf@oldenburg2.str.redhat.com>
Hi Florian,
>> The first would declare and initialize the accumulator to zero, while start/stop
>> accumulate directly into it without requiring extra temporaries and explicit diff
>> and accumulate steps. What do you think?
>
> Can we avoid the preprocessor magic altogether? What's the value in
> that?
You need something to compile without timer support without unused
variable errors. We could use inline functions like this to make the code
look even cleaner:
rtld_timer_t load_time = 0;
rtld_timer_start (&load_time);
rtld_timer_stop (&load_time);
The same could be done for hp-timing and benchtests.
Wilco