[PATCH] x86: Support RDTSCP for benchtests
H.J. Lu
hjl.tools@gmail.com
Tue Oct 23 21:37:00 GMT 2018
On 10/23/18, Szabolcs Nagy <Szabolcs.Nagy@arm.com> wrote:
> On 23/10/18 11:58, H.J. Lu wrote:
>> On 10/23/18, Siddhesh Poyarekar <siddhesh@gotplt.org> wrote:
>>> On 23/10/18 2:34 PM, Florian Weimer wrote:
>>>> Shouldn't the benchtests use clock_gettime anyway, to avoid issues in
>>>> case the TSC is not synchronized across cores?
>>>
>>> There's an option USE_CLOCK_GETTIME to make benchtests do that, but
>>> otherwise it uses the hp_timing bits by default.
>>
>> I want something better that rdtsc and very low overhead since some bench
>> tests only last a few cycles. Adding lfence may make timing data look
>> like
>> noise.
>>
>
> ideally bench test should be fixed so clock_gettime gives
> stable enough results.
>
> target specific timers are not always available and their
> results are hard to interpret compared to a standard api
> that returns wall clock time in sane units.
>
Here is a simple patch to support RDTSCP for benchtests.
OK for trunk?
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Support-RDTSCP-for-benchtests.patch
Type: text/x-patch
Size: 3107 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20181023/b271ff5f/attachment.bin>
More information about the Libc-alpha
mailing list