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

Unified Diff: runtime/vm/timeline.cc

Issue 1975713003: Only call OS::GetCurrentThreadCPUMicros when a TimelineDurationScope is enabled (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/timeline.cc
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index 54735a033f58610559c46398fb94394358fb0200..4eea19e91427cf9d831275bb2b97fe45104385b7 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -884,7 +884,7 @@ void TimelineEventScope::StealArguments(TimelineEvent* event) {
TimelineDurationScope::TimelineDurationScope(TimelineStream* stream,
const char* label)
: TimelineEventScope(stream, label) {
- if (!FLAG_support_timeline) {
+ if (!FLAG_support_timeline || !enabled()) {
return;
}
timestamp_ = OS::GetCurrentMonotonicMicros();
@@ -896,7 +896,7 @@ TimelineDurationScope::TimelineDurationScope(Thread* thread,
TimelineStream* stream,
const char* label)
: TimelineEventScope(thread, stream, label) {
- if (!FLAG_support_timeline) {
+ if (!FLAG_support_timeline || !enabled()) {
return;
}
timestamp_ = OS::GetCurrentMonotonicMicros();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698