1/*
2 * Copyright (C) 2020 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 = "proto3";
18
19package simpleperf.proto;
20
21message ETMBranchList {
22
23  message Binary {
24    string path = 1;
25    string build_id = 2;
26
27    message Address {
28      // vaddr in binary, instr addr before the first branch
29      uint64 addr = 1;
30
31      message Branch {
32        // Each bit represents a branch: 0 for not branch, 1 for branch.
33        // Bit 0 comes first, bit 7 comes last.
34        bytes branch = 1;
35        uint32 branch_size = 2;
36        uint64 count = 3;
37      }
38
39      repeated Branch branches = 2;
40    }
41
42    repeated Address addrs = 3;
43  }
44
45  // Used to identify format in generated proto files.
46  // Should always be "simpleperf:EtmBranchList".
47  string magic = 1;
48  repeated Binary binaries = 2;
49}