Chromium Code Reviews| Index: tools/perf/measurements/oilpan_gc_times.py |
| diff --git a/tools/perf/measurements/oilpan_gc_times.py b/tools/perf/measurements/oilpan_gc_times.py |
| index 49e0a2e382c999880fb74c11ad414d30b31fb5a9..95b015ee50ea05cffbfa0c78136c7218b01e392e 100644 |
| --- a/tools/perf/measurements/oilpan_gc_times.py |
| +++ b/tools/perf/measurements/oilpan_gc_times.py |
| @@ -27,7 +27,7 @@ _NAMES_TO_DUMP = ['oilpan_precise_mark', |
| 'oilpan_conservative_complete_sweep', |
| 'oilpan_coalesce'] |
| -def _AddTracingResults(events, results): |
| +def _AddTracingResults(events, include_forced_gc, results): |
| # Prepare |
| values = {} |
| for name in _NAMES_TO_DUMP: |
| @@ -45,7 +45,7 @@ def _AddTracingResults(events, results): |
| values['oilpan_coalesce'].append(duration) |
| continue |
| if event.name == 'Heap::collectGarbage': |
| - if not gc_type is None and not forced: |
| + if not gc_type is None and (not forced or include_forced_gc): |
| values['oilpan_%s_mark' % gc_type].append(mark_time) |
| values['oilpan_%s_lazy_sweep' % gc_type].append(lazy_sweep_time) |
| values['oilpan_%s_complete_sweep' % gc_type].append(complete_sweep_time) |
| @@ -63,7 +63,7 @@ def _AddTracingResults(events, results): |
| complete_sweep_time += duration |
| continue |
| - if not gc_type is None and not forced: |
| + if not gc_type is None and (not forced or include_forced_gc): |
| values['oilpan_%s_mark' % gc_type].append(mark_time) |
| values['oilpan_%s_lazy_sweep' % gc_type].append(lazy_sweep_time) |
| values['oilpan_%s_complete_sweep' % gc_type].append(complete_sweep_time) |
| @@ -106,9 +106,10 @@ def _AddTracingResults(events, results): |
| class _OilpanGCTimesBase(page_test.PageTest): |
| - def __init__(self, action_name = ''): |
| + def __init__(self, action_name = '', include_forced_gc = False): |
|
Sami
2015/03/02 12:37:59
nit: no spaces around the '=' for default paramete
peria
2015/03/09 08:03:25
Done.
|
| super(_OilpanGCTimesBase, self).__init__(action_name) |
| self._timeline_model = None |
| + self._include_forced_gc = include_forced_gc |
| def WillNavigateToPage(self, page, tab): |
| # FIXME: Remove webkit.console when blink.console lands in chromium and |
| @@ -130,7 +131,7 @@ class _OilpanGCTimesBase(page_test.PageTest): |
| threads = self._timeline_model.GetAllThreads() |
| for thread in threads: |
| if thread.name == _CR_RENDERER_MAIN: |
| - _AddTracingResults(thread.all_slices, results) |
| + _AddTracingResults(thread.all_slices, self._include_forced_gc, results) |
| def CleanUpAfterPage(self, page, tab): |
| if tab.browser.platform.tracing_controller.is_tracing_running: |
| @@ -170,7 +171,7 @@ class OilpanGCTimesForBlinkPerf(_OilpanGCTimesBase): |
| class OilpanGCTimesForInternals(_OilpanGCTimesBase): |
| def __init__(self): |
| - super(OilpanGCTimesForInternals, self).__init__() |
| + super(OilpanGCTimesForInternals, self).__init__(include_forced_gc = True) |
|
Sami
2015/03/02 12:37:59
No spaces here either.
peria
2015/03/09 08:03:25
Done.
|
| @classmethod |
| def CustomizeBrowserOptions(cls, options): |