Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: tools/deep_memory_profiler/dmprof.py

Issue 15948004: Fix a case 'submatched_dict' may include a key with None value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698