tracing_service_impl: Remove consumers_
It was only used for DCHECKs. The implementation is going to change.
Change-Id: I8f07a1bc8250ebfda092ab3eb5f2d56423638b2a
diff --git a/src/tracing/service/tracing_service_impl.cc b/src/tracing/service/tracing_service_impl.cc
index 87bb223..8928296 100644
--- a/src/tracing/service/tracing_service_impl.cc
+++ b/src/tracing/service/tracing_service_impl.cc
@@ -485,8 +485,6 @@
reinterpret_cast<void*>(consumer), static_cast<uint64_t>(uid));
std::unique_ptr<ConsumerEndpointImpl> endpoint(
new ConsumerEndpointImpl(this, task_runner_, consumer, uid));
- auto it_and_inserted = consumers_.emplace(endpoint.get());
- PERFETTO_DCHECK(it_and_inserted.second);
// Consumer might go away before we're able to send the connect notification,
// if that is the case just bail out.
auto weak_ptr = endpoint->weak_ptr_factory_.GetWeakPtr();
@@ -500,11 +498,9 @@
void TracingServiceImpl::DisconnectConsumer(ConsumerEndpointImpl* consumer) {
PERFETTO_DCHECK_THREAD(thread_checker_);
PERFETTO_DLOG("Consumer %p disconnected", reinterpret_cast<void*>(consumer));
- PERFETTO_DCHECK(consumers_.count(consumer));
if (consumer->tracing_session_id_)
FreeBuffers(consumer->tracing_session_id_); // Will also DisableTracing().
- consumers_.erase(consumer);
// At this point no more pointers to |consumer| should be around.
PERFETTO_DCHECK(!std::any_of(
@@ -518,7 +514,6 @@
const std::string& key) {
PERFETTO_DCHECK_THREAD(thread_checker_);
PERFETTO_DLOG("Consumer %p detached", reinterpret_cast<void*>(consumer));
- PERFETTO_DCHECK(consumers_.count(consumer));
TracingSessionID tsid = consumer->tracing_session_id_;
TracingSession* tracing_session;
@@ -561,7 +556,6 @@
PERFETTO_DCHECK_THREAD(thread_checker_);
PERFETTO_DLOG("Consumer %p attaching to session %s",
reinterpret_cast<void*>(consumer), key.c_str());
- PERFETTO_DCHECK(consumers_.count(consumer));
if (consumer->tracing_session_id_) {
PERFETTO_ELOG(
diff --git a/src/tracing/service/tracing_service_impl.h b/src/tracing/service/tracing_service_impl.h
index 92e743c..2e6ae53 100644
--- a/src/tracing/service/tracing_service_impl.h
+++ b/src/tracing/service/tracing_service_impl.h
@@ -905,7 +905,6 @@
std::multimap<std::string /*name*/, RegisteredDataSource> data_sources_;
std::map<ProducerID, ProducerEndpointImpl*> producers_;
- std::set<ConsumerEndpointImpl*> consumers_;
std::map<RelayClientID, RelayEndpointImpl*> relay_clients_;
std::map<TracingSessionID, TracingSession> tracing_sessions_;
std::map<BufferID, std::unique_ptr<TraceBuffer>> buffers_;