* Return the current value of the fine-grain CPU cycle counter * (accessed via the RDTSC instruction). */
| 94 | * (accessed via the RDTSC instruction). |
| 95 | */ |
| 96 | static __inline __attribute__((always_inline)) |
| 97 | uint64_t |
| 98 | rdtsc() |
| 99 | { |
| 100 | uint32_t lo, hi; |
| 101 | __asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi)); |
| 102 | return (((uint64_t)hi << 32) | lo); |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Return the current value of the fine-grain CPU cycle counter |
no outgoing calls