packages_list: allow filtering by pkg name
Introduces a new data source config, since this source didn't have one
before. If the new filter is non-empty, then only matching entries will
be emitted into the trace. If the filter is empty, emit everything as
before.
Tested: manually on crosshatch-userdebug
Bug: 134669419
Bug: 130543265
Change-Id: Ic484dda4e1005f295912de33914aa9bfb76d49c6
diff --git a/src/traced/probes/probes_producer.cc b/src/traced/probes/probes_producer.cc
index 5fce273..e3b7ceb 100644
--- a/src/traced/probes/probes_producer.cc
+++ b/src/traced/probes/probes_producer.cc
@@ -309,7 +309,7 @@
const DataSourceConfig& config) {
auto buffer_id = static_cast<BufferID>(config.target_buffer());
return std::unique_ptr<ProbesDataSource>(new PackagesListDataSource(
- session_id, endpoint_->CreateTraceWriter(buffer_id)));
+ config, session_id, endpoint_->CreateTraceWriter(buffer_id)));
}
std::unique_ptr<ProbesDataSource> ProbesProducer::CreateSysStatsDataSource(