diff options
author | John Reck <jreck@google.com> | 2015-08-20 10:32:36 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2015-08-20 10:32:36 -0700 |
commit | 18bf01338597fb5cd3775e93d54c43143042441a (patch) | |
tree | 4aaa39560208b29ea2b356be0ffe59788a78f549 | |
parent | a7946b36d7115dfaad5510119808a7e899bff4f1 (diff) | |
download | chromium-trace-18bf01338597fb5cd3775e93d54c43143042441a.tar.gz |
Double the default buffer size if sched is set
sched is especially talkative and the default buffer
size of 2048kb is not quite cutting it anymore, so if
an explicit buffer size is not set double the default
size if sched is enabled
Change-Id: I0fa46dafb2ad8253a173ab38556721ba2017117e
-rw-r--r-- | agents/atrace_agent.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/agents/atrace_agent.py b/agents/atrace_agent.py index 1581e074..897059d2 100644 --- a/agents/atrace_agent.py +++ b/agents/atrace_agent.py @@ -78,6 +78,8 @@ class AtraceAgent(systrace_agent.SystraceAgent): self._expect_trace = False self._adb = None self._trace_data = None + if not self._categories: + self._categories = get_default_categories(self._options.device_serial) def start(self): tracer_args = self._construct_trace_command() @@ -110,8 +112,6 @@ class AtraceAgent(systrace_agent.SystraceAgent): if self._options.kfuncs is not None: extra_args.extend(['-k', self._options.kfuncs]) - if not self._categories: - self._categories = get_default_categories(self._options.device_serial) extra_args.extend(self._categories) return extra_args @@ -142,6 +142,10 @@ class AtraceAgent(systrace_agent.SystraceAgent): if ((self._options.trace_buf_size is not None) and (self._options.trace_buf_size > 0)): atrace_args.extend(['-b', str(self._options.trace_buf_size)]) + elif 'sched' in self._categories: + # 'sched' is a high-volume tag, double the default buffer size + # to accommodate that + atrace_args.extend(['-b', '4096']) extra_args = self._construct_extra_trace_command() atrace_args.extend(extra_args) |