blob: 76eab46b73f42dca87a86f1019b62a46e33ca255 [file] [log] [blame]
/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Use proto3 syntax as an optimization. The difference is that proto2 stores
// unknown fields seen while decoding in an internal buffer (std::string) while
// proto3 completely drops them. Since during validation we only need to check
// for the presence of the trusted fields below, we can use proto3 as a way to
// speed up this process.
//
// See https://developers.google.com/protocol-buffers/docs/proto3#unknowns and
// https://android-review.googlesource.com/c/platform/external/perfetto/+/
// 591673#17 for details.
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
import "perfetto/config/trace_config.proto";
import "perfetto/trace/chrome/chrome_trace_event.proto";
import "perfetto/trace/clock_snapshot.proto";
import "perfetto/trace/trace_stats.proto";
package perfetto.protos;
// This proto contains only the TracePacket fields that Chrome needs.
// Note that the field ids here must be kept in sync with TracePacket.
// This protobuf is here to avoid bloating the Chrome binary with symbols
// for all possible trace protos.
// TODO(b/78898755): Try using weak bindings instead of a separate proto.
message ChromeTracePacket {
ChromeEventBundle chrome_events = 5;
// The original trace config.
TraceConfig trace_config = 33;
TraceStats trace_stats = 35;
ClockSnapshot clock_snapshot = 6;
}