Back to index

glibc  2.9
Defines
hp-timing.h File Reference
#include <sysdeps/i386/i686/hp-timing.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define HP_TIMING_NOW(Var)
#define HP_TIMING_ACCUM(Sum, Diff)

Define Documentation

#define HP_TIMING_ACCUM (   Sum,
  Diff 
)
Value:
do {                                                                 \
    hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);              \
    __asm__ __volatile__ ("lock; addq %1, %0"                               \
                       : "=m" (Sum) : "r" (__diff), "m" (Sum));             \
  } while (0)

Definition at line 34 of file hp-timing.h.

#define HP_TIMING_NOW (   Var)
Value:
({ unsigned int _hi, _lo; \
     asm volatile ("rdtsc" : "=a" (_lo), "=d" (_hi)); \
     (Var) = ((unsigned long long int) _hi << 32) | _lo; })

Definition at line 27 of file hp-timing.h.