From e81101e37c915b01e53785829b238bb4819078b2 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Wed, 5 Jun 2019 21:55:11 +0000 Subject: [PATCH] [vm, fuchsia] Allow for enabling trace categories through both traceutil and the service protocol. This is needed so that we can make progress on using flutter drive tests on Fuchsia. Change-Id: Ifea0e4747c0cf28b85ad5a2eff20bdf361a10be3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104948 Reviewed-by: Ryan Macnak Reviewed-by: Zach Anderson Commit-Queue: Ryan Macnak --- runtime/vm/timeline.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h index 3fa4cff94bbe..9d4382436315 100644 --- a/runtime/vm/timeline.h +++ b/runtime/vm/timeline.h @@ -60,10 +60,14 @@ class TimelineStream { bool enabled() { #if defined(HOST_OS_FUCHSIA) && !defined(FUCHSIA_SDK) +#ifdef PRODUCT return trace_is_category_enabled(fuchsia_name_); +#else + return trace_is_category_enabled(fuchsia_name_) || enabled_ != 0; +#endif // PRODUCT #else return enabled_ != 0; -#endif +#endif // defined(HOST_OS_FUCHSIA) && !defined(FUCHSIA_SDK) } void set_enabled(bool enabled) { enabled_ = enabled ? 1 : 0; }