Index: tools/deep_memory_profiler/dmprof.py |
diff --git a/tools/deep_memory_profiler/dmprof.py b/tools/deep_memory_profiler/dmprof.py |
index 2726ae876be7964f75673fc002a177a99c9d52aa..092e8ec5a3e52da0244b7c2152a6b9875456ba67 100644 |
--- a/tools/deep_memory_profiler/dmprof.py |
+++ b/tools/deep_memory_profiler/dmprof.py |
@@ -1036,13 +1036,13 @@ class Dump(object): |
submatched_dict = submatched.groupdict() |
region_info = { 'vma': current_vma } |
- if 'TYPE' in submatched_dict: |
+ if submatched_dict.get('TYPE'): |
region_info['type'] = submatched_dict['TYPE'].strip() |
- if 'COMMITTED' in submatched_dict: |
+ if submatched_dict.get('COMMITTED'): |
region_info['committed'] = int(submatched_dict['COMMITTED']) |
- if 'RESERVED' in submatched_dict: |
+ if submatched_dict.get('RESERVED'): |
region_info['reserved'] = int(submatched_dict['RESERVED']) |
- if 'BUCKETID' in submatched_dict: |
+ if submatched_dict.get('BUCKETID'): |
region_info['bucket_id'] = int(submatched_dict['BUCKETID']) |
self._map[(int(matched.group(2), 16), |