Revert "[vm] Add a timeline stream for recording the zone high watermark."

This ended up not being helpful, and just makes the timeline harder to read.

This reverts commit 8590919ca63a5f28946b3b1f412190711f505543.

Change-Id: I0063dea0c4f6b37bf66a54df9b1c20a73dea40d9
Reviewed-on: https://dart-review.googlesource.com/75209
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
diff --git a/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart b/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
index 40daf1e..2b7dffe 100644
--- a/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
+++ b/runtime/observatory/tests/service/get_vm_timeline_rpc_test.dart
@@ -76,10 +76,6 @@
       // Skip meta-data events.
       continue;
     }
-    if (event['ph'] == 'C') {
-      // Skip counter events, where an isolate id makes Catapult hard to read.
-      continue;
-    }
     if (event['name'] == 'Runnable' && event['ph'] == 'i') {
       // Skip Runnable events which don't have an isolate.
       continue;
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index aa4ae11..1c155bd 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -2771,6 +2771,8 @@
     thread = thread_registry()->GetFreeThreadLocked(this, is_mutator);
     ASSERT(thread != NULL);
 
+    thread->ResetHighWatermark();
+
     // Set up other values and set the TLS value.
     thread->isolate_ = this;
     ASSERT(heap() != NULL);
@@ -2792,8 +2794,6 @@
     }
     Thread::SetCurrent(thread);
     os_thread->EnableThreadInterrupts();
-
-    thread->ResetHighWatermark();
   }
   return thread;
 }
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index ba4ecc7..5bb99f2 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -467,25 +467,6 @@
   return false;
 }
 
-void Thread::SetHighWatermark(intptr_t value) {
-  zone_high_watermark_ = value;
-
-#if !defined(PRODUCT)
-  if ((isolate()->name() != NULL)) {
-    TimelineEvent* event = Timeline::GetZoneStream()->StartEvent();
-    if (event != NULL) {
-      event->Counter(strdup(isolate()->name()));
-      event->set_owns_label(true);
-      // Prevent Catapult from showing "isolateId" as another series.
-      event->set_isolate_id(ILLEGAL_PORT);
-      event->SetNumArguments(1);
-      event->FormatArgument(0, "zoneHighWatermark", "%" Pd, value);
-      event->Complete();
-    }
-  }
-#endif
-}
-
 void Thread::DeferOOBMessageInterrupts() {
   MonitorLocker ml(thread_lock_);
   defer_oob_messages_count_++;
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index cb5d6c1..d17fc3a 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -325,7 +325,7 @@
   void IncrementMemoryCapacity(uintptr_t value) {
     current_zone_capacity_ += value;
     if (current_zone_capacity_ > zone_high_watermark_) {
-      SetHighWatermark(current_zone_capacity_);
+      zone_high_watermark_ = current_zone_capacity_;
     }
   }
 
@@ -338,9 +338,7 @@
 
   uintptr_t zone_high_watermark() const { return zone_high_watermark_; }
 
-  void ResetHighWatermark() { SetHighWatermark(current_zone_capacity_); }
-
-  void SetHighWatermark(intptr_t value);
+  void ResetHighWatermark() { zone_high_watermark_ = current_zone_capacity_; }
 
   // The reusable api local scope for this thread.
   ApiLocalScope* api_reusable_scope() const { return api_reusable_scope_; }
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 98e00ce..94934e0 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -39,8 +39,7 @@
   V(Embedder, false)                                                           \
   V(GC, false)                                                                 \
   V(Isolate, false)                                                            \
-  V(VM, false)                                                                 \
-  V(Zone, false)
+  V(VM, false)
 
 // A stream of timeline events. A stream has a name and can be enabled or
 // disabled (globally and per isolate).
@@ -315,10 +314,10 @@
   void PrintJSON(JSONStream* stream) const;
 
   ThreadId thread() const { return thread_; }
+
   void set_thread(ThreadId tid) { thread_ = tid; }
 
   Dart_Port isolate_id() const { return isolate_id_; }
-  void set_isolate_id(Dart_Port id) { isolate_id_ = id; }
 
   const char* label() const { return label_; }