diff --git a/tools/cpudist.py b/tools/cpudist.py index 6a0e04b5f50e..40ccfa0c099b 100755 --- a/tools/cpudist.py +++ b/tools/cpudist.py @@ -82,6 +82,11 @@ if (tsp == 0) return; + if (ts < *tsp) { + // Probably a clock issue where the recorded on-CPU event had a + // timestamp later than the recorded off-CPU event, or vice versa. + return; + } u64 delta = ts - *tsp; FACTOR STORE