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

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

Issue 18259014: Object ID Ring with tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
11 #include "vm/code_observers.h" 11 #include "vm/code_observers.h"
12 #include "vm/compiler_stats.h" 12 #include "vm/compiler_stats.h"
13 #include "vm/dart_api_state.h" 13 #include "vm/dart_api_state.h"
14 #include "vm/dart_entry.h" 14 #include "vm/dart_entry.h"
15 #include "vm/debugger.h" 15 #include "vm/debugger.h"
16 #include "vm/heap.h" 16 #include "vm/heap.h"
17 #include "vm/heap_histogram.h" 17 #include "vm/heap_histogram.h"
18 #include "vm/message_handler.h" 18 #include "vm/message_handler.h"
19 #include "vm/object_store.h" 19 #include "vm/object_store.h"
20 #include "vm/parser.h" 20 #include "vm/parser.h"
21 #include "vm/port.h" 21 #include "vm/port.h"
22 #include "vm/simulator.h" 22 #include "vm/simulator.h"
23 #include "vm/stack_frame.h" 23 #include "vm/stack_frame.h"
24 #include "vm/stub_code.h" 24 #include "vm/stub_code.h"
25 #include "vm/symbols.h" 25 #include "vm/symbols.h"
26 #include "vm/thread.h" 26 #include "vm/thread.h"
27 #include "vm/timer.h" 27 #include "vm/timer.h"
28 #include "vm/visitor.h" 28 #include "vm/visitor.h"
29 #include "vm/object_id_ring.h"
29 30
30 namespace dart { 31 namespace dart {
31 32
32 DEFINE_FLAG(bool, report_usage_count, false, 33 DEFINE_FLAG(bool, report_usage_count, false,
33 "Track function usage and report."); 34 "Track function usage and report.");
34 DEFINE_FLAG(bool, trace_isolates, false, 35 DEFINE_FLAG(bool, trace_isolates, false,
35 "Trace isolate creation and shut down."); 36 "Trace isolate creation and shut down.");
36 DECLARE_FLAG(bool, trace_deoptimization_verbose); 37 DECLARE_FLAG(bool, trace_deoptimization_verbose);
37 38
38 39
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 deopt_fpu_registers_copy_(NULL), 409 deopt_fpu_registers_copy_(NULL),
409 deopt_frame_copy_(NULL), 410 deopt_frame_copy_(NULL),
410 deopt_frame_copy_size_(0), 411 deopt_frame_copy_size_(0),
411 deferred_boxes_(NULL), 412 deferred_boxes_(NULL),
412 deferred_object_refs_(NULL), 413 deferred_object_refs_(NULL),
413 deferred_objects_count_(0), 414 deferred_objects_count_(0),
414 deferred_objects_(NULL), 415 deferred_objects_(NULL),
415 stacktrace_(NULL), 416 stacktrace_(NULL),
416 stack_frame_index_(-1), 417 stack_frame_index_(-1),
417 object_histogram_(NULL), 418 object_histogram_(NULL),
419 object_id_ring_(NULL),
418 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS) 420 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
419 reusable_handles_() { 421 reusable_handles_() {
420 if (FLAG_print_object_histogram && (Dart::vm_isolate() != NULL)) { 422 if (FLAG_print_object_histogram && (Dart::vm_isolate() != NULL)) {
421 object_histogram_ = new ObjectHistogram(this); 423 object_histogram_ = new ObjectHistogram(this);
422 } 424 }
423 } 425 }
424 #undef REUSABLE_HANDLE_INITIALIZERS 426 #undef REUSABLE_HANDLE_INITIALIZERS
425 427
426 428
427 Isolate::~Isolate() { 429 Isolate::~Isolate() {
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 return func.raw(); 1197 return func.raw();
1196 } 1198 }
1197 1199
1198 1200
1199 void IsolateSpawnState::Cleanup() { 1201 void IsolateSpawnState::Cleanup() {
1200 SwitchIsolateScope switch_scope(isolate()); 1202 SwitchIsolateScope switch_scope(isolate());
1201 Dart::ShutdownIsolate(); 1203 Dart::ShutdownIsolate();
1202 } 1204 }
1203 1205
1204 } // namespace dart 1206 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698