| Index: tools/perf/metrics/timeline.py
|
| diff --git a/tools/perf/metrics/timeline.py b/tools/perf/metrics/timeline.py
|
| index 3442cab15b01b00604f22a2541f4df74825a0c7f..0b1bc4281a1954bd007cdd44297a6ba741b35438 100644
|
| --- a/tools/perf/metrics/timeline.py
|
| +++ b/tools/perf/metrics/timeline.py
|
| @@ -11,6 +11,18 @@ from telemetry.page import page_measurement
|
| TRACING_MODE = 'tracing-mode'
|
| TIMELINE_MODE = 'timeline-mode'
|
|
|
| +# All tracing categories not disabled-by-default
|
| +DEFAULT_TRACE_CATEGORIES = None
|
| +
|
| +# Categories for absolute minimum overhead tracing. This contains no
|
| +# sub-traces of thread tasks, so it's only useful for capturing the
|
| +# cpu-time spent on threads (as well as needed benchmark traces)
|
| +MINIMAL_TRACE_CATEGORIES = ("toplevel,"
|
| + "benchmark,"
|
| + "cc-benchmark,"
|
| + "webkit.console,"
|
| + "trace_event_overhead")
|
| +
|
|
|
| class MissingFramesError(page_measurement.MeasurementFailure):
|
| def __init__(self):
|
| @@ -24,6 +36,7 @@ class TimelineMetric(Metric):
|
| """
|
| super(TimelineMetric, self).__init__()
|
| assert mode in (TRACING_MODE, TIMELINE_MODE)
|
| + self.trace_categories = DEFAULT_TRACE_CATEGORIES
|
| self._mode = mode
|
| self._model = None
|
| self._renderer_process = None
|
| @@ -39,7 +52,7 @@ class TimelineMetric(Metric):
|
| if self._mode == TRACING_MODE:
|
| if not tab.browser.supports_tracing:
|
| raise Exception('Not supported')
|
| - tab.browser.StartTracing()
|
| + tab.browser.StartTracing(self.trace_categories)
|
| else:
|
| assert self._mode == TIMELINE_MODE
|
| tab.StartTimelineRecording()
|
| @@ -283,6 +296,7 @@ class ThreadTimesTimelineMetric(TimelineMetric):
|
| super(ThreadTimesTimelineMetric, self).__init__(TRACING_MODE)
|
| self.results_to_report = AllThreads
|
| self.details_to_report = NoThreads
|
| + self.trace_categories = MINIMAL_TRACE_CATEGORIES
|
|
|
| def CountSlices(self, slices, substring):
|
| count = 0
|
|
|