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

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

Issue 1423473004: Switch profiler from isolates to threads [second landing] (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
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 intptr_t UnblockClassFinalization() { 542 intptr_t UnblockClassFinalization() {
543 ASSERT(defer_finalization_count_ > 0); 543 ASSERT(defer_finalization_count_ > 0);
544 return defer_finalization_count_--; 544 return defer_finalization_count_--;
545 } 545 }
546 546
547 bool AllowClassFinalization() { 547 bool AllowClassFinalization() {
548 ASSERT(defer_finalization_count_ >= 0); 548 ASSERT(defer_finalization_count_ >= 0);
549 return defer_finalization_count_ == 0; 549 return defer_finalization_count_ == 0;
550 } 550 }
551 551
552 Mutex* profiler_data_mutex() {
553 return &profiler_data_mutex_;
554 }
555
556 void set_profiler_data(IsolateProfilerData* profiler_data) {
557 profiler_data_ = profiler_data;
558 }
559
560 IsolateProfilerData* profiler_data() const {
561 return profiler_data_;
562 }
563
564 void PrintJSON(JSONStream* stream, bool ref = true); 552 void PrintJSON(JSONStream* stream, bool ref = true);
565 553
566 CompilerStats* compiler_stats() { 554 CompilerStats* compiler_stats() {
567 return compiler_stats_; 555 return compiler_stats_;
568 } 556 }
569 557
570 // Returns the number of sampled threads.
571 intptr_t ProfileInterrupt();
572
573 VMTagCounters* vm_tag_counters() { 558 VMTagCounters* vm_tag_counters() {
574 return &vm_tag_counters_; 559 return &vm_tag_counters_;
575 } 560 }
576 561
577 uword user_tag() const { 562 uword user_tag() const {
578 return user_tag_; 563 return user_tag_;
579 } 564 }
580 static intptr_t user_tag_offset() { 565 static intptr_t user_tag_offset() {
581 return OFFSET_OF(Isolate, user_tag_); 566 return OFFSET_OF(Isolate, user_tag_);
582 } 567 }
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 // Timestamps of last operation via service. 773 // Timestamps of last operation via service.
789 int64_t last_allocationprofile_accumulator_reset_timestamp_; 774 int64_t last_allocationprofile_accumulator_reset_timestamp_;
790 int64_t last_allocationprofile_gc_timestamp_; 775 int64_t last_allocationprofile_gc_timestamp_;
791 776
792 // Ring buffer of objects assigned an id. 777 // Ring buffer of objects assigned an id.
793 ObjectIdRing* object_id_ring_; 778 ObjectIdRing* object_id_ring_;
794 779
795 // Trace buffer support. 780 // Trace buffer support.
796 TraceBuffer* trace_buffer_; 781 TraceBuffer* trace_buffer_;
797 782
798 IsolateProfilerData* profiler_data_;
799 Mutex profiler_data_mutex_;
800
801 VMTagCounters vm_tag_counters_; 783 VMTagCounters vm_tag_counters_;
802 RawGrowableObjectArray* tag_table_; 784 RawGrowableObjectArray* tag_table_;
803 785
804 RawGrowableObjectArray* deoptimized_code_array_; 786 RawGrowableObjectArray* deoptimized_code_array_;
805 787
806 // Background compilation. 788 // Background compilation.
807 BackgroundCompiler* background_compiler_; 789 BackgroundCompiler* background_compiler_;
808 790
809 // We use 6 list entries for each pending service extension calls. 791 // We use 6 list entries for each pending service extension calls.
810 enum { 792 enum {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 uint8_t* serialized_message_; 973 uint8_t* serialized_message_;
992 intptr_t serialized_message_len_; 974 intptr_t serialized_message_len_;
993 Isolate::Flags isolate_flags_; 975 Isolate::Flags isolate_flags_;
994 bool paused_; 976 bool paused_;
995 bool errors_are_fatal_; 977 bool errors_are_fatal_;
996 }; 978 };
997 979
998 } // namespace dart 980 } // namespace dart
999 981
1000 #endif // VM_ISOLATE_H_ 982 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698