OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import cStringIO | 5 import cStringIO |
6 import json | 6 import json |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import re | 9 import re |
10 | 10 |
11 from lib.ordered_dict import OrderedDict | 11 from lib.ordered_dict import OrderedDict |
12 | 12 |
13 | 13 |
14 LOGGER = logging.getLogger('dmprof') | 14 LOGGER = logging.getLogger('dmprof') |
15 | 15 |
16 BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 16 BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
17 | 17 |
18 DEFAULT_SORTERS = [ | 18 DEFAULT_SORTERS = [ |
19 os.path.join(BASE_PATH, 'sorters', 'malloc.browser-module.json'), | 19 os.path.join(BASE_PATH, 'sorters', 'malloc.browser-module.json'), |
20 os.path.join(BASE_PATH, 'sorters', 'malloc.renderer-module.json'), | 20 os.path.join(BASE_PATH, 'sorters', 'malloc.renderer-module.json'), |
21 os.path.join(BASE_PATH, 'sorters', 'malloc.type.json'), | 21 os.path.join(BASE_PATH, 'sorters', 'malloc.type.json'), |
22 os.path.join(BASE_PATH, 'sorters', 'malloc.WebCore.json'), | 22 os.path.join(BASE_PATH, 'sorters', 'malloc.blink.json'), |
23 os.path.join(BASE_PATH, 'sorters', 'vm.Android-specific.json'), | 23 os.path.join(BASE_PATH, 'sorters', 'vm.Android-specific.json'), |
24 os.path.join(BASE_PATH, 'sorters', 'vm.base.json'), | 24 os.path.join(BASE_PATH, 'sorters', 'vm.base.json'), |
25 os.path.join(BASE_PATH, 'sorters', 'vm.GPU.json'), | 25 os.path.join(BASE_PATH, 'sorters', 'vm.GPU.json'), |
26 os.path.join(BASE_PATH, 'sorters', 'vm.sharing.json'), | 26 os.path.join(BASE_PATH, 'sorters', 'vm.sharing.json'), |
27 os.path.join(BASE_PATH, 'sorters', 'vm.Skia.json'), | 27 os.path.join(BASE_PATH, 'sorters', 'vm.Skia.json'), |
28 os.path.join(BASE_PATH, 'sorters', 'vm.V8.json'), | 28 os.path.join(BASE_PATH, 'sorters', 'vm.V8.json'), |
29 ] | 29 ] |
30 | 30 |
31 DEFAULT_TEMPLATES = os.path.join(BASE_PATH, 'templates.json') | 31 DEFAULT_TEMPLATES = os.path.join(BASE_PATH, 'templates.json') |
32 | 32 |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 for sorter in sorters: | 466 for sorter in sorters: |
467 yield sorter | 467 yield sorter |
468 | 468 |
469 def iter_world(self, world): | 469 def iter_world(self, world): |
470 for sorter in self._sorters.get(world, []): | 470 for sorter in self._sorters.get(world, []): |
471 yield sorter | 471 yield sorter |
472 | 472 |
473 @property | 473 @property |
474 def templates(self): | 474 def templates(self): |
475 return self._templates | 475 return self._templates |
OLD | NEW |