Matt Turner <[email protected]> writes:

>>  static inline uint64_t
>>  oil_profile_stamp_rdtsc (void)
>>  {
>> -    uint64_t ts;
>> +    uint32_t hi, lo;
>>
>> -    __asm__ __volatile__ ("rdtsc\n" : "=A" (ts));
>> -    return ts;
>> +    __asm__ __volatile__ ("rdtsc\n" : "=a" (lo), "=d" (hi));
>> +
>> +    return lo | (((uint64_t)hi) << 32);
>>  }
>>
>>  #define OIL_STAMP oil_profile_stamp_rdtsc
>> --
>> 1.6.0.6
>
> Interesting. What were the symptoms of this bug?

The oil_profile_stamp_rdtsc() function is only used when --enable-timers
is used on the configure command line. In that case, the macros
TIMER_BEGIN() and TIMER_END() are defined. They can be used around a
piece of code and when the application exits some statistics will be
printed.

The symptoms were random crashes on 64 bit systems when this feature was
used.


Soren
_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to