diff options
author | SeongJae Park <sj@kernel.org> | 2024-04-14 10:09:55 -0700 |
---|---|---|
committer | SeongJae Park <sj@kernel.org> | 2024-04-14 10:09:55 -0700 |
commit | 4af3ac28056104f2f215495e27469e708ca87f02 (patch) | |
tree | f5e6c4ac961eb611b2701cfd32803fba06faf989 | |
parent | cddee723f7bc1eb150e25efa2a2dffc929bd5992 (diff) | |
download | damo-4af3ac28056104f2f215495e27469e708ca87f02.tar.gz |
_damo_records/MemFootprintsSnapshot: Support constructor without argument
Signed-off-by: SeongJae Park <sj@kernel.org>
-rw-r--r-- | _damo_records.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/_damo_records.py b/_damo_records.py index 4cc7a0a2..54f50ab5 100644 --- a/_damo_records.py +++ b/_damo_records.py @@ -561,7 +561,10 @@ class MemFootprintsSnapshot: time = None footprints = None - def __init__(self, pids): + def __init__(self, pids=None): + if pids is None: + return + self.time = time.time() self.footprints = {} for pid in pids: |