Remove forced inlines within the proto decoder
These proto decoder methods are used within ParseFromArray in every
Perfetto protobuf. Together they are 150+ lines of code which becomes
70KB of binary size when compiled. ddiproietto@'s benchmark showed no
noticable performance drop without the inlining.
Change-Id: Ieaaa72318ce4367711cee8bb68d610aefdb77fbc
diff --git a/src/protozero/proto_decoder.cc b/src/protozero/proto_decoder.cc
index a766a28..0595c1f 100644
--- a/src/protozero/proto_decoder.cc
+++ b/src/protozero/proto_decoder.cc
@@ -46,8 +46,8 @@
// Parses one field and returns the field itself and a pointer to the next
// field to parse. If parsing fails, the returned |next| == |buffer|.
-PERFETTO_ALWAYS_INLINE ParseFieldResult
-ParseOneField(const uint8_t* const buffer, const uint8_t* const end) {
+ParseFieldResult ParseOneField(const uint8_t* const buffer,
+ const uint8_t* const end) {
ParseFieldResult res{ParseFieldResult::kAbort, buffer, Field{}};
// The first byte of a proto field is structured as follows:
@@ -172,7 +172,6 @@
return res;
}
-PERFETTO_ALWAYS_INLINE
Field ProtoDecoder::ReadField() {
ParseFieldResult res;
do {