tp: extract out tokenizing logic from ProtoTraceTokenizer
This CL does three things:
1. Renames ProtoTraceTokenizer -> ProtoTraceReader to better reflect its
true purpose.
2. Extracts out all the actual tokenization from ProtoTraceReader into a
new ProtoTraceTokenizer class which can be reused. This includes
handling any decompression of compressed packets.
3. Updates all usage of ProtoTraceTokenizer to ProtoTraceReader.
This is needed to support handling gzip traces in DecompressTrace
without duplicating really subtle logic.
Bug: 167975440
Change-Id: I4d14aa011663b9cbbac4672a63f18f9c08e7201d
diff --git a/BUILD b/BUILD
index 9200701..6efdde8 100644
--- a/BUILD
+++ b/BUILD
@@ -1092,6 +1092,8 @@
"src/trace_processor/importers/proto/proto_incremental_state.h",
"src/trace_processor/importers/proto/proto_trace_parser.cc",
"src/trace_processor/importers/proto/proto_trace_parser.h",
+ "src/trace_processor/importers/proto/proto_trace_reader.cc",
+ "src/trace_processor/importers/proto/proto_trace_reader.h",
"src/trace_processor/importers/proto/proto_trace_tokenizer.cc",
"src/trace_processor/importers/proto/proto_trace_tokenizer.h",
"src/trace_processor/importers/proto/stack_profile_tracker.cc",