Sometimes I encounter code that reads TSC with rdtsc
instruction, but calls cpuid
right before.
Why is calling cpuid
necessary? I realize it may have something to do with different cores having TSC values, but what exactly happens when you call those two instructions in sequence?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…