1
0
Fork 0
alistair23-linux/tools/perf/arch/x86/util/tsc.c

14 lines
224 B
C

// SPDX-License-Identifier: GPL-2.0
#include <linux/types.h>
#include "../../../util/tsc.h"
u64 rdtsc(void)
{
unsigned int low, high;
asm volatile("rdtsc" : "=a" (low), "=d" (high));
return low | ((u64)high) << 32;
}