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

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

Issue 1412733008: Switch profiler from isolates to threads (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 #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 "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 void set_message_handler(MessageHandler* value) { message_handler_ = value; } 300 void set_message_handler(MessageHandler* value) { message_handler_ = value; }
301 301
302 bool is_runnable() const { return is_runnable_; } 302 bool is_runnable() const { return is_runnable_; }
303 void set_is_runnable(bool value) { is_runnable_ = value; } 303 void set_is_runnable(bool value) { is_runnable_ = value; }
304 304
305 IsolateSpawnState* spawn_state() const { return spawn_state_; } 305 IsolateSpawnState* spawn_state() const { return spawn_state_; }
306 void set_spawn_state(IsolateSpawnState* value) { spawn_state_ = value; } 306 void set_spawn_state(IsolateSpawnState* value) { spawn_state_ = value; }
307 307
308 Mutex* mutex() const { return mutex_; } 308 Mutex* mutex() const { return mutex_; }
309 309
310 bool HasDebugger() const {
Ivan Posva 2015/10/28 19:31:53 Still needed?
Cutch 2015/10/28 19:50:33 Done.
311 return debugger_ != NULL;
312 }
313
310 Debugger* debugger() const { 314 Debugger* debugger() const {
311 ASSERT(debugger_ != NULL); 315 ASSERT(debugger_ != NULL);
312 return debugger_; 316 return debugger_;
313 } 317 }
314 318
315 void set_single_step(bool value) { single_step_ = value; } 319 void set_single_step(bool value) { single_step_ = value; }
316 bool single_step() const { return single_step_; } 320 bool single_step() const { return single_step_; }
317 static intptr_t single_step_offset() { 321 static intptr_t single_step_offset() {
318 return OFFSET_OF(Isolate, single_step_); 322 return OFFSET_OF(Isolate, single_step_);
319 } 323 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 intptr_t UnblockClassFinalization() { 547 intptr_t UnblockClassFinalization() {
544 ASSERT(defer_finalization_count_ > 0); 548 ASSERT(defer_finalization_count_ > 0);
545 return defer_finalization_count_--; 549 return defer_finalization_count_--;
546 } 550 }
547 551
548 bool AllowClassFinalization() { 552 bool AllowClassFinalization() {
549 ASSERT(defer_finalization_count_ >= 0); 553 ASSERT(defer_finalization_count_ >= 0);
550 return defer_finalization_count_ == 0; 554 return defer_finalization_count_ == 0;
551 } 555 }
552 556
553 Mutex* profiler_data_mutex() {
554 return &profiler_data_mutex_;
555 }
556
557 void set_profiler_data(IsolateProfilerData* profiler_data) {
558 profiler_data_ = profiler_data;
559 }
560
561 IsolateProfilerData* profiler_data() const {
562 return profiler_data_;
563 }
564
565 void PrintJSON(JSONStream* stream, bool ref = true); 557 void PrintJSON(JSONStream* stream, bool ref = true);
566 558
567 CompilerStats* compiler_stats() { 559 CompilerStats* compiler_stats() {
568 return compiler_stats_; 560 return compiler_stats_;
569 } 561 }
570 562
571 // Returns the number of sampled threads.
572 intptr_t ProfileInterrupt();
573
574 VMTagCounters* vm_tag_counters() { 563 VMTagCounters* vm_tag_counters() {
575 return &vm_tag_counters_; 564 return &vm_tag_counters_;
576 } 565 }
577 566
578 uword user_tag() const { 567 uword user_tag() const {
579 return user_tag_; 568 return user_tag_;
580 } 569 }
581 static intptr_t user_tag_offset() { 570 static intptr_t user_tag_offset() {
582 return OFFSET_OF(Isolate, user_tag_); 571 return OFFSET_OF(Isolate, user_tag_);
583 } 572 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // Timestamps of last operation via service. 776 // Timestamps of last operation via service.
788 int64_t last_allocationprofile_accumulator_reset_timestamp_; 777 int64_t last_allocationprofile_accumulator_reset_timestamp_;
789 int64_t last_allocationprofile_gc_timestamp_; 778 int64_t last_allocationprofile_gc_timestamp_;
790 779
791 // Ring buffer of objects assigned an id. 780 // Ring buffer of objects assigned an id.
792 ObjectIdRing* object_id_ring_; 781 ObjectIdRing* object_id_ring_;
793 782
794 // Trace buffer support. 783 // Trace buffer support.
795 TraceBuffer* trace_buffer_; 784 TraceBuffer* trace_buffer_;
796 785
797 IsolateProfilerData* profiler_data_;
798 Mutex profiler_data_mutex_;
799
800 VMTagCounters vm_tag_counters_; 786 VMTagCounters vm_tag_counters_;
801 RawGrowableObjectArray* tag_table_; 787 RawGrowableObjectArray* tag_table_;
802 788
803 RawGrowableObjectArray* deoptimized_code_array_; 789 RawGrowableObjectArray* deoptimized_code_array_;
804 790
805 // Background compilation. 791 // Background compilation.
806 BackgroundCompiler* background_compiler_; 792 BackgroundCompiler* background_compiler_;
807 RawGrowableObjectArray* compilation_function_queue_; 793 RawGrowableObjectArray* compilation_function_queue_;
808 RawGrowableObjectArray* compilation_code_queue_; 794 RawGrowableObjectArray* compilation_code_queue_;
809 795
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 uint8_t* serialized_message_; 1013 uint8_t* serialized_message_;
1028 intptr_t serialized_message_len_; 1014 intptr_t serialized_message_len_;
1029 Isolate::Flags isolate_flags_; 1015 Isolate::Flags isolate_flags_;
1030 bool paused_; 1016 bool paused_;
1031 bool errors_are_fatal_; 1017 bool errors_are_fatal_;
1032 }; 1018 };
1033 1019
1034 } // namespace dart 1020 } // namespace dart
1035 1021
1036 #endif // VM_ISOLATE_H_ 1022 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/isolate.cc » ('j') | runtime/vm/profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698