Go to the documentation of this file.
14 #include <sys/prctl.h>
21 # define PR_TSC_ENABLE 1
22 # define PR_TSC_SIGSEGV 2
35 __asm__ __volatile__ (
"rdtsc" :
"=a" (lo),
"=d" (hi));
44 printf(
"prctl(PR_GET_TSC, &tsc_val); ");
51 printf(
"prctl(PR_SET_TSC, PR_TSC_ENABLE)\n");
65 printf(
"rdtsc() == %llu\n", (
unsigned long long)
rdtsc());
66 printf(
"prctl(PR_GET_TSC, &tsc_val); ");
73 printf(
"rdtsc() == %llu\n", (
unsigned long long)
rdtsc());
74 printf(
"prctl(PR_SET_TSC, PR_TSC_ENABLE)\n");
80 printf(
"rdtsc() == %llu\n", (
unsigned long long)
rdtsc());
81 printf(
"prctl(PR_SET_TSC, PR_TSC_SIGSEGV)\n");