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

Unified Diff: tools/perf/measurements/oilpan_gc_times.py

Issue 968773002: [Oilpan] Measure time for forced/idle GC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and work for a nit Created 5 years, 10 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/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):
« 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