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

Unified Diff: systrace/systrace/tracing_agents/atrace_agent.py

Issue 2391383004: Update systrace and profile_chrome's default agent behavior (Closed)
Patch Set: Created 4 years, 2 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
Index: systrace/systrace/tracing_agents/atrace_agent.py
diff --git a/systrace/systrace/tracing_agents/atrace_agent.py b/systrace/systrace/tracing_agents/atrace_agent.py
index 12ad8bf2de4b7c711088661379f242776f1c9efa..08d771f98dc8ea8ed492e9a928c82b673ad85ea6 100644
--- a/systrace/systrace/tracing_agents/atrace_agent.py
+++ b/systrace/systrace/tracing_agents/atrace_agent.py
@@ -79,6 +79,9 @@ def try_create_agent(config):
if config.from_file is not None:
return None
+ if not config.atrace_categories:
+ return None
+
# Check device SDK version.
device_sdk_version = util.get_device_sdk_version()
if device_sdk_version <= 17:
@@ -155,12 +158,11 @@ class AtraceAgent(tracing_agents.TracingAgent):
@py_utils.Timeout(tracing_agents.START_STOP_TIMEOUT)
def StartAgentTracing(self, config, timeout=None):
+ assert config.atrace_categories, 'Atrace categories are missing!'
self._config = config
self._categories = config.atrace_categories
if isinstance(self._categories, list):
self._categories = ','.join(self._categories)
- if not self._categories:
- self._categories = DEFAULT_CATEGORIES
avail_cats = get_available_categories(config)
unavailable = [x for x in self._categories.split(',') if
x not in avail_cats]
« systrace/profile_chrome/chrome_tracing_agent.py ('K') | « systrace/systrace/run_systrace.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698