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

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

Issue 2133823002: Improve hot reload test mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rmacnak review Created 4 years, 5 months 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/flow_graph_compiler.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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 #endif // defined(PRODUCT) 625 #endif // defined(PRODUCT)
626 626
627 static void KillAllIsolates(LibMsgId msg_id); 627 static void KillAllIsolates(LibMsgId msg_id);
628 static void KillIfExists(Isolate* isolate, LibMsgId msg_id); 628 static void KillIfExists(Isolate* isolate, LibMsgId msg_id);
629 629
630 static void DisableIsolateCreation(); 630 static void DisableIsolateCreation();
631 static void EnableIsolateCreation(); 631 static void EnableIsolateCreation();
632 632
633 void StopBackgroundCompiler(); 633 void StopBackgroundCompiler();
634 634
635 intptr_t reload_every_n_stack_overflow_checks() const {
636 return reload_every_n_stack_overflow_checks_;
637 }
638
639 void MaybeIncreaseReloadEveryNStackOverflowChecks();
640
635 private: 641 private:
636 friend class Dart; // Init, InitOnce, Shutdown. 642 friend class Dart; // Init, InitOnce, Shutdown.
637 friend class IsolateKillerVisitor; // Kill(). 643 friend class IsolateKillerVisitor; // Kill().
638 644
639 explicit Isolate(const Dart_IsolateFlags& api_flags); 645 explicit Isolate(const Dart_IsolateFlags& api_flags);
640 646
641 static void InitOnce(); 647 static void InitOnce();
642 static Isolate* Init(const char* name_prefix, 648 static Isolate* Init(const char* name_prefix,
643 const Dart_IsolateFlags& api_flags, 649 const Dart_IsolateFlags& api_flags,
644 bool is_vm_isolate = false); 650 bool is_vm_isolate = false);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 RawGrowableObjectArray* boxed_field_list_; 814 RawGrowableObjectArray* boxed_field_list_;
809 815
810 // This guards spawn_count_. An isolate cannot complete shutdown and be 816 // This guards spawn_count_. An isolate cannot complete shutdown and be
811 // destroyed while there are child isolates in the midst of a spawn. 817 // destroyed while there are child isolates in the midst of a spawn.
812 Monitor* spawn_count_monitor_; 818 Monitor* spawn_count_monitor_;
813 intptr_t spawn_count_; 819 intptr_t spawn_count_;
814 820
815 // Has a reload ever been attempted? 821 // Has a reload ever been attempted?
816 bool has_attempted_reload_; 822 bool has_attempted_reload_;
817 intptr_t no_reload_scope_depth_; // we can only reload when this is 0. 823 intptr_t no_reload_scope_depth_; // we can only reload when this is 0.
824 // Per-isolate copy of FLAG_reload_every.
825 intptr_t reload_every_n_stack_overflow_checks_;
818 IsolateReloadContext* reload_context_; 826 IsolateReloadContext* reload_context_;
819 827
820 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ 828 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \
821 type metric_##variable##_; 829 type metric_##variable##_;
822 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); 830 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE);
823 #undef ISOLATE_METRIC_VARIABLE 831 #undef ISOLATE_METRIC_VARIABLE
824 832
825 833
826 static Dart_IsolateCreateCallback create_callback_; 834 static Dart_IsolateCreateCallback create_callback_;
827 static Dart_IsolateShutdownCallback shutdown_callback_; 835 static Dart_IsolateShutdownCallback shutdown_callback_;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 intptr_t* spawn_count_; 987 intptr_t* spawn_count_;
980 988
981 Dart_IsolateFlags isolate_flags_; 989 Dart_IsolateFlags isolate_flags_;
982 bool paused_; 990 bool paused_;
983 bool errors_are_fatal_; 991 bool errors_are_fatal_;
984 }; 992 };
985 993
986 } // namespace dart 994 } // namespace dart
987 995
988 #endif // VM_ISOLATE_H_ 996 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698