brendangregg / perf-tools

Performance analysis tools based on Linux perf_events (aka perf) and ftrace
GNU General Public License v2.0
9.9k stars 1.64k forks source link

Negative number of hits when using cachestat #110

Open sunhongmin225 opened 2 years ago

sunhongmin225 commented 2 years ago

Thanks for your wonderful performance tools - I am happily using them for my studies.

However, I sometimes find negative number of hits printed in my terminal when using cachestat. How is this possible, and how should I interpret this number? Could it be the problem of possible overflow? Below is the output that I've encountered.

Counting cache functions... Output every 5 seconds.
TIME         HITS   MISSES  DIRTIES    RATIO   BUFFERS_MB   CACHE_MB  DEBUG
06:29:25    15198    59372      500    20.4%         1094       5754  (75070 500 59871 499)
06:29:30    36746    58014      827    38.8%         1126       5953  (95587 827 58841 827)
06:29:35     8498    21626      307    28.2%         1147       6029  (30431 307 21932 306)
06:29:40   -13710    29487      172   -86.9%         1158       6134  (15949 172 29659 172)
06:29:45   -16377    28720      125  -132.7%         1168       6237  (12468 125 28845 125)
06:29:50   -22167    34690      276  -177.0%         1182       6360  (12799 276 34966 276)
06:29:55    21356    21934     3172    49.3%         1213       6428  (46462 3172 25106 3172)
Eric3495 commented 2 years ago

邮件发到~~