intel_pt_tsc_cmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… intel_pt_tsc_cmp β€” the Kernel API Manual, bestie edition ✨

okay so real talk, this little function is from the Kernel API Manual and it's honestly such a tiny icon. It compares 7-byte TSCs. That's it. That's the whole vibe check. πŸŽ€


✨ NAME ✨

intel_pt_tsc_cmp β€” compare 7-byte TSCs. literally its whole job, no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

int intel_pt_tsc_cmp (uint64_t tsc1 , uint64_t tsc2 );

look at her go 😭 two uint64_t girlies walk in and one int walks out.


πŸ’– ARGUMENTS πŸ’–

  • tsc1 β€” first TSC to compare. the one who goes first, main character energy πŸ‘‘
  • tsc2 β€” second TSC to compare. the challenger, the rival, the plot twist 🌈

🧚 DESCRIPTION 🧚

So here's the tea β˜•: this function compares 7-byte TSC values, and it does it while allowing for the possibility that the TSC wrapped around. Yeah. It wrapped. It happens to the best of us. πŸ’€

But here's the part you need to know, bestie β€” generally it is not possible to know if TSC has wrapped around, so for that purpose this function just assumes the absolute difference is less than half the maximum difference. That's the assumption. That's the deal. She's doing her best with the info she has and honestly? slay. 🫢

fr fr, remember that's an assumption, not a magic trick β€” the manpage says so, and I'm just the messenger πŸ’Œ

πŸ”₯ RETURN πŸ”₯

  • -1 β€” if tsc1 is before tsc2 πŸ₯² (she came in early)
  • 0 β€” if tsc1 == tsc2 🫢 (they're literally the same, twin flames)
  • 1 β€” if tsc1 is after tsc2 πŸ”₯ (fashionably late, iconic)

πŸŽ€ SEE ALSO πŸŽ€

the whole friend group πŸ«‚ go say hi to all of them.


okay that's the page!! πŸ’œ this section was sourced from ./tools/perf/util/intel-pt-dec... and dated October 2026, so like… mark your calendars, bestie πŸ—“οΈβœ¨ mwah, study hard, and remember: 7-byte TSCs deserve love too. πŸ“πŸ’…

πŸ“¦ where this page comes from