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

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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.h
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 1847f5bc9299c8dc41d1024689b73e72d2646597..00f601f32c9d39908b85cc7762da1ba1d4170548 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -261,15 +261,20 @@ 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;
}
- void CloseTimelineBlock();
class Log* log() const;
LongJumpScope* long_jump_base() const { return state_.long_jump_base; }
@@ -296,6 +301,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698