perfetto: rework watchdog class to cope with monitoring CPU and memory
Watchdog is now a singleton class which callers can set limits on. These
limits will be checked by the Watchdog object running on another thread
and if exceeded, the process will terminate.
Bug: 73633102
Change-Id: I38c06c23b0eeab854748862dc054fac0b5ae1108
diff --git a/src/traced/probes/probes_producer.h b/src/traced/probes/probes_producer.h
index 39535e3..04f4ba7 100644
--- a/src/traced/probes/probes_producer.h
+++ b/src/traced/probes/probes_producer.h
@@ -92,7 +92,7 @@
// Keeps track of id for each type of data source.
std::map<DataSourceInstanceID, std::string> instances_;
std::map<DataSourceInstanceID, std::unique_ptr<SinkDelegate>> delegates_;
- std::map<DataSourceInstanceID, base::WatchDog> watchdogs_;
+ std::map<DataSourceInstanceID, base::Watchdog::Timer> watchdogs_;
};
} // namespace perfetto