/system/extras/simpleperf/ |
D | CallChainJoiner.cpp | 45 void LRUCache::AddCallChain(pid_t tid, std::vector<uint64_t>& ips, std::vector<uint64_t>& sps) { in AddCallChain() argument 48 for (size_t i = 0; i < ips.size(); ++i) { in AddCallChain() 49 CacheNode* node = GetNode(tid, ips[i], sps[i]); in AddCallChain() 68 std::vector<uint64_t> origin_ip = ips; in AddCallChain() 91 ips.resize(chain.size()); in AddCallChain() 96 ips.push_back(top->ip); in AddCallChain() 178 const std::vector<uint64_t>& ips, const std::vector<uint64_t>& sps, in WriteCallChain() argument 195 MoveToBinaryFormat(ips.data(), ip_count, p); in WriteCallChain() 206 std::vector<uint64_t>& ips, std::vector<uint64_t>& sps) { in ReadCallChain() argument 224 ips.resize(ip_count); in ReadCallChain() [all …]
|
D | CallChainJoiner_test.cpp | 180 std::vector<uint64_t> ips; in TEST_F() local 184 ASSERT_TRUE(joiner.GetNextCallChain(pid, tid, type, ips, sps)); in TEST_F() 189 ASSERT_EQ(ips, std::vector<uint64_t>({1, 2, 3})); in TEST_F() 193 ASSERT_EQ(ips, std::vector<uint64_t>({1, 2, 3, 4, 5})); in TEST_F() 198 ASSERT_TRUE(joiner.GetNextCallChain(pid, tid, type, ips, sps)); in TEST_F() 202 ASSERT_EQ(ips, std::vector<uint64_t>({3, 4, 5})); in TEST_F() 206 ASSERT_TRUE(joiner.GetNextCallChain(pid, tid, type, ips, sps)); in TEST_F() 211 ASSERT_EQ(ips, std::vector<uint64_t>({1, 4})); in TEST_F() 215 ASSERT_EQ(ips, std::vector<uint64_t>({1, 4, 5})); in TEST_F() 220 ASSERT_FALSE(joiner.GetNextCallChain(pid, tid, type, ips, sps)); in TEST_F() [all …]
|
D | record_test.cpp | 75 ASSERT_EQ(PERF_CONTEXT_USER, r2.callchain_data.ips[0]); in TEST_F() 76 ASSERT_EQ(2u, r2.callchain_data.ips[1]); in TEST_F() 86 ASSERT_EQ(PERF_CONTEXT_USER, r4.callchain_data.ips[0]); in TEST_F() 87 ASSERT_EQ(PERF_CONTEXT_USER, r4.callchain_data.ips[1]); in TEST_F() 88 ASSERT_EQ(2u, r4.callchain_data.ips[2]); in TEST_F() 116 std::vector<uint64_t> ips = {1}; in TEST_F() local 118 ips.push_back(PERF_CONTEXT_USER); in TEST_F() 119 ips.insert(ips.end(), user_ips.begin(), user_ips.end()); in TEST_F() 121 SampleRecord expected(event_attr, 0, 1, 2, 3, 4, 5, 6, {}, ips, {}, 0); in TEST_F()
|
D | record.cpp | 538 callchain_data.ips = reinterpret_cast<uint64_t*>(p); in Parse() 592 const PerfSampleReadType& read_data, const std::vector<uint64_t>& ips, in SampleRecord() argument 610 callchain_data.ip_nr = ips.size(); in SampleRecord() 646 size += sizeof(uint64_t) * (ips.size() + 1); in SampleRecord() 697 callchain_data.ips = reinterpret_cast<uint64_t*>(p); in SampleRecord() 698 MoveToBinaryFormat(ips.data(), ips.size(), p); in SampleRecord() 715 void SampleRecord::ReplaceRegAndStackWithCallChain(const std::vector<uint64_t>& ips) { in ReplaceRegAndStackWithCallChain() argument 716 uint32_t add_size_in_callchain = ips.empty() ? 0 : sizeof(uint64_t) * (ips.size() + 1); in ReplaceRegAndStackWithCallChain() 726 BuildBinaryWithNewCallChain(new_size, ips); in ReplaceRegAndStackWithCallChain() 735 if (callchain_data.ips[i] == PERF_CONTEXT_USER) { in ExcludeKernelCallChain() [all …]
|
D | sample_tree.h | 100 std::vector<uint64_t> ips; in ProcessSampleRecord() local 102 ips.insert(ips.end(), r.callchain_data.ips, r.callchain_data.ips + r.callchain_data.ip_nr); in ProcessSampleRecord() 115 ips.push_back(PERF_CONTEXT_USER); in ProcessSampleRecord() 116 ips.insert(ips.end(), user_ips.begin(), user_ips.end()); in ProcessSampleRecord() 124 for (auto& ip : ips) { in ProcessSampleRecord()
|
D | OfflineUnwinder.cpp | 288 std::vector<uint64_t>* ips, std::vector<uint64_t>* sps) { in UnwindCallChain() argument 294 ips->clear(); in UnwindCallChain() 331 last_jit_method_frame = ips->size(); in UnwindCallChain() 333 ips->push_back(frame.pc); in UnwindCallChain() 338 if (last_jit_method_frame != UINT_MAX && last_jit_method_frame + 3 > ips->size()) { in UnwindCallChain() 347 if (ips->empty()) { in UnwindCallChain() 348 ips->push_back(ip_reg_value); in UnwindCallChain() 352 CHECK_EQ((*ips)[0], ip_reg_value); in UnwindCallChain()
|
D | CallChainJoiner.h | 73 void AddCallChain(pid_t tid, std::vector<uint64_t>& ips, std::vector<uint64_t>& sps); 154 bool AddCallChain(pid_t pid, pid_t tid, ChainType type, const std::vector<uint64_t>& ips, 157 bool GetNextCallChain(pid_t& pid, pid_t& tid, ChainType& type, std::vector<uint64_t>& ips,
|
D | record.h | 115 uint64_t* ips; member 408 const std::vector<uint64_t>& ips, const std::vector<char>& stack, 412 void ReplaceRegAndStackWithCallChain(const std::vector<uint64_t>& ips); 432 void BuildBinaryWithNewCallChain(uint32_t new_size, const std::vector<uint64_t>& ips); 633 uint64_t* ips; member 639 const std::vector<uint64_t>& ips, const std::vector<uint64_t>& sps); 656 uint64_t* ips = nullptr; member 665 const std::vector<uint64_t>& ips, const std::vector<uint64_t>& sps);
|
D | report_utils.cpp | 215 const std::vector<uint64_t>& ips, in Build() argument 218 result.reserve(ips.size()); in Build() 219 for (size_t i = 0; i < ips.size(); i++) { in Build() 220 const MapEntry* map = thread_tree_.FindMap(thread, ips[i], i < kernel_ip_count); in Build() 223 const Symbol* symbol = thread_tree_.FindSymbol(map, ips[i], &vaddr_in_file, &dso); in Build() 234 entry.ip = ips[i]; in Build()
|
D | cmd_debug_unwind.cpp | 308 std::vector<uint64_t> ips; in UnwindRecord() local 310 if (!unwinder_->UnwindCallChain(*thread, reg_set, stack.data, stack.size, &ips, &sps)) { in UnwindRecord() 319 std::vector<CallChainReportEntry> entries = callchain_report_builder_.Build(thread, ips, 0); in UnwindRecord() 545 std::vector<uint64_t> ips = sr.GetCallChain(&kernel_ip_count); in ReportUnwindingResult() local 547 ips.erase(ips.begin(), ips.begin() + kernel_ip_count); in ReportUnwindingResult() 553 std::vector<CallChainReportEntry> entries = callchain_report_builder_.Build(thread, ips, 0); in ReportUnwindingResult() 559 fprintf(out_fp_, "unwinding_ip_%zu: 0x%" PRIx64 "\n", id, unwinding_r.callchain.ips[i]); in ReportUnwindingResult()
|
D | cmd_monitor.cpp | 552 if (sr.callchain_data.ips[i] >= PERF_CONTEXT_MAX) { in DumpSampleCallchain() 553 if (sr.callchain_data.ips[i] == PERF_CONTEXT_USER) { in DumpSampleCallchain() 559 GetSymbolInfo(sr.tid_data.pid, sr.tid_data.tid, sr.callchain_data.ips[i], in_kernel); in DumpSampleCallchain() 609 std::vector<uint64_t> ips; in UnwindRecord() local 612 r.GetValidStackSize(), &ips, &sps)) { in UnwindRecord() 615 r.ReplaceRegAndStackWithCallChain(ips); in UnwindRecord()
|
D | OfflineUnwinder_impl.h | 42 size_t stack_size, std::vector<uint64_t>* ips,
|
D | cmd_record.cpp | 400 bool KeepFailedUnwindingResult(const SampleRecord& r, const std::vector<uint64_t>& ips, 1779 std::vector<uint64_t> ips; in UnwindRecord() local 1782 r.GetValidStackSize(), &ips, &sps)) { in UnwindRecord() 1792 r.GetValidStackSize(), &ips, &sps)) { in UnwindRecord() 1796 if (keep_failed_unwinding_result_ && !KeepFailedUnwindingResult(r, ips, sps)) { in UnwindRecord() 1799 r.ReplaceRegAndStackWithCallChain(ips); in UnwindRecord() 1802 CallChainJoiner::ORIGINAL_OFFLINE, ips, sps)) { in UnwindRecord() 1813 const std::vector<uint64_t>& ips, in KeepFailedUnwindingResult() argument 1819 r.time_data.time, result, r.regs_user_data, r.stack_user_data, ips, sps)); in KeepFailedUnwindingResult() 1940 std::vector<uint64_t> ips; in JoinCallChains() local [all …]
|
D | OfflineUnwinder.h | 67 size_t stack_size, std::vector<uint64_t>* ips,
|
D | record_equal_test.h | 72 EXPECT_EQ(r1.callchain_data.ips[i], r2.callchain_data.ips[i]); in CheckSampleRecordDataEqual()
|
D | cmd_report_sample.cpp | 634 std::vector<uint64_t> ips = r.GetCallChain(&kernel_ip_count); in ProcessSampleRecord() local 636 ips.erase(ips.begin(), ips.begin() + kernel_ip_count); in ProcessSampleRecord() 639 if (ips.empty()) { in ProcessSampleRecord() 643 ips.resize(1); in ProcessSampleRecord() 649 callchain_report_builder_.Build(thread, ips, kernel_ip_count); in ProcessSampleRecord()
|
D | cmd_dumprecord.cpp | 388 if (sr.callchain_data.ips[i] >= PERF_CONTEXT_MAX) { in ProcessSampleRecord() 389 if (sr.callchain_data.ips[i] == PERF_CONTEXT_USER) { in ProcessSampleRecord() 395 GetSymbolInfo(sr.tid_data.pid, sr.tid_data.tid, sr.callchain_data.ips[i], in_kernel); in ProcessSampleRecord() 418 SymbolInfo s = GetSymbolInfo(cr.pid, cr.tid, cr.ips[i], false); in ProcessCallChainRecord()
|
D | report_utils.h | 106 const std::vector<uint64_t>& ips, size_t kernel_ip_count);
|
D | cmd_record_test.cpp | 925 std::vector<uint64_t> ips = sample->GetCallChain(&kernel_ip_count); in TEST() local 926 for (size_t i = kernel_ip_count; i < ips.size(); i++) { in TEST() 927 std::string sym_name = get_symbol_name(thread, ips[i]); in TEST() 928 if (android::base::StartsWith(sym_name, "art::Method_invoke") && i + 1 < ips.size()) { in TEST() 930 std::string name = get_symbol_name(thread, ips[i + 1]); in TEST()
|
D | report_lib_interface.cpp | 471 std::vector<uint64_t> ips = r.GetCallChain(&kernel_ip_count); in SetCurrentSample() local 473 callchain_report_builder_.Build(current_thread_, ips, kernel_ip_count); in SetCurrentSample()
|