diff options
author | SeongJae Park <sj@kernel.org> | 2024-04-21 09:51:33 -0700 |
---|---|---|
committer | SeongJae Park <sj@kernel.org> | 2024-04-21 09:55:34 -0700 |
commit | e302633d18f864bbb1988966849e45dd9e00bd14 (patch) | |
tree | ec2a45ebcf9c9ce4653efd4865c0e245c4a39342 | |
parent | 176b497476a64303d0530ab29282c729bf255c61 (diff) | |
download | damo-e302633d18f864bbb1988966849e45dd9e00bd14.tar.gz |
damo_report_footprint: Calculate footprint in bytes
Signed-off-by: SeongJae Park <sj@kernel.org>
-rw-r--r-- | damo_report_footprint.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/damo_report_footprint.py b/damo_report_footprint.py index a8d50642..e7c3241e 100644 --- a/damo_report_footprint.py +++ b/damo_report_footprint.py @@ -84,17 +84,17 @@ def main(args): footprint_snapshots = _damo_records.load_mem_footprint(args.input) dists = [] for snapshot in footprint_snapshots: - footprint_pages = 0 + footprint_bytes = 0 for pid, fp in snapshot.footprints.items(): # ignore SysMemFootprint if pid is None: continue + # todo: get real page size of the system if args.metric == 'vsz': - footprint_pages += fp.size + footprint_bytes += fp.size * 4096 elif args.metric == 'rss': - footprint_pages += fp.resident - # todo: get real page size of the system - dists.append(footprint_pages * 4096) + footprint_bytes += fp.resident * 4096 + dists.append(footprint_bytes) if args.sortby == 'size': dists.sort() |