This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

* Wilco Dijkstra:

> 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.

I assumed we would get generic timer support?

> We could use inline functions like this to make the code
> look even cleaner:
> rtld_timer_t load_time = 0;

Or use rtld_timer_init (&load_time) if we aren't sure we'll be able to
use a zero initializatier in the future (but maybe that's overkill).

> rtld_timer_start (&load_time);
> rtld_timer_stop (&load_time);
> The same could be done for hp-timing and benchtests.

And then do `if (RTLD_TIMER_ENABLED)` around reporting the results or
something like that, where RTLD_TIMER_ENABLED is an enum constant.

I hope this won't be much additional effort, and avoids using the


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]