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

Unified Diff: runtime/vm/thread.h

Issue 1363033003: Make TimelineEventBlocks reclaimable (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/thread.h
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 1847f5bc9299c8dc41d1024689b73e72d2646597..23a6a7b8c4964c831644e926e58cc46a48aacf20 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -261,10 +261,16 @@ LEAF_RUNTIME_ENTRY_LIST(DEFINE_OFFSET_METHOD)
static intptr_t OffsetFromThread(const Object& object);
static intptr_t OffsetFromThread(const RuntimeEntry* runtime_entry);
+ Mutex* timeline_block_lock() {
+ return &timeline_block_lock_;
+ }
+
+ // Only safe to access when holding |timeline_block_lock_|.
TimelineEventBlock* timeline_block() const {
return state_.timeline_block;
}
+ // Only safe to access when holding |timeline_block_lock_|.
void set_timeline_block(TimelineEventBlock* block) {
state_.timeline_block = block;
}
@@ -296,6 +302,7 @@ LEAF_RUNTIME_ENTRY_LIST(DEFINE_OFFSET_METHOD)
Isolate* isolate_;
Heap* heap_;
State state_;
+ Mutex timeline_block_lock_;
StoreBufferBlock* store_buffer_block_;
class Log* log_;
#define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/thread.cc » ('j') | runtime/vm/thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698