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

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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 intptr_t UnblockClassFinalization() { 543 intptr_t UnblockClassFinalization() {
544 ASSERT(defer_finalization_count_ > 0); 544 ASSERT(defer_finalization_count_ > 0);
545 return defer_finalization_count_--; 545 return defer_finalization_count_--;
546 } 546 }
547 547
548 bool AllowClassFinalization() { 548 bool AllowClassFinalization() {
549 ASSERT(defer_finalization_count_ >= 0); 549 ASSERT(defer_finalization_count_ >= 0);
550 return defer_finalization_count_ == 0; 550 return defer_finalization_count_ == 0;
551 } 551 }
552 552
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); 553 void PrintJSON(JSONStream* stream, bool ref = true);
566 554
567 CompilerStats* compiler_stats() { 555 CompilerStats* compiler_stats() {
568 return compiler_stats_; 556 return compiler_stats_;
569 } 557 }
570 558
571 // Returns the number of sampled threads.
572 intptr_t ProfileInterrupt();
573
574 VMTagCounters* vm_tag_counters() { 559 VMTagCounters* vm_tag_counters() {
575 return &vm_tag_counters_; 560 return &vm_tag_counters_;
576 } 561 }
577 562
578 uword user_tag() const { 563 uword user_tag() const {
579 return user_tag_; 564 return user_tag_;
580 } 565 }
581 static intptr_t user_tag_offset() { 566 static intptr_t user_tag_offset() {
582 return OFFSET_OF(Isolate, user_tag_); 567 return OFFSET_OF(Isolate, user_tag_);
583 } 568 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 // Timestamps of last operation via service. 772 // Timestamps of last operation via service.
788 int64_t last_allocationprofile_accumulator_reset_timestamp_; 773 int64_t last_allocationprofile_accumulator_reset_timestamp_;
789 int64_t last_allocationprofile_gc_timestamp_; 774 int64_t last_allocationprofile_gc_timestamp_;
790 775
791 // Ring buffer of objects assigned an id. 776 // Ring buffer of objects assigned an id.
792 ObjectIdRing* object_id_ring_; 777 ObjectIdRing* object_id_ring_;
793 778
794 // Trace buffer support. 779 // Trace buffer support.
795 TraceBuffer* trace_buffer_; 780 TraceBuffer* trace_buffer_;
796 781
797 IsolateProfilerData* profiler_data_;
798 Mutex profiler_data_mutex_;
799
800 VMTagCounters vm_tag_counters_; 782 VMTagCounters vm_tag_counters_;
801 RawGrowableObjectArray* tag_table_; 783 RawGrowableObjectArray* tag_table_;
802 784
803 RawGrowableObjectArray* deoptimized_code_array_; 785 RawGrowableObjectArray* deoptimized_code_array_;
804 786
805 // Background compilation. 787 // Background compilation.
806 BackgroundCompiler* background_compiler_; 788 BackgroundCompiler* background_compiler_;
807 RawGrowableObjectArray* compilation_function_queue_; 789 RawGrowableObjectArray* compilation_function_queue_;
808 RawGrowableObjectArray* compilation_code_queue_; 790 RawGrowableObjectArray* compilation_code_queue_;
809 791
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 uint8_t* serialized_message_; 1009 uint8_t* serialized_message_;
1028 intptr_t serialized_message_len_; 1010 intptr_t serialized_message_len_;
1029 Isolate::Flags isolate_flags_; 1011 Isolate::Flags isolate_flags_;
1030 bool paused_; 1012 bool paused_;
1031 bool errors_are_fatal_; 1013 bool errors_are_fatal_;
1032 }; 1014 };
1033 1015
1034 } // namespace dart 1016 } // namespace dart
1035 1017
1036 #endif // VM_ISOLATE_H_ 1018 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/isolate.cc » ('j') | runtime/vm/thread_interrupter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698