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

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

Issue 2656723002: Moved isolate high watermark calculations into the Observatory client. (Closed)
Patch Set: Initialized _memoryHighWatermark in object.dart Created 3 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/observatory/lib/src/service/object.dart ('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 RUNTIME_VM_ISOLATE_H_ 5 #ifndef RUNTIME_VM_ISOLATE_H_
6 #define RUNTIME_VM_ISOLATE_H_ 6 #define RUNTIME_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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Visits weak object pointers. 172 // Visits weak object pointers.
173 void VisitWeakPersistentHandles(HandleVisitor* visitor); 173 void VisitWeakPersistentHandles(HandleVisitor* visitor);
174 174
175 // Prepares all threads in an isolate for Garbage Collection. 175 // Prepares all threads in an isolate for Garbage Collection.
176 void PrepareForGC(); 176 void PrepareForGC();
177 177
178 StoreBuffer* store_buffer() { return store_buffer_; } 178 StoreBuffer* store_buffer() { return store_buffer_; }
179 179
180 ThreadRegistry* thread_registry() const { return thread_registry_; } 180 ThreadRegistry* thread_registry() const { return thread_registry_; }
181 SafepointHandler* safepoint_handler() const { return safepoint_handler_; } 181 SafepointHandler* safepoint_handler() const { return safepoint_handler_; }
182 uintptr_t memory_high_watermark() const { return memory_high_watermark_; }
183 ClassTable* class_table() { return &class_table_; } 182 ClassTable* class_table() { return &class_table_; }
184 static intptr_t class_table_offset() { 183 static intptr_t class_table_offset() {
185 return OFFSET_OF(Isolate, class_table_); 184 return OFFSET_OF(Isolate, class_table_);
186 } 185 }
187 186
188 // Prefers old classes when we are in the middle of a reload. 187 // Prefers old classes when we are in the middle of a reload.
189 RawClass* GetClassForHeapWalkAt(intptr_t cid); 188 RawClass* GetClassForHeapWalkAt(intptr_t cid);
190 189
191 static intptr_t ic_miss_code_offset() { 190 static intptr_t ic_miss_code_offset() {
192 return OFFSET_OF(Isolate, ic_miss_code_); 191 return OFFSET_OF(Isolate, ic_miss_code_);
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 } 684 }
686 void set_registered_service_extension_handlers( 685 void set_registered_service_extension_handlers(
687 const GrowableObjectArray& value); 686 const GrowableObjectArray& value);
688 687
689 Monitor* threads_lock() const; 688 Monitor* threads_lock() const;
690 Thread* ScheduleThread(bool is_mutator, bool bypass_safepoint = false); 689 Thread* ScheduleThread(bool is_mutator, bool bypass_safepoint = false);
691 void UnscheduleThread(Thread* thread, 690 void UnscheduleThread(Thread* thread,
692 bool is_mutator, 691 bool is_mutator,
693 bool bypass_safepoint = false); 692 bool bypass_safepoint = false);
694 693
695 // Updates the maximum memory usage in bytes of all zones in all threads of
696 // the current isolate.
697 void UpdateMemoryHighWatermark();
698
699 // DEPRECATED: Use Thread's methods instead. During migration, these default 694 // DEPRECATED: Use Thread's methods instead. During migration, these default
700 // to using the mutator thread (which must also be the current thread). 695 // to using the mutator thread (which must also be the current thread).
701 Zone* current_zone() const { 696 Zone* current_zone() const {
702 ASSERT(Thread::Current() == mutator_thread()); 697 ASSERT(Thread::Current() == mutator_thread());
703 return mutator_thread()->zone(); 698 return mutator_thread()->zone();
704 } 699 }
705 700
706 // Accessed from generated code: 701 // Accessed from generated code:
707 StoreBuffer* store_buffer_; 702 StoreBuffer* store_buffer_;
708 Heap* heap_; 703 Heap* heap_;
709 uword user_tag_; 704 uword user_tag_;
710 RawUserTag* current_tag_; 705 RawUserTag* current_tag_;
711 RawUserTag* default_tag_; 706 RawUserTag* default_tag_;
712 RawCode* ic_miss_code_; 707 RawCode* ic_miss_code_;
713 ObjectStore* object_store_; 708 ObjectStore* object_store_;
714 ClassTable class_table_; 709 ClassTable class_table_;
715 bool single_step_; 710 bool single_step_;
716 711
717 ThreadRegistry* thread_registry_; 712 ThreadRegistry* thread_registry_;
718 SafepointHandler* safepoint_handler_; 713 SafepointHandler* safepoint_handler_;
719 uintptr_t memory_high_watermark_;
720 Dart_MessageNotifyCallback message_notify_callback_; 714 Dart_MessageNotifyCallback message_notify_callback_;
721 char* name_; 715 char* name_;
722 char* debugger_name_; 716 char* debugger_name_;
723 int64_t start_time_micros_; 717 int64_t start_time_micros_;
724 Dart_Port main_port_; 718 Dart_Port main_port_;
725 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id. 719 Dart_Port origin_id_; // Isolates created by spawnFunc have some origin id.
726 uint64_t pause_capability_; 720 uint64_t pause_capability_;
727 uint64_t terminate_capability_; 721 uint64_t terminate_capability_;
728 bool errors_fatal_; 722 bool errors_fatal_;
729 void* init_callback_data_; 723 void* init_callback_data_;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 intptr_t* spawn_count_; 989 intptr_t* spawn_count_;
996 990
997 Dart_IsolateFlags isolate_flags_; 991 Dart_IsolateFlags isolate_flags_;
998 bool paused_; 992 bool paused_;
999 bool errors_are_fatal_; 993 bool errors_are_fatal_;
1000 }; 994 };
1001 995
1002 } // namespace dart 996 } // namespace dart
1003 997
1004 #endif // RUNTIME_VM_ISOLATE_H_ 998 #endif // RUNTIME_VM_ISOLATE_H_
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698