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

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

Issue 1403273002: Hookup --complete-timeline flag (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // |Thread::timeline_block_lock_| 83 // |Thread::timeline_block_lock_|
84 // |TimelineEventRecorder::lock_| 84 // |TimelineEventRecorder::lock_|
85 // 85 //
86 86
87 void Timeline::InitOnce() { 87 void Timeline::InitOnce() {
88 ASSERT(recorder_ == NULL); 88 ASSERT(recorder_ == NULL);
89 // Default to ring recorder being enabled. 89 // Default to ring recorder being enabled.
90 const bool use_ring_recorder = true; 90 const bool use_ring_recorder = true;
91 // Some flags require that we use the endless recorder. 91 // Some flags require that we use the endless recorder.
92 const bool use_endless_recorder = 92 const bool use_endless_recorder =
93 (FLAG_timeline_dir != NULL) || FLAG_timing; 93 (FLAG_timeline_dir != NULL) || FLAG_timing || FLAG_complete_timeline;
94 if (use_endless_recorder) { 94 if (use_endless_recorder) {
95 recorder_ = new TimelineEventEndlessRecorder(); 95 recorder_ = new TimelineEventEndlessRecorder();
96 } else if (use_ring_recorder) { 96 } else if (use_ring_recorder) {
97 recorder_ = new TimelineEventRingRecorder(); 97 recorder_ = new TimelineEventRingRecorder();
98 } 98 }
99 vm_stream_ = new TimelineStream(); 99 vm_stream_ = new TimelineStream();
100 vm_stream_->Init("VM", EnableStreamByDefault("VM"), NULL); 100 vm_stream_->Init("VM", EnableStreamByDefault("VM"), NULL);
101 // Global overrides. 101 // Global overrides.
102 #define ISOLATE_TIMELINE_STREAM_FLAG_DEFAULT(name, not_used) \ 102 #define ISOLATE_TIMELINE_STREAM_FLAG_DEFAULT(name, not_used) \
103 stream_##name##_enabled_ = false; 103 stream_##name##_enabled_ = false;
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 // If an isolate was specified, skip events from other isolates. 1467 // If an isolate was specified, skip events from other isolates.
1468 continue; 1468 continue;
1469 } 1469 }
1470 ASSERT(event->event_as_json() != NULL); 1470 ASSERT(event->event_as_json() != NULL);
1471 result = zone->ConcatStrings(result, event->event_as_json()); 1471 result = zone->ConcatStrings(result, event->event_as_json());
1472 } 1472 }
1473 return result; 1473 return result;
1474 } 1474 }
1475 1475
1476 } // namespace dart 1476 } // 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