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

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

Issue 1685963002: Pass field to mutator thread so that it can be marked as boxed and all dependent code deoptimized (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address reviewer's comments Created 4 years, 10 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_optimizer.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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 class ObjectStore; 46 class ObjectStore;
47 class RawInstance; 47 class RawInstance;
48 class RawArray; 48 class RawArray;
49 class RawContext; 49 class RawContext;
50 class RawDouble; 50 class RawDouble;
51 class RawGrowableObjectArray; 51 class RawGrowableObjectArray;
52 class RawMint; 52 class RawMint;
53 class RawObject; 53 class RawObject;
54 class RawInteger; 54 class RawInteger;
55 class RawError; 55 class RawError;
56 class RawField;
56 class RawFloat32x4; 57 class RawFloat32x4;
57 class RawInt32x4; 58 class RawInt32x4;
58 class RawUserTag; 59 class RawUserTag;
59 class SafepointHandler; 60 class SafepointHandler;
60 class SampleBuffer; 61 class SampleBuffer;
61 class SendPort; 62 class SendPort;
62 class ServiceIdZone; 63 class ServiceIdZone;
63 class Simulator; 64 class Simulator;
64 class StackResource; 65 class StackResource;
65 class StackZone; 66 class StackZone;
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 void ResetFieldInvalidationGen() { field_invalidation_gen_ = kInvalidGen; } 636 void ResetFieldInvalidationGen() { field_invalidation_gen_ = kInvalidGen; }
636 uint32_t field_invalidation_gen() const { return field_invalidation_gen_; } 637 uint32_t field_invalidation_gen() const { return field_invalidation_gen_; }
637 638
638 void IncrPrefixInvalidationGen() { 639 void IncrPrefixInvalidationGen() {
639 prefix_invalidation_gen_++; 640 prefix_invalidation_gen_++;
640 if (prefix_invalidation_gen_ == kInvalidGen) prefix_invalidation_gen_++; 641 if (prefix_invalidation_gen_ == kInvalidGen) prefix_invalidation_gen_++;
641 } 642 }
642 void ResetPrefixInvalidationGen() { prefix_invalidation_gen_ = kInvalidGen; } 643 void ResetPrefixInvalidationGen() { prefix_invalidation_gen_ = kInvalidGen; }
643 uint32_t prefix_invalidation_gen() const { return prefix_invalidation_gen_; } 644 uint32_t prefix_invalidation_gen() const { return prefix_invalidation_gen_; }
644 645
646 // Used by background compiler which field became boxed and must trigger
647 // deoptimization in the mutator thread.
648 void AddDeoptimizingBoxedField(const Field& field);
649 // Returns Field::null() if none available in the list.
650 RawField* GetDeoptimizingBoxedField();
651
645 RawObject* InvokePendingServiceExtensionCalls(); 652 RawObject* InvokePendingServiceExtensionCalls();
646 void AppendServiceExtensionCall(const Instance& closure, 653 void AppendServiceExtensionCall(const Instance& closure,
647 const String& method_name, 654 const String& method_name,
648 const Array& parameter_keys, 655 const Array& parameter_keys,
649 const Array& parameter_values, 656 const Array& parameter_values,
650 const Instance& reply_port, 657 const Instance& reply_port,
651 const Instance& id); 658 const Instance& id);
652 void RegisterServiceExtensionHandler(const String& name, 659 void RegisterServiceExtensionHandler(const String& name,
653 const Instance& closure); 660 const Instance& closure);
654 RawInstance* LookupServiceExtensionHandler(const String& name); 661 RawInstance* LookupServiceExtensionHandler(const String& name);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 // Used to wake the isolate when it is in the pause event loop. 844 // Used to wake the isolate when it is in the pause event loop.
838 Monitor* pause_loop_monitor_; 845 Monitor* pause_loop_monitor_;
839 846
840 // Invalidation generations; used to track events occuring in parallel 847 // Invalidation generations; used to track events occuring in parallel
841 // to background compilation. The counters may overflow, which is OK 848 // to background compilation. The counters may overflow, which is OK
842 // since we check for equality to detect if an event occured. 849 // since we check for equality to detect if an event occured.
843 uint32_t cha_invalidation_gen_; 850 uint32_t cha_invalidation_gen_;
844 uint32_t field_invalidation_gen_; 851 uint32_t field_invalidation_gen_;
845 uint32_t prefix_invalidation_gen_; 852 uint32_t prefix_invalidation_gen_;
846 853
854 // Protect access to boxed_field_list_.
855 Monitor* boxed_field_list_monitor_;
856 // List of fields that became boxed and that trigger deoptimization.
857 RawGrowableObjectArray* boxed_field_list_;
858
847 // This guards spawn_count_. An isolate cannot complete shutdown and be 859 // This guards spawn_count_. An isolate cannot complete shutdown and be
848 // destroyed while there are child isolates in the midst of a spawn. 860 // destroyed while there are child isolates in the midst of a spawn.
849 Monitor* spawn_count_monitor_; 861 Monitor* spawn_count_monitor_;
850 intptr_t spawn_count_; 862 intptr_t spawn_count_;
851 863
852 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \ 864 #define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \
853 type metric_##variable##_; 865 type metric_##variable##_;
854 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE); 866 ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE);
855 #undef ISOLATE_METRIC_VARIABLE 867 #undef ISOLATE_METRIC_VARIABLE
856 868
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 intptr_t* spawn_count_; 1032 intptr_t* spawn_count_;
1021 1033
1022 Isolate::Flags isolate_flags_; 1034 Isolate::Flags isolate_flags_;
1023 bool paused_; 1035 bool paused_;
1024 bool errors_are_fatal_; 1036 bool errors_are_fatal_;
1025 }; 1037 };
1026 1038
1027 } // namespace dart 1039 } // namespace dart
1028 1040
1029 #endif // VM_ISOLATE_H_ 1041 #endif // VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698