diff options
author | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-29 07:56:16 +0000 |
---|---|---|
committer | dmikurube@chromium.org <dmikurube@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-29 07:56:16 +0000 |
commit | 1226c7ff54227301a4eb9a8d3bd1377b0a501848 (patch) | |
tree | 27501562fa50bcbcc15951030f4610385f286743 /tools/deep_memory_profiler | |
parent | 7b1bb2072d15c31bbe72d304918e2bfc371950e9 (diff) | |
download | chromium_src-1226c7ff54227301a4eb9a8d3bd1377b0a501848.zip chromium_src-1226c7ff54227301a4eb9a8d3bd1377b0a501848.tar.gz chromium_src-1226c7ff54227301a4eb9a8d3bd1377b0a501848.tar.bz2 |
Fix a case 'submatched_dict' may include a key with None value.
BUG=None
NOTRY=True
TBR=peria@chromium.org
Review URL: https://codereview.chromium.org/15948004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/deep_memory_profiler')
-rw-r--r-- | tools/deep_memory_profiler/dmprof.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/deep_memory_profiler/dmprof.py b/tools/deep_memory_profiler/dmprof.py index 2726ae8..092e8ec 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), |