OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 os | 5 import os |
6 | 6 |
7 from telemetry.page import action_runner | 7 from telemetry.page import action_runner |
8 from telemetry.page import page_test | 8 from telemetry.page import page_test |
9 from telemetry.timeline.model import TimelineModel | 9 from telemetry.timeline.model import TimelineModel |
10 from telemetry.timeline import tracing_config | 10 from telemetry.timeline import tracing_config |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 # Parse trace events | 65 # Parse trace events |
66 reason = None | 66 reason = None |
67 mark_time = 0 | 67 mark_time = 0 |
68 lazy_sweep_time = 0 | 68 lazy_sweep_time = 0 |
69 complete_sweep_time = 0 | 69 complete_sweep_time = 0 |
70 for event in events: | 70 for event in events: |
71 duration = event.thread_duration or event.duration | 71 duration = event.thread_duration or event.duration |
72 if event.name == 'ThreadHeap::coalesce': | 72 if event.name == 'ThreadHeap::coalesce': |
73 values['oilpan_coalesce'].append(duration) | 73 values['oilpan_coalesce'].append(duration) |
74 continue | 74 continue |
75 if event.name == 'BlinkGCMarking': | 75 if event.name == 'Heap::collectGarbage': |
76 if reason is not None: | 76 if reason is not None: |
77 values['oilpan_%s_mark' % reason].append(mark_time) | 77 values['oilpan_%s_mark' % reason].append(mark_time) |
78 values['oilpan_%s_lazy_sweep' % reason].append(lazy_sweep_time) | 78 values['oilpan_%s_lazy_sweep' % reason].append(lazy_sweep_time) |
79 values['oilpan_%s_complete_sweep' % reason].append(complete_sweep_time) | 79 values['oilpan_%s_complete_sweep' % reason].append(complete_sweep_time) |
80 | 80 |
81 reason = GetGcReason(event, async_slices) | 81 reason = GetGcReason(event, async_slices) |
82 mark_time = duration | 82 mark_time = duration |
83 lazy_sweep_time = 0 | 83 lazy_sweep_time = 0 |
84 complete_sweep_time = 0 | 84 complete_sweep_time = 0 |
85 continue | 85 continue |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 196 |
197 def __init__(self): | 197 def __init__(self): |
198 super(OilpanGCTimesForInternals, self).__init__() | 198 super(OilpanGCTimesForInternals, self).__init__() |
199 | 199 |
200 @classmethod | 200 @classmethod |
201 def CustomizeBrowserOptions(cls, options): | 201 def CustomizeBrowserOptions(cls, options): |
202 # 'expose-internals-for-testing' can be enabled on content shell. | 202 # 'expose-internals-for-testing' can be enabled on content shell. |
203 assert 'content-shell' in options.browser_type | 203 assert 'content-shell' in options.browser_type |
204 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', | 204 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', |
205 '--js-flags=--expose-gc']) | 205 '--js-flags=--expose-gc']) |
OLD | NEW |