Reduce binary size (1.6MB -> 600K) by removing protos/trace:lite dep
This CL removes any dependency from {traced, traced_probes, perfetto}
to //protos/trace:lite. Neither of them really require such dependency
and it causes significant binary bloat due to all the hundreds
.pb.{cc,h} generated by libprotobuf for any possible trace packet.
Specifically:
traced_probes: needs only to depend on the "zero" protos, for writing.
traced: needs the official protobuf only for the following reasons:
- Packet validation (e.g., trusted uid)
- Directly injecting some special packets (TraceConfig, uid, clocks)
Neither of them requires really the hundreds trace packets. They
can just use TrustedPacket, which doesn't pull in the other packets.
perfetto: it requires only TraceConfig, but that is a separate smaller
target.
Bug: 77316877
Test: pefetto_unittests / perfetto_integrationtests
Change-Id: I6e01b47af3313887c685ffb4614009910413bbea
diff --git a/Android.bp.extras b/Android.bp.extras
index 42c389c..daef82d 100644
--- a/Android.bp.extras
+++ b/Android.bp.extras
@@ -25,6 +25,7 @@
static_libs: [
"libgtest",
"perfetto_src_tracing_ipc",
+ "perfetto_trace_protos",
],
cflags: [
"-DPERFETTO_BUILD_WITH_ANDROID",