blob: d1523ef13501080318ec553b63d6674275328117 [file] [log] [blame]
Winson Chunga657ac92019-12-09 16:43:46 -08001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19import "frameworks/base/packages/SystemUI/src/com/android/systemui/tracing/sysui_trace.proto";
20
21package com.android.systemui.tracing;
22
23option java_multiple_files = true;
24
25/* represents a file full of system ui trace entries.
26 Encoded, it should start with 0x9 0x53 0x59 0x53 0x55 0x49 0x54 0x52 0x43 (.SYSUITRC), such
27 that they can be easily identified. */
28message SystemUiTraceFileProto {
29
30 /* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L
31 (this is needed because enums have to be 32 bits and there's no nice way to put 64bit
32 constants into .proto files. */
33 enum MagicNumber {
34 INVALID = 0;
35 MAGIC_NUMBER_L = 0x55535953; /* SYSU (little-endian ASCII) */
36 MAGIC_NUMBER_H = 0x43525449; /* ITRC (little-endian ASCII) */
37 }
38
39 optional fixed64 magic_number = 1; /* Must be the first field, set to value in MagicNumber */
40 repeated SystemUiTraceEntryProto entry = 2;
41}
42
43/* one system ui trace entry. */
44message SystemUiTraceEntryProto {
45 /* required: elapsed realtime in nanos since boot of when this entry was logged */
46 optional fixed64 elapsed_realtime_nanos = 1;
47
48 optional SystemUiTraceProto system_ui = 3;
49}