diff options
Diffstat (limited to 'src/traced/service/service.cc')
-rw-r--r-- | src/traced/service/service.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/traced/service/service.cc b/src/traced/service/service.cc index 72f19ac62..c9d633590 100644 --- a/src/traced/service/service.cc +++ b/src/traced/service/service.cc @@ -43,6 +43,10 @@ #include <sys/system_properties.h> #endif +#if PERFETTO_BUILDFLAG(PERFETTO_ZLIB) +#include "src/tracing/core/zlib_compressor.h" +#endif + namespace perfetto { namespace { #if defined(PERFETTO_SET_SOCKET_PERMISSIONS) @@ -158,7 +162,11 @@ int PERFETTO_EXPORT_ENTRYPOINT ServiceMain(int argc, char** argv) { base::UnixTaskRunner task_runner; std::unique_ptr<ServiceIPCHost> svc; - svc = ServiceIPCHost::CreateInstance(&task_runner); + TracingService::InitOpts init_opts = {}; +#if PERFETTO_BUILDFLAG(PERFETTO_ZLIB) + init_opts.compressor_fn = &ZlibCompressFn; +#endif + svc = ServiceIPCHost::CreateInstance(&task_runner, init_opts); // When built as part of the Android tree, the two socket are created and // bound by init and their fd number is passed in two env variables. |