[zeromq-dev] [PATCH] zmq::clock_t : return correct value in rdtsc() on solaris
Martin Pales
m.pales at gmail.com
Thu Oct 14 16:04:21 CEST 2010
On Thu, Oct 14, 2010 at 3:15 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> On 10/14/2010 03:08 PM, Martin Sustrik wrote:
>
>> Hi Martin,
>>
>> the attached patch ensures that a correct rdtsc value is returned when
>>> compiled
>>> with sunstudio 12 compiler.
>>>
>>
>> Just a check: This is a performance patch, right? The codebase still
>> works with sunstudio, even without this patch?
>>
>
Correct, it's a performance patch. Previously, the rdtsc() function
returned 0 in my case, thus now_us() was used in now_ms() instead.
Now, an inline assembly code is in place.
>
> Also, you should check for the platform (x86 or x86-64). I would expect
> that sunstudio works with platforms that have no rdtsc instruction -- such
> as SPARC.
>
>
True. I also added platform checks. See the updated patch attached.
Martin
> Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101014/e10da81d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-zmq-clock_t-return-correct-value-in-rdtsc-on-solaris.patch
Type: application/octet-stream
Size: 1065 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101014/e10da81d/attachment.obj>
More information about the zeromq-dev
mailing list