Minor cleanups in preparation of protobuf -> zero migration
This CL puts together some minor cleanups and fixes.
This is to make next CLs easier to reason about.
Notable changes:
- Fix a bug in protozero about casing of gen fields
(rare, affects only fields named_LIKE_this)
- Add zig-zag decoder + as_sint32/64 methods + tests.
- Move away from msg_case() for one-of deecoding and instead
use has_field_name() pattern. The semantic is the same.
The protozero .gen.cc classes support only has_xxx.
- Move the test messages int the protozero.test.protos
namespace. This makes it easier to deal with namespaces
in the (short) transition period when we'll have:
(1) .pbzero.h (2) .gen.h and (3) .pb.h generated classes.
Bug: 132880619
Test: perfetto_unittests
Change-Id: I3d5a58ae36230240ab11cb5b558a3c2be0db7313
diff --git a/Android.bp b/Android.bp
index bad324b..514776e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -5055,6 +5055,14 @@
],
}
+// GN: //src/tracing:sliced_protobuf_input_stream
+filegroup {
+ name: "perfetto_src_tracing_sliced_protobuf_input_stream",
+ srcs: [
+ "src/tracing/core/sliced_protobuf_input_stream.cc",
+ ],
+}
+
// GN: //src/tracing/test:api_test_support
filegroup {
name: "perfetto_src_tracing_test_api_test_support",
@@ -5081,7 +5089,6 @@
"src/tracing/core/packet_stream_validator.cc",
"src/tracing/core/shared_memory_abi.cc",
"src/tracing/core/shared_memory_arbiter_impl.cc",
- "src/tracing/core/sliced_protobuf_input_stream.cc",
"src/tracing/core/startup_trace_writer.cc",
"src/tracing/core/startup_trace_writer_registry.cc",
"src/tracing/core/trace_buffer.cc",
@@ -5454,6 +5461,7 @@
":perfetto_src_traced_service_unittests",
":perfetto_src_tracing_common",
":perfetto_src_tracing_ipc",
+ ":perfetto_src_tracing_sliced_protobuf_input_stream",
":perfetto_src_tracing_test_support",
":perfetto_src_tracing_tracing",
":perfetto_src_tracing_unittests",