perfetto: set memory and CPU guardrails on traced and traced_probes

Bug: 73051936
Bug: 73052380
Change-Id: I0db375ea5b7ac4e26b52d74e860d96cdf7fbbd5d
diff --git a/src/tracing/core/service_impl.h b/src/tracing/core/service_impl.h
index 7725c12..2717d2d 100644
--- a/src/tracing/core/service_impl.h
+++ b/src/tracing/core/service_impl.h
@@ -238,6 +238,10 @@
   // session doesn't exists.
   TracingSession* GetTracingSession(TracingSessionID);
 
+  // Update the memory guard rail by using the latest information from the
+  // shared memory and trace buffers.
+  void UpdateMemoryGuardrail();
+
   base::TaskRunner* const task_runner_;
   std::unique_ptr<SharedMemory::Factory> shm_factory_;
   ProducerID last_producer_id_ = 0;