int main() { u64 t1, t2; t1 = rdtsc(); t2 = rdtsc(); printf("rdtsc latency %lld\n", (unsigned)(t2 - t1)); test_wrtsc(0); test_wrtsc(100000000000ull); return 0; }
int main() { u64 t1, t2; t1 = rdtsc(); t2 = rdtsc(); printf("rdtsc latency %u\n", (unsigned)(t2 - t1)); test_wrtsc(0); test_wrtsc(100000000000ull); if (check_cpuid_80000001_edx(CPUID_80000001_EDX_RDTSCP)) { test_rdtscp(0); test_rdtscp(10); test_rdtscp(0x100); } else printf("rdtscp not supported\n"); return report_summary(); }