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

Unified Diff: runtime/vm/thread.h

Issue 2951333002: Moves the top_ and end_ words of the Scavenger into mutator thread. (Closed)
Patch Set: Full removal of heap's top/end offsets. Changed allocs in other archs. Created 3 years, 6 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 3a226e4ee583bb912841e21e1ba6d3006e33a63c..327794de87adc27f8d11526ed55b654bf2144949 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -366,6 +366,21 @@ class Thread : public BaseThread {
Heap* heap() const { return heap_; }
static intptr_t heap_offset() { return OFFSET_OF(Thread, heap_); }
rmacnak 2017/07/05 17:39:53 It should be possible to remove this now, right?
danunez 2017/07/05 18:12:56 Looks like it, according to a grep. Consider it go
+ void set_top_offset(uword value) {
rmacnak 2017/07/05 17:39:53 set_top
danunez 2017/07/05 18:12:56 Done.
+ ASSERT(heap_ != NULL);
+ top_ = value;
+ }
+ void set_end_offset(uword value) {
rmacnak 2017/07/05 17:39:53 set_end
danunez 2017/07/05 18:12:56 Done.
+ ASSERT(heap_ != NULL);
+ end_ = value;
+ }
+
+ uword top() { return top_; }
+ uword end() { return end_; }
+
+ static intptr_t top_offset() { return OFFSET_OF(Thread, top_); }
+ static intptr_t end_offset() { return OFFSET_OF(Thread, end_); }
+
int32_t no_handle_scope_depth() const {
#if defined(DEBUG)
return no_handle_scope_depth_;
@@ -752,6 +767,9 @@ class Thread : public BaseThread {
CompilerStats* compiler_stats_;
+ uword top_;
rmacnak 2017/07/05 17:39:53 These should move up to where heap_ is. See commen
danunez 2017/07/05 18:12:56 I placed these down here after I encountered an er
+ uword end_;
+
// Reusable handles support.
#define REUSABLE_HANDLE_FIELDS(object) object* object##_handle_;
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS)
« runtime/vm/scavenger.cc ('K') | « 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