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

Side by Side Diff: runtime/observatory/lib/src/elements/cpu_profile.dart

Issue 2992893002: Reapply "[vm] Don't enable the profiler by default. Enable the profiler at startup with --observe, … (Closed)
Patch Set: native symbol resolver Created 3 years, 4 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library cpu_profile_element; 5 library cpu_profile_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'package:observatory/models.dart' as M; 9 import 'package:observatory/models.dart' as M;
10 import 'package:observatory/src/elements/cpu_profile/virtual_tree.dart'; 10 import 'package:observatory/src/elements/cpu_profile/virtual_tree.dart';
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 new NavRefreshElement(queue: _r.queue)..onRefresh.listen(_refresh), 103 new NavRefreshElement(queue: _r.queue)..onRefresh.listen(_refresh),
104 new NavRefreshElement(label: 'Clear', queue: _r.queue) 104 new NavRefreshElement(label: 'Clear', queue: _r.queue)
105 ..onRefresh.listen(_clearCpuProfile), 105 ..onRefresh.listen(_clearCpuProfile),
106 new NavNotifyElement(_notifications, queue: _r.queue) 106 new NavNotifyElement(_notifications, queue: _r.queue)
107 ]), 107 ]),
108 ]; 108 ];
109 if (_progress == null) { 109 if (_progress == null) {
110 children = content; 110 children = content;
111 return; 111 return;
112 } 112 }
113 content.add(new SampleBufferControlElement(_progress, _progressStream, 113 content.add(new SampleBufferControlElement(_vm, _progress, _progressStream,
114 selectedTag: _tag, queue: _r.queue) 114 selectedTag: _tag, queue: _r.queue)
115 ..onTagChange.listen((e) { 115 ..onTagChange.listen((e) {
116 _tag = e.element.selectedTag; 116 _tag = e.element.selectedTag;
117 _request(); 117 _request(forceFetch: true);
118 })); 118 }));
119 if (_progress.status == M.SampleProfileLoadingStatus.loaded) { 119 if (_progress.status == M.SampleProfileLoadingStatus.loaded) {
120 CpuProfileVirtualTreeElement tree; 120 CpuProfileVirtualTreeElement tree;
121 content.addAll([ 121 content.addAll([
122 new BRElement(), 122 new BRElement(),
123 new StackTraceTreeConfigElement( 123 new StackTraceTreeConfigElement(
124 mode: _mode, 124 mode: _mode,
125 direction: _direction, 125 direction: _direction,
126 filter: _filter, 126 filter: _filter,
127 queue: _r.queue) 127 queue: _r.queue)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 await _request(clear: true); 167 await _request(clear: true);
168 e.element.disabled = false; 168 e.element.disabled = false;
169 } 169 }
170 170
171 Future _refresh(e) async { 171 Future _refresh(e) async {
172 e.element.disabled = true; 172 e.element.disabled = true;
173 await _request(forceFetch: true); 173 await _request(forceFetch: true);
174 e.element.disabled = false; 174 e.element.disabled = false;
175 } 175 }
176 } 176 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698