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

Side by Side Diff: runtime/vm/timeline.cc

Issue 1899273002: Fix --startup-timeline (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <cstdlib> 5 #include <cstdlib>
6 6
7 #include "vm/atomic.h" 7 #include "vm/atomic.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/json_stream.h" 9 #include "vm/json_stream.h"
10 #include "vm/lockers.h" 10 #include "vm/lockers.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // |Thread::timeline_block_lock_| 78 // |Thread::timeline_block_lock_|
79 // |TimelineEventRecorder::lock_| 79 // |TimelineEventRecorder::lock_|
80 // 80 //
81 81
82 82
83 static TimelineEventRecorder* CreateTimelineRecorder() { 83 static TimelineEventRecorder* CreateTimelineRecorder() {
84 // Some flags require that we use the endless recorder. 84 // Some flags require that we use the endless recorder.
85 const bool use_endless_recorder = 85 const bool use_endless_recorder =
86 (FLAG_timeline_dir != NULL) || FLAG_timing || FLAG_complete_timeline; 86 (FLAG_timeline_dir != NULL) || FLAG_timing || FLAG_complete_timeline;
87 87
88 const bool use_startup_recorder = FLAG_startup_timeline;
89
88 const char* flag = FLAG_timeline_recorder; 90 const char* flag = FLAG_timeline_recorder;
89 91
90 if (use_endless_recorder || (flag != NULL)) { 92 if (use_endless_recorder || (flag != NULL)) {
91 if (use_endless_recorder || strcmp("endless", flag) == 0) { 93 if (use_endless_recorder || (strcmp("endless", flag) == 0)) {
92 if (FLAG_trace_timeline) { 94 if (FLAG_trace_timeline) {
93 THR_Print("Using the endless timeline recorder.\n"); 95 THR_Print("Using the endless timeline recorder.\n");
94 } 96 }
95 return new TimelineEventEndlessRecorder(); 97 return new TimelineEventEndlessRecorder();
96 } 98 }
99 }
97 100
98 if (strcmp("startup", flag) == 0) { 101 if (use_startup_recorder || (flag != NULL)) {
102 if (use_startup_recorder || (strcmp("startup", flag) == 0)) {
99 if (FLAG_trace_timeline) { 103 if (FLAG_trace_timeline) {
100 THR_Print("Using the startup recorder.\n"); 104 THR_Print("Using the startup recorder.\n");
101 } 105 }
102 return new TimelineEventStartupRecorder(); 106 return new TimelineEventStartupRecorder();
103 } 107 }
104 } 108 }
105 109
106 if (FLAG_trace_timeline) { 110 if (FLAG_trace_timeline) {
107 THR_Print("Using the ring timeline recorder.\n"); 111 THR_Print("Using the ring timeline recorder.\n");
108 } 112 }
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 TimelineEventBlock* TimelineEventBlockIterator::Next() { 1587 TimelineEventBlock* TimelineEventBlockIterator::Next() {
1584 ASSERT(current_ != NULL); 1588 ASSERT(current_ != NULL);
1585 TimelineEventBlock* r = current_; 1589 TimelineEventBlock* r = current_;
1586 current_ = current_->next(); 1590 current_ = current_->next();
1587 return r; 1591 return r;
1588 } 1592 }
1589 1593
1590 #endif // !PRODUCT 1594 #endif // !PRODUCT
1591 1595
1592 } // namespace dart 1596 } // namespace dart
OLDNEW
« 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