Skip to content

Commit

Permalink
[vm, fuchsia] Allow for enabling trace categories through both traceu…
Browse files Browse the repository at this point in the history
…til 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 <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
  • Loading branch information
dnfield authored and commit-bot@chromium.org committed Jun 5, 2019
1 parent b079445 commit e81101e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runtime/vm/timeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit e81101e

Please sign in to comment.