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

Side by Side Diff: runtime/observatory/lib/src/elements/class_allocation_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
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/observatory/lib/src/elements/cpu_profile.dart » ('j') | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:html'; 5 import 'dart:html';
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:observatory/models.dart' as M; 7 import 'package:observatory/models.dart' as M;
8 import 'package:observatory/src/elements/cpu_profile/virtual_tree.dart'; 8 import 'package:observatory/src/elements/cpu_profile/virtual_tree.dart';
9 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 9 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
10 import 'package:observatory/src/elements/helpers/tag.dart'; 10 import 'package:observatory/src/elements/helpers/tag.dart';
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 children = []; 66 children = [];
67 _r.disable(notify: true); 67 _r.disable(notify: true);
68 } 68 }
69 69
70 void render() { 70 void render() {
71 if (_progress == null) { 71 if (_progress == null) {
72 children = const []; 72 children = const [];
73 return; 73 return;
74 } 74 }
75 final content = [ 75 final content = [
76 new SampleBufferControlElement(_progress, _progressStream, 76 new SampleBufferControlElement(isolate.vm, _progress, _progressStream,
77 selectedTag: _tag, queue: _r.queue) 77 selectedTag: _tag, queue: _r.queue)
78 ..onTagChange.listen((e) { 78 ..onTagChange.listen((e) {
79 _tag = e.element.selectedTag; 79 _tag = e.element.selectedTag;
80 _request(); 80 _request(forceFetch: true);
81 }) 81 })
82 ]; 82 ];
83 if (_progress.status == M.SampleProfileLoadingStatus.loaded) { 83 if (_progress.status == M.SampleProfileLoadingStatus.loaded) {
84 CpuProfileVirtualTreeElement tree; 84 CpuProfileVirtualTreeElement tree;
85 content.addAll([ 85 content.addAll([
86 new BRElement(), 86 new BRElement(),
87 new StackTraceTreeConfigElement( 87 new StackTraceTreeConfigElement(
88 mode: _mode, 88 mode: _mode,
89 direction: _direction, 89 direction: _direction,
90 showFilter: false, 90 showFilter: false,
(...skipping 17 matching lines...) Expand all
108 _progressStream = _profiles.get(_isolate, _cls, _tag); 108 _progressStream = _profiles.get(_isolate, _cls, _tag);
109 _r.dirty(); 109 _r.dirty();
110 _progress = (await _progressStream.first).progress; 110 _progress = (await _progressStream.first).progress;
111 _r.dirty(); 111 _r.dirty();
112 if (M.isSampleProcessRunning(_progress.status)) { 112 if (M.isSampleProcessRunning(_progress.status)) {
113 _progress = (await _progressStream.last).progress; 113 _progress = (await _progressStream.last).progress;
114 _r.dirty(); 114 _r.dirty();
115 } 115 }
116 } 116 }
117 } 117 }
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/observatory/lib/src/elements/cpu_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698