Hacker News new | ask | show | jobs
by zerohp 4425 days ago
I don't know what he used, but its probably based on the model specific registers for performance counters. See Chapter 18 of the Intel 64 and IA-32 Architectures Software Developer's Manual.