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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 TraceBuffer* trace_buffer() { | 458 TraceBuffer* trace_buffer() { |
459 return trace_buffer_; | 459 return trace_buffer_; |
460 } | 460 } |
461 | 461 |
462 DeoptContext* deopt_context() const { return deopt_context_; } | 462 DeoptContext* deopt_context() const { return deopt_context_; } |
463 void set_deopt_context(DeoptContext* value) { | 463 void set_deopt_context(DeoptContext* value) { |
464 ASSERT(value == NULL || deopt_context_ == NULL); | 464 ASSERT(value == NULL || deopt_context_ == NULL); |
465 deopt_context_ = value; | 465 deopt_context_ = value; |
466 } | 466 } |
467 | 467 |
| 468 void UpdateLastAllocationProfileAccumulatorResetTimestamp() { |
| 469 last_allocationprofile_accumulator_reset_timestamp_ = |
| 470 OS::GetCurrentTimeMillis(); |
| 471 } |
| 472 |
| 473 int64_t last_allocationprofile_accumulator_reset_timestamp() const { |
| 474 return last_allocationprofile_accumulator_reset_timestamp_; |
| 475 } |
| 476 |
| 477 void UpdateLastAllocationProfileGCTimestamp() { |
| 478 last_allocationprofile_gc_timestamp_ = OS::GetCurrentTimeMillis(); |
| 479 } |
| 480 |
| 481 int64_t last_allocationprofile_gc_timestamp() const { |
| 482 return last_allocationprofile_gc_timestamp_; |
| 483 } |
| 484 |
468 intptr_t BlockClassFinalization() { | 485 intptr_t BlockClassFinalization() { |
469 ASSERT(defer_finalization_count_ >= 0); | 486 ASSERT(defer_finalization_count_ >= 0); |
470 return defer_finalization_count_++; | 487 return defer_finalization_count_++; |
471 } | 488 } |
472 | 489 |
473 intptr_t UnblockClassFinalization() { | 490 intptr_t UnblockClassFinalization() { |
474 ASSERT(defer_finalization_count_ > 0); | 491 ASSERT(defer_finalization_count_ > 0); |
475 return defer_finalization_count_--; | 492 return defer_finalization_count_--; |
476 } | 493 } |
477 | 494 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 bool is_runnable_; | 617 bool is_runnable_; |
601 Dart_GcPrologueCallback gc_prologue_callback_; | 618 Dart_GcPrologueCallback gc_prologue_callback_; |
602 Dart_GcEpilogueCallback gc_epilogue_callback_; | 619 Dart_GcEpilogueCallback gc_epilogue_callback_; |
603 intptr_t defer_finalization_count_; | 620 intptr_t defer_finalization_count_; |
604 DeoptContext* deopt_context_; | 621 DeoptContext* deopt_context_; |
605 | 622 |
606 // Status support. | 623 // Status support. |
607 char* stacktrace_; | 624 char* stacktrace_; |
608 intptr_t stack_frame_index_; | 625 intptr_t stack_frame_index_; |
609 | 626 |
| 627 // Timestamps of last operation via service. |
| 628 int64_t last_allocationprofile_accumulator_reset_timestamp_; |
| 629 int64_t last_allocationprofile_gc_timestamp_; |
| 630 |
610 bool cha_used_; | 631 bool cha_used_; |
611 | 632 |
612 // Ring buffer of objects assigned an id. | 633 // Ring buffer of objects assigned an id. |
613 ObjectIdRing* object_id_ring_; | 634 ObjectIdRing* object_id_ring_; |
614 | 635 |
615 // Trace buffer support. | 636 // Trace buffer support. |
616 TraceBuffer* trace_buffer_; | 637 TraceBuffer* trace_buffer_; |
617 | 638 |
618 IsolateProfilerData* profiler_data_; | 639 IsolateProfilerData* profiler_data_; |
619 Mutex profiler_data_mutex_; | 640 Mutex profiler_data_mutex_; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 char* script_url_; | 781 char* script_url_; |
761 char* library_url_; | 782 char* library_url_; |
762 char* class_name_; | 783 char* class_name_; |
763 char* function_name_; | 784 char* function_name_; |
764 char* exception_callback_name_; | 785 char* exception_callback_name_; |
765 }; | 786 }; |
766 | 787 |
767 } // namespace dart | 788 } // namespace dart |
768 | 789 |
769 #endif // VM_ISOLATE_H_ | 790 #endif // VM_ISOLATE_H_ |
OLD | NEW |