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

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

Issue 2980033002: Moves the top_ and end_ words of the Scavenger into mutator thread. (Closed)
Patch Set: Created 3 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/stub_code_x64.cc ('k') | runtime/vm/thread.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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_THREAD_H_ 5 #ifndef RUNTIME_VM_THREAD_H_
6 #define RUNTIME_VM_THREAD_H_ 6 #define RUNTIME_VM_THREAD_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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 StackResource* top_resource() const { return top_resource_; } 358 StackResource* top_resource() const { return top_resource_; }
359 void set_top_resource(StackResource* value) { top_resource_ = value; } 359 void set_top_resource(StackResource* value) { top_resource_ = value; }
360 static intptr_t top_resource_offset() { 360 static intptr_t top_resource_offset() {
361 return OFFSET_OF(Thread, top_resource_); 361 return OFFSET_OF(Thread, top_resource_);
362 } 362 }
363 363
364 // Heap of the isolate that this thread is operating on. 364 // Heap of the isolate that this thread is operating on.
365 Heap* heap() const { return heap_; } 365 Heap* heap() const { return heap_; }
366 static intptr_t heap_offset() { return OFFSET_OF(Thread, heap_); } 366 static intptr_t heap_offset() { return OFFSET_OF(Thread, heap_); }
367 367
368 void set_top(uword value) {
369 ASSERT(heap_ != NULL);
370 top_ = value;
371 }
372 void set_end(uword value) {
373 ASSERT(heap_ != NULL);
374 end_ = value;
375 }
376
377 uword top() { return top_; }
378 uword end() { return end_; }
379
380 static intptr_t top_offset() { return OFFSET_OF(Thread, top_); }
381 static intptr_t end_offset() { return OFFSET_OF(Thread, end_); }
382
368 int32_t no_handle_scope_depth() const { 383 int32_t no_handle_scope_depth() const {
369 #if defined(DEBUG) 384 #if defined(DEBUG)
370 return no_handle_scope_depth_; 385 return no_handle_scope_depth_;
371 #else 386 #else
372 return 0; 387 return 0;
373 #endif 388 #endif
374 } 389 }
375 390
376 void IncrementNoHandleScopeDepth() { 391 void IncrementNoHandleScopeDepth() {
377 #if defined(DEBUG) 392 #if defined(DEBUG)
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 // Accessed from generated code. 703 // Accessed from generated code.
689 // ** This block of fields must come first! ** 704 // ** This block of fields must come first! **
690 // For AOT cross-compilation, we rely on these members having the same offsets 705 // For AOT cross-compilation, we rely on these members having the same offsets
691 // in SIMARM(IA32) and ARM, and the same offsets in SIMARM64(X64) and ARM64. 706 // in SIMARM(IA32) and ARM, and the same offsets in SIMARM64(X64) and ARM64.
692 // We use only word-sized fields to avoid differences in struct packing on the 707 // We use only word-sized fields to avoid differences in struct packing on the
693 // different architectures. See also CheckOffsets in dart.cc. 708 // different architectures. See also CheckOffsets in dart.cc.
694 uword stack_limit_; 709 uword stack_limit_;
695 uword stack_overflow_flags_; 710 uword stack_overflow_flags_;
696 Isolate* isolate_; 711 Isolate* isolate_;
697 Heap* heap_; 712 Heap* heap_;
713 uword top_;
714 uword end_;
698 uword top_exit_frame_info_; 715 uword top_exit_frame_info_;
699 StoreBufferBlock* store_buffer_block_; 716 StoreBufferBlock* store_buffer_block_;
700 uword vm_tag_; 717 uword vm_tag_;
701 TaskKind task_kind_; 718 TaskKind task_kind_;
702 RawStackTrace* async_stack_trace_; 719 RawStackTrace* async_stack_trace_;
703 // State that is cached in the TLS for fast access in generated code. 720 // State that is cached in the TLS for fast access in generated code.
704 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \ 721 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \
705 type_name member_name; 722 type_name member_name;
706 CACHED_CONSTANTS_LIST(DECLARE_MEMBERS) 723 CACHED_CONSTANTS_LIST(DECLARE_MEMBERS)
707 #undef DECLARE_MEMBERS 724 #undef DECLARE_MEMBERS
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 // Disable thread interrupts. 832 // Disable thread interrupts.
816 class DisableThreadInterruptsScope : public StackResource { 833 class DisableThreadInterruptsScope : public StackResource {
817 public: 834 public:
818 explicit DisableThreadInterruptsScope(Thread* thread); 835 explicit DisableThreadInterruptsScope(Thread* thread);
819 ~DisableThreadInterruptsScope(); 836 ~DisableThreadInterruptsScope();
820 }; 837 };
821 838
822 } // namespace dart 839 } // namespace dart
823 840
824 #endif // RUNTIME_VM_THREAD_H_ 841 #endif // RUNTIME_VM_THREAD_H_
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698