cpudist: Protect against potentially negative time deltas
authorSasha Goldshtein <goldshtn@gmail.com>
Thu, 30 Jun 2016 17:46:27 +0000 (10:46 -0700)
committerSasha Goldshtein <goldshtn@gmail.com>
Thu, 30 Jun 2016 17:46:27 +0000 (10:46 -0700)
commitbee8d36060fa6c5a6887c263ff6c1bc07f639794
tree00928ac72eb21023258af59bc38f74619133307a
parent06d90d3d4b35815027b7b7a7fc48167d497d2de3
cpudist: Protect against potentially negative time deltas

It seems from experimentation that the calculated timestamps between
on- and off-CPU switch events can produce incorrect results, with a
later event having a smaller timestamp. Discard events when the
resulting delta time would be negative.
tools/cpudist.py