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

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

Issue 1350933004: Distinct block sizes for StoreBuffer/MarkingStack. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 3 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/store_buffer.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 VM_THREAD_H_ 5 #ifndef VM_THREAD_H_
6 #define VM_THREAD_H_ 6 #define VM_THREAD_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #include "vm/os_thread.h" 9 #include "vm/os_thread.h"
10 #include "vm/store_buffer.h" 10 #include "vm/store_buffer.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 CHA* cha() const; 122 CHA* cha() const;
123 void set_cha(CHA* value); 123 void set_cha(CHA* value);
124 124
125 void StoreBufferAddObject(RawObject* obj); 125 void StoreBufferAddObject(RawObject* obj);
126 void StoreBufferAddObjectGC(RawObject* obj); 126 void StoreBufferAddObjectGC(RawObject* obj);
127 #if defined(TESTING) 127 #if defined(TESTING)
128 bool StoreBufferContains(RawObject* obj) const { 128 bool StoreBufferContains(RawObject* obj) const {
129 return store_buffer_block_->Contains(obj); 129 return store_buffer_block_->Contains(obj);
130 } 130 }
131 #endif 131 #endif
132 void StoreBufferBlockProcess(bool check_threshold); 132 void StoreBufferBlockProcess(StoreBuffer::ThresholdPolicy policy);
133 static intptr_t store_buffer_block_offset() { 133 static intptr_t store_buffer_block_offset() {
134 return OFFSET_OF(Thread, store_buffer_block_); 134 return OFFSET_OF(Thread, store_buffer_block_);
135 } 135 }
136 136
137 uword top_exit_frame_info() const { return state_.top_exit_frame_info; } 137 uword top_exit_frame_info() const { return state_.top_exit_frame_info; }
138 static intptr_t top_exit_frame_info_offset() { 138 static intptr_t top_exit_frame_info_offset() {
139 return OFFSET_OF(Thread, state_) + OFFSET_OF(State, top_exit_frame_info); 139 return OFFSET_OF(Thread, state_) + OFFSET_OF(State, top_exit_frame_info);
140 } 140 }
141 141
142 StackResource* top_resource() const { return state_.top_resource; } 142 StackResource* top_resource() const { return state_.top_resource; }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 #undef DECLARE_MEMBERS 302 #undef DECLARE_MEMBERS
303 303
304 explicit Thread(bool init_vm_constants = true); 304 explicit Thread(bool init_vm_constants = true);
305 305
306 void InitVMConstants(); 306 void InitVMConstants();
307 307
308 void ClearState() { 308 void ClearState() {
309 memset(&state_, 0, sizeof(state_)); 309 memset(&state_, 0, sizeof(state_));
310 } 310 }
311 311
312 void StoreBufferRelease(bool check_threshold = true); 312 void StoreBufferRelease(
313 StoreBuffer::ThresholdPolicy policy = StoreBuffer::kCheckThreshold);
313 void StoreBufferAcquire(); 314 void StoreBufferAcquire();
314 315
315 void set_zone(Zone* zone) { 316 void set_zone(Zone* zone) {
316 state_.zone = zone; 317 state_.zone = zone;
317 } 318 }
318 319
319 void set_top_exit_frame_info(uword top_exit_frame_info) { 320 void set_top_exit_frame_info(uword top_exit_frame_info) {
320 state_.top_exit_frame_info = top_exit_frame_info; 321 state_.top_exit_frame_info = top_exit_frame_info;
321 } 322 }
322 323
323 static void SetCurrent(Thread* current); 324 static void SetCurrent(Thread* current);
324 325
325 void Schedule(Isolate* isolate, bool bypass_safepoint = false); 326 void Schedule(Isolate* isolate, bool bypass_safepoint = false);
326 void Unschedule(bool bypass_safepoint = false); 327 void Unschedule(bool bypass_safepoint = false);
327 328
328 friend class ApiZone; 329 friend class ApiZone;
329 friend class Isolate; 330 friend class Isolate;
330 friend class StackZone; 331 friend class StackZone;
331 friend class ThreadRegistry; 332 friend class ThreadRegistry;
332 DISALLOW_COPY_AND_ASSIGN(Thread); 333 DISALLOW_COPY_AND_ASSIGN(Thread);
333 }; 334 };
334 335
335 } // namespace dart 336 } // namespace dart
336 337
337 #endif // VM_THREAD_H_ 338 #endif // VM_THREAD_H_
OLDNEW
« no previous file with comments | « runtime/vm/store_buffer.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698