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

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

Issue 12221022: Initial prototype of vmstats support, based on Dart VM Stats draft design doc. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
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 #include "vm/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/code_observers.h" 7 #include "vm/code_observers.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h"
10 #include "vm/flags.h" 11 #include "vm/flags.h"
11 #include "vm/freelist.h" 12 #include "vm/freelist.h"
12 #include "vm/handles.h" 13 #include "vm/handles.h"
13 #include "vm/heap.h" 14 #include "vm/heap.h"
14 #include "vm/isolate.h" 15 #include "vm/isolate.h"
15 #include "vm/object.h" 16 #include "vm/object.h"
16 #include "vm/object_store.h" 17 #include "vm/object_store.h"
17 #include "vm/port.h" 18 #include "vm/port.h"
18 #include "vm/simulator.h" 19 #include "vm/simulator.h"
19 #include "vm/snapshot.h" 20 #include "vm/snapshot.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 OS::InitOnce(); 92 OS::InitOnce();
92 VirtualMemory::InitOnce(); 93 VirtualMemory::InitOnce();
93 Isolate::InitOnce(); 94 Isolate::InitOnce();
94 PortMap::InitOnce(); 95 PortMap::InitOnce();
95 FreeListElement::InitOnce(); 96 FreeListElement::InitOnce();
96 Api::InitOnce(); 97 Api::InitOnce();
97 CodeObservers::InitOnce(); 98 CodeObservers::InitOnce();
98 #if defined(USING_SIMULATOR) 99 #if defined(USING_SIMULATOR)
99 Simulator::InitOnce(); 100 Simulator::InitOnce();
100 #endif 101 #endif
102 VmStatusService::InitOnce();
siva 2013/02/09 01:00:57 I guess this InitOnce is needed to for the plug-in
Tom Ball 2013/02/14 23:45:16 That's right -- I can lazily do initialization on
101 // Create the read-only handles area. 103 // Create the read-only handles area.
102 ASSERT(predefined_handles_ == NULL); 104 ASSERT(predefined_handles_ == NULL);
103 predefined_handles_ = new ReadOnlyHandles(); 105 predefined_handles_ = new ReadOnlyHandles();
104 // Create the VM isolate and finish the VM initialization. 106 // Create the VM isolate and finish the VM initialization.
105 ASSERT(thread_pool_ == NULL); 107 ASSERT(thread_pool_ == NULL);
106 thread_pool_ = new ThreadPool(); 108 thread_pool_ = new ThreadPool();
107 { 109 {
108 ASSERT(vm_isolate_ == NULL); 110 ASSERT(vm_isolate_ == NULL);
109 ASSERT(Flags::Initialized()); 111 ASSERT(Flags::Initialized());
110 vm_isolate_ = Isolate::Init("vm-isolate"); 112 vm_isolate_ = Isolate::Init("vm-isolate");
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 return predefined_handles_->handles_.AllocateScopedHandle(); 257 return predefined_handles_->handles_.AllocateScopedHandle();
256 } 258 }
257 259
258 260
259 bool Dart::IsReadOnlyHandle(uword address) { 261 bool Dart::IsReadOnlyHandle(uword address) {
260 ASSERT(predefined_handles_ != NULL); 262 ASSERT(predefined_handles_ != NULL);
261 return predefined_handles_->handles_.IsValidScopedHandle(address); 263 return predefined_handles_->handles_.IsValidScopedHandle(address);
262 } 264 }
263 265
264 } // namespace dart 266 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698