OLD | NEW |
---|---|
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 #ifndef VM_ISOLATE_H_ | 5 #ifndef VM_ISOLATE_H_ |
6 #define VM_ISOLATE_H_ | 6 #define VM_ISOLATE_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/thread.h" | 10 #include "platform/thread.h" |
(...skipping 15 matching lines...) Expand all Loading... | |
26 class CodeIndexTable; | 26 class CodeIndexTable; |
27 class Debugger; | 27 class Debugger; |
28 class DeoptContext; | 28 class DeoptContext; |
29 class Field; | 29 class Field; |
30 class Function; | 30 class Function; |
31 class HandleScope; | 31 class HandleScope; |
32 class HandleVisitor; | 32 class HandleVisitor; |
33 class Heap; | 33 class Heap; |
34 class ICData; | 34 class ICData; |
35 class Instance; | 35 class Instance; |
36 class IsolateProfilerData; | |
36 class LongJump; | 37 class LongJump; |
37 class MessageHandler; | 38 class MessageHandler; |
38 class Mutex; | 39 class Mutex; |
39 class Object; | 40 class Object; |
40 class ObjectPointerVisitor; | 41 class ObjectPointerVisitor; |
41 class ObjectStore; | 42 class ObjectStore; |
42 class RawInstance; | 43 class RawInstance; |
43 class RawArray; | 44 class RawArray; |
44 class RawContext; | 45 class RawContext; |
45 class RawDouble; | 46 class RawDouble; |
46 class RawMint; | 47 class RawMint; |
47 class RawObject; | 48 class RawObject; |
48 class RawInteger; | 49 class RawInteger; |
49 class RawError; | 50 class RawError; |
50 class RawFloat32x4; | 51 class RawFloat32x4; |
51 class RawUint32x4; | 52 class RawUint32x4; |
53 class SampleBuffer; | |
52 class Simulator; | 54 class Simulator; |
53 class StackResource; | 55 class StackResource; |
54 class StackZone; | 56 class StackZone; |
55 class StubCode; | 57 class StubCode; |
56 class TypeArguments; | 58 class TypeArguments; |
57 class TypeParameter; | 59 class TypeParameter; |
58 class ObjectHistogram; | 60 class ObjectHistogram; |
59 class ObjectIdRing; | 61 class ObjectIdRing; |
60 | 62 |
61 | 63 |
64 | |
siva
2013/10/28 05:19:21
extra blank line?
Cutch
2013/11/04 20:36:05
Done.
| |
62 #define REUSABLE_HANDLE_LIST(V) \ | 65 #define REUSABLE_HANDLE_LIST(V) \ |
63 V(Object) \ | 66 V(Object) \ |
64 V(Array) \ | 67 V(Array) \ |
65 V(String) \ | 68 V(String) \ |
66 V(Instance) \ | 69 V(Instance) \ |
67 V(Function) \ | 70 V(Function) \ |
68 V(Field) \ | 71 V(Field) \ |
69 V(Class) \ | 72 V(Class) \ |
70 V(AbstractType) \ | 73 V(AbstractType) \ |
71 V(TypeParameter) \ | 74 V(TypeParameter) \ |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
359 intptr_t UnblockClassFinalization() { | 362 intptr_t UnblockClassFinalization() { |
360 ASSERT(defer_finalization_count_ > 0); | 363 ASSERT(defer_finalization_count_ > 0); |
361 return defer_finalization_count_--; | 364 return defer_finalization_count_--; |
362 } | 365 } |
363 | 366 |
364 bool AllowClassFinalization() { | 367 bool AllowClassFinalization() { |
365 ASSERT(defer_finalization_count_ >= 0); | 368 ASSERT(defer_finalization_count_ >= 0); |
366 return defer_finalization_count_ == 0; | 369 return defer_finalization_count_ == 0; |
367 } | 370 } |
368 | 371 |
372 Mutex* profiler_data_mutex() const { return profiler_data_mutex_; } | |
siva
2013/10/28 05:19:21
ASSERT(profiler_data_mutex_ != NULL);
Cutch
2013/11/04 20:36:05
Done.
| |
373 | |
374 void set_profiler_data(IsolateProfilerData* profiler_data) { | |
375 profiler_data_ = profiler_data; | |
376 } | |
377 | |
378 IsolateProfilerData* profiler_data() { | |
379 return profiler_data_; | |
380 } | |
381 | |
369 private: | 382 private: |
370 Isolate(); | 383 Isolate(); |
371 | 384 |
372 void BuildName(const char* name_prefix); | 385 void BuildName(const char* name_prefix); |
373 void PrintInvokedFunctions(); | 386 void PrintInvokedFunctions(); |
374 | 387 |
375 static bool FetchStacktrace(); | 388 static bool FetchStacktrace(); |
376 static bool FetchStackFrameDetails(); | 389 static bool FetchStackFrameDetails(); |
377 char* GetStatusDetails(); | 390 char* GetStatusDetails(); |
378 char* GetStatusStacktrace(); | 391 char* GetStatusStacktrace(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 DeoptContext* deopt_context_; | 427 DeoptContext* deopt_context_; |
415 | 428 |
416 // Status support. | 429 // Status support. |
417 char* stacktrace_; | 430 char* stacktrace_; |
418 intptr_t stack_frame_index_; | 431 intptr_t stack_frame_index_; |
419 ObjectHistogram* object_histogram_; | 432 ObjectHistogram* object_histogram_; |
420 | 433 |
421 // Ring buffer of objects assigned an id. | 434 // Ring buffer of objects assigned an id. |
422 ObjectIdRing* object_id_ring_; | 435 ObjectIdRing* object_id_ring_; |
423 | 436 |
437 IsolateProfilerData* profiler_data_; | |
438 Mutex* profiler_data_mutex_; | |
439 | |
424 // Reusable handles support. | 440 // Reusable handles support. |
425 #define REUSABLE_HANDLE_FIELDS(object) \ | 441 #define REUSABLE_HANDLE_FIELDS(object) \ |
426 object* object##_handle_; \ | 442 object* object##_handle_; \ |
427 | 443 |
428 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) | 444 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) |
429 #undef REUSABLE_HANDLE_FIELDS | 445 #undef REUSABLE_HANDLE_FIELDS |
430 VMHandles reusable_handles_; | 446 VMHandles reusable_handles_; |
431 | 447 |
432 static Dart_IsolateCreateCallback create_callback_; | 448 static Dart_IsolateCreateCallback create_callback_; |
433 static Dart_IsolateInterruptCallback interrupt_callback_; | 449 static Dart_IsolateInterruptCallback interrupt_callback_; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
530 Isolate* isolate_; | 546 Isolate* isolate_; |
531 char* script_url_; | 547 char* script_url_; |
532 char* library_url_; | 548 char* library_url_; |
533 char* function_name_; | 549 char* function_name_; |
534 char* exception_callback_name_; | 550 char* exception_callback_name_; |
535 }; | 551 }; |
536 | 552 |
537 } // namespace dart | 553 } // namespace dart |
538 | 554 |
539 #endif // VM_ISOLATE_H_ | 555 #endif // VM_ISOLATE_H_ |
OLD | NEW |