diff options
Diffstat (limited to 'src/tracing/ipc/service/producer_ipc_service.cc')
-rw-r--r-- | src/tracing/ipc/service/producer_ipc_service.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/tracing/ipc/service/producer_ipc_service.cc b/src/tracing/ipc/service/producer_ipc_service.cc index 76ae2e848..bd79f4fd0 100644 --- a/src/tracing/ipc/service/producer_ipc_service.cc +++ b/src/tracing/ipc/service/producer_ipc_service.cc @@ -79,16 +79,21 @@ void ProducerIPCService::InitializeConnection( break; } + bool dcheck_mismatch = false; #if PERFETTO_DCHECK_IS_ON() - if (req.build_flags() == - protos::gen::InitializeConnectionRequest::BUILD_FLAGS_DCHECKS_OFF) { + dcheck_mismatch = + req.build_flags() == + protos::gen::InitializeConnectionRequest::BUILD_FLAGS_DCHECKS_OFF; +#else + dcheck_mismatch = + req.build_flags() == + protos::gen::InitializeConnectionRequest::BUILD_FLAGS_DCHECKS_ON; +#endif + if (dcheck_mismatch) { PERFETTO_LOG( - "The producer is built with NDEBUG but the service binary was built " - "with the DEBUG flag. This will likely cause crashes."); - // The other way round (DEBUG producer with NDEBUG service) is expected to - // work. + "The producer and the service binaries are built using different " + "DEBUG/NDEBUG flags. This will likely cause crashes."); } -#endif // If the producer provided an SMB, tell the service to attempt to adopt it. std::unique_ptr<SharedMemory> shmem; @@ -114,8 +119,7 @@ void ProducerIPCService::InitializeConnection( producer.get(), client_info.uid(), req.producer_name(), req.shared_memory_size_hint_bytes(), /*in_process=*/false, smb_scraping_mode, - req.shared_memory_page_size_hint_bytes(), std::move(shmem), - req.sdk_version()); + req.shared_memory_page_size_hint_bytes(), std::move(shmem)); // Could happen if the service has too many producers connected. if (!producer->service_endpoint) { @@ -132,7 +136,6 @@ void ProducerIPCService::InitializeConnection( auto async_res = ipc::AsyncResult<protos::gen::InitializeConnectionResponse>::Create(); async_res->set_using_shmem_provided_by_producer(using_producer_shmem); - async_res->set_direct_smb_patching_supported(true); response.Resolve(std::move(async_res)); } |