Chromium Code Reviews| Index: runtime/vm/thread.cc |
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc |
| index 1b3428eaa62eba6a88e01859b9b294528db1cce3..1cde2e50c4b08d6b5c6a9bc8d229b18357bd9a7b 100644 |
| --- a/runtime/vm/thread.cc |
| +++ b/runtime/vm/thread.cc |
| @@ -38,6 +38,8 @@ Thread::~Thread() { |
| delete compiler_stats_; |
| compiler_stats_ = NULL; |
| } |
| + // All zone allocated memory should be free by this point. |
| + ASSERT(current_thread_memory_ == 0); |
| // There should be no top api scopes at this point. |
| ASSERT(api_top_scope() == NULL); |
| // Delete the resusable api scope if there is one. |
| @@ -74,6 +76,8 @@ Thread::Thread(Isolate* isolate) |
| os_thread_(NULL), |
| thread_lock_(new Monitor()), |
| zone_(NULL), |
| + current_thread_memory_(0), |
| + thread_memory_high_watermark_(0), |
| api_reusable_scope_(NULL), |
| api_top_scope_(NULL), |
| top_resource_(NULL), |
| @@ -213,6 +217,7 @@ void Thread::PrintJSON(JSONStream* stream) const { |
| jsobj.AddPropertyF("id", "threads/%" Pd "", |
| OSThread::ThreadIdToIntPtr(os_thread()->trace_id())); |
| jsobj.AddProperty("kind", TaskKindToCString(task_kind())); |
| + jsobj.AddProperty("threadMemoryHighWatermark", thread_memory_high_watermark_); |
|
Cutch
2017/01/03 20:58:54
The value of 'thread_memory_high_watermark_' seems
bkonyi
2017/01/04 00:31:54
Is this still a concern given your previous commen
|
| Zone* zone = zone_; |
| { |
| JSONArray zone_info_array(&jsobj, "zones"); |