/* * Copyright (C) 2020 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. */ syntax = "proto3"; package simpleperf.proto; message ETMBranchList { message Binary { string path = 1; string build_id = 2; message Address { // vaddr in binary, instr addr before the first branch uint64 addr = 1; message Branch { // Each bit represents a branch: 0 for not branch, 1 for branch. // Bit 0 comes first, bit 7 comes last. bytes branch = 1; uint32 branch_size = 2; uint64 count = 3; } repeated Branch branches = 2; } repeated Address addrs = 3; enum BinaryType { ELF_FILE = 0; KERNEL = 1; KERNEL_MODULE = 2; } BinaryType type = 4; message KernelBinaryInfo { // kernel_start_addr is used to convert kernel ip address to vaddr in vmlinux. // If it is zero, the Address in KERNEL binary has been converted to vaddr. Otherwise, // the Address in KERNEL binary is still ip address, and need to be converted later. uint64 kernel_start_addr = 1; } KernelBinaryInfo kernel_info = 5; } // Used to identify format in generated proto files. // Should always be "simpleperf:EtmBranchList". string magic = 1; repeated Binary binaries = 2; }