[PATCH 5/6] Refactor hp-timing rtld usage

Wilco Dijkstra Wilco.Dijkstra@arm.com
Fri Feb 15 12:10:00 GMT 2019


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


More information about the Libc-alpha mailing list