Lines Matching full:branch
27 std::string ETMBranchToProtoString(const std::vector<bool>& branch) { in ETMBranchToProtoString() argument
28 size_t bytes = (branch.size() + 7) / 8; in ETMBranchToProtoString()
30 for (size_t i = 0; i < branch.size(); i++) { in ETMBranchToProtoString()
31 if (branch[i]) { in ETMBranchToProtoString()
39 std::vector<bool> branch(bit_size, false); in ProtoStringToETMBranch() local
42 branch[i] = true; in ProtoStringToETMBranch()
45 return branch; in ProtoStringToETMBranch()
205 [this](const ETMBranchList& branch) { ProcessBranchList(branch); }); in ProcessRecord() argument
286 ++branch_map[branch_list.addr][branch_list.branch]; in ProcessBranchList()
387 for (const auto& [branch, _] : branch_map) { in Write()
388 new_branch_count += branch.size(); in Write()
402 for (const auto& [branch, count] : branch_map) { in Write()
404 proto_branch->set_branch(ETMBranchToProtoString(branch)); in Write()
405 proto_branch->set_branch_size(branch.size()); in Write()
424 for (const LBRBranch& branch : sample.branches) { in Write() local
426 proto_branch->set_from_binary_id(branch.from_binary_id); in Write()
427 proto_branch->set_to_binary_id(branch.to_binary_id); in Write()
428 proto_branch->set_from_vaddr_in_file(branch.from_vaddr_in_file); in Write()
429 proto_branch->set_to_vaddr_in_file(branch.to_vaddr_in_file); in Write()
467 LOG(ERROR) << "failed to serialize branch list binary map"; in WriteProtoBranchList()
570 std::vector<bool> branch = in AddETMBinary() local
571 ProtoStringToETMBranch(proto_branch.branch(), proto_branch.branch_size()); in AddETMBinary()
572 b_map[branch] = proto_branch.count(); in AddETMBinary()
588 LBRBranch& branch = sample.branches[j]; in AddLBRData() local
589 branch.from_binary_id = proto_branch.from_binary_id(); in AddLBRData()
590 branch.to_binary_id = proto_branch.to_binary_id(); in AddLBRData()
591 branch.from_vaddr_in_file = proto_branch.from_vaddr_in_file(); in AddLBRData()
592 branch.to_vaddr_in_file = proto_branch.to_vaddr_in_file(); in AddLBRData()
704 for (const auto& [branch, count] : branches) { in DumpBranchListFile()
706 for (auto it = branch.rbegin(); it != branch.rend(); ++it) { in DumpBranchListFile()
709 PrintIndented(3, "branch[%zu].branch: %s\n", branch_id, s.c_str()); in DumpBranchListFile()
710 PrintIndented(3, "branch[%zu].count: %" PRIu64 "\n", branch_id, count); in DumpBranchListFile()
724 const auto& branch = sample.branches[j]; in DumpBranchListFile() local
725 PrintIndented(2, "branch[%zu].from_binary_id: %u\n", j, branch.from_binary_id); in DumpBranchListFile()
726 PrintIndented(2, "branch[%zu].from_vaddr_in_file: 0x%" PRIx64 "\n", j, in DumpBranchListFile()
727 branch.from_vaddr_in_file); in DumpBranchListFile()
728 PrintIndented(2, "branch[%zu].to_binary_id: %u\n", j, branch.to_binary_id); in DumpBranchListFile()
729 PrintIndented(2, "branch[%zu].to_vaddr_in_file: 0x%" PRIx64 "\n", j, in DumpBranchListFile()
730 branch.to_vaddr_in_file); in DumpBranchListFile()