[cachetop] fix stats computation per processes. (#635)
authorchantra <chantra@users.noreply.github.com>
Fri, 29 Jul 2016 21:10:15 +0000 (14:10 -0700)
committer4ast <alexei.starovoitov@gmail.com>
Fri, 29 Jul 2016 21:10:15 +0000 (14:10 -0700)
commita2d669c53fd541cb08c3537037935d797142de90
tree11e81a40ec6ea8a89e18addfd7708a62dc3ce946
parent31ded5205c6aff238a9ae46d7cca3fe1e7508b60
[cachetop] fix stats computation per processes. (#635)

The current logic was only initializing page accesses, mark dirty.. at
the beginning of the method, preventing counters to be ever reset for
each PIDs.

Piggyback https://github.com/iovisor/bcc/pull/615#discussion_r71056842

Tested by running both tools manually.
tools/cachestat.py
tools/cachetop.py