Add lazy startup producer class to traced.
This is sufficiently different to the heapprofd system properties to warrant
a parallel implementation.
heapprofd requires a global property that signals whether to profile at all or
whether to profile all processes.
Change-Id: I5ff5e317b9cd99310b145b5501bff3f4afccb56d
Bug: 126724929
diff --git a/src/traced/service/BUILD.gn b/src/traced/service/BUILD.gn
index 6b027c6..f351f0e 100644
--- a/src/traced/service/BUILD.gn
+++ b/src/traced/service/BUILD.gn
@@ -23,6 +23,23 @@
"../../tracing:ipc",
]
sources = [
+ "lazy_producer.cc",
+ "lazy_producer.h",
"service.cc",
]
}
+
+source_set("unittests") {
+ testonly = true
+ deps = [
+ ":service",
+ "../../../gn:default_deps",
+ "../../../gn:gtest_deps",
+ "../../base",
+ "../../base:test_support",
+ "../../tracing",
+ ]
+ sources = [
+ "lazy_producer_unittest.cc",
+ ]
+}