/base/hiviewdfx/faultloggerd/interfaces/common/ |
H A D | dfx_frame.h | 39 uint64_t pc {0}; 64 DfxFrame(uint64_t pc, uint64_t sp = 0) : pc(pc), sp(sp) {} in DfxFrame() 66 DfxFrame(uint64_t pc, uint64_t funcOffset, const char *mapName, const char *funcName) in DfxFrame() 67 : pc(pc), funcOffset(funcOffset), mapName(mapName), funcName(funcName) {} in DfxFrame() 71 return (pc == b.pc) && (sp == b.sp); in operator ==() 75 return (pc ! in operator !=() [all...] |
/base/hiviewdfx/hiview/utility/common_utils/test/unittest/common/ |
H A D | utility_common_utils_test.cpp | 209 std::string stack = R"("#00 pc 00000000000cfaac /system/lib/ld-musl-aarch64.so.1 in HWTEST_F() 210 #01 pc 00000000000cfc60 /system/lib/ld-musl-aarch64.so.1(raise+76) in HWTEST_F() 211 #02 pc 0000000000094c98 /system/lib/ld-musl-aarch64.so.1(abort+20) in HWTEST_F() 212 #03 pc 00000000000af8d8 /system/lib64/libc++.so(c790e35ba2b0181d76f8e722e0f6670ff6aaf23c) in HWTEST_F() 213 #04 pc 0000000000098004 /system/lib64/libc++.so(c790e35ba2b0181d76f8e722e0f6670ff6aaf23c) in HWTEST_F() 214 #05 pc 00000000000aea80 /system/lib64/libc++.so(c790e35ba2b0181d76f8e722e0f6670ff6aaf23c) in HWTEST_F() 215 #06 pc 00000000000b1d6c /system/lib64/libc++.so(__cxa_rethrow+216)(c790e35ba2b0181d76f8e722e0f6670ff6aaf23c) in HWTEST_F() 216 #07 pc 000000000010020c /system/lib64/libbms.z.so(3256be1e0b8fdc2b4e25a28f1c2086eb) in HWTEST_F() 217 #08 pc 0000000000105e58 /system/lib64/libbms.z.so(3256be1e0b8fdc2b4e25a28f1c2086eb) in HWTEST_F() 218 #09 pc 0000000000 in HWTEST_F() [all...] |
/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/include/ |
H A D | fp_unwinder.h | 50 size_t Unwind(uintptr_t pc, uintptr_t fp, uintptr_t* pcs, size_t maxSize, size_t skipFrameNum = 0) in Unwind() argument 70 pcs[index - skipFrameNum] = pc; in Unwind() 75 (!ReadUptr(prevFp + sizeof(uintptr_t), pc))) { in Unwind() 85 NO_SANITIZE size_t UnwindSafe(uintptr_t pc, uintptr_t fp, uintptr_t* pcs, size_t maxSize, size_t skipFrameNum = 0) in UnwindSafe() argument 99 pcs[index - skipFrameNum] = pc; in UnwindSafe() 104 (!ReadUptrSafe(prevFp + sizeof(uintptr_t), pfd[PIPE_WRITE], pc))) { in UnwindSafe() 107 pc = pc > 0x4 ? pc - 0x4 : pc; // adjus in UnwindSafe() [all...] |
H A D | dfx_accessors.h | 41 static bool GetMapByPcAndCtx(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg); 45 virtual int FindUnwindTable(uintptr_t pc, UnwindTableInfo& uti, void *arg) = 0; 46 virtual int GetMapByPc(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg) = 0; 59 int FindUnwindTable(uintptr_t pc, UnwindTableInfo& uti, void *arg) override; 60 int GetMapByPc(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg) override; 78 int FindUnwindTable(uintptr_t pc, UnwindTableInfo& uti, void *arg) override; 79 int GetMapByPc(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg) override; 89 int FindUnwindTable(uintptr_t pc, UnwindTableInfo& uti, void *arg) override; 90 int GetMapByPc(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg) override;
|
H A D | dfx_ark.h | 66 uintptr_t *pc; member 70 ArkUnwindParam(void *ctx, ReadMemFunc readMem, uintptr_t *fp, uintptr_t *sp, uintptr_t *pc, in ArkUnwindParam() 72 : ctx(ctx), readMem(readMem), fp(fp), sp(sp), pc(pc), in ArkUnwindParam() 87 static int GetArkNativeFrameInfo(int pid, uintptr_t& pc, uintptr_t& fp, uintptr_t& sp, 91 uintptr_t *fp, uintptr_t *sp, uintptr_t *pc, uintptr_t* methodid, bool *isJsFrame);
|
H A D | dfx_regs.h | 46 virtual bool StepIfSignalFrame(uintptr_t pc, std::shared_ptr<DfxMemory> memory) = 0; 61 void SetPc(uintptr_t pc); 64 void GetSpecialRegs(uintptr_t& fp, uintptr_t& lr, uintptr_t& sp, uintptr_t& pc) const; 65 void SetSpecialRegs(uintptr_t fp, uintptr_t lr, uintptr_t sp, uintptr_t pc); 83 bool StepIfSignalFrame(uintptr_t pc, std::shared_ptr<DfxMemory> memory) override; 97 bool StepIfSignalFrame(uintptr_t pc, std::shared_ptr<DfxMemory> memory) override; 111 bool StepIfSignalFrame(uintptr_t pc, std::shared_ptr<DfxMemory> memory) override; 125 bool StepIfSignalFrame(uintptr_t pc, std::shared_ptr<DfxMemory> memory) override;
|
H A D | dfx_hap.h | 32 bool ParseHapInfo(pid_t pid, uint64_t pc, uintptr_t methodid, std::shared_ptr<DfxMap> map, 36 bool ParseHapFileInfo(uint64_t pc, uintptr_t methodid, std::shared_ptr<DfxMap> map, JsFunction *jsFunction); 37 bool ParseHapMemInfo(pid_t pid, uint64_t pc, uintptr_t methodid, std::shared_ptr<DfxMap> map,
|
H A D | dwarf_section.h | 34 bool LinearSearchEntry(uintptr_t pc, struct UnwindTableInfo uti, struct UnwindEntryInfo& uei);
35 bool SearchEntry(uintptr_t pc, struct UnwindTableInfo uti, struct UnwindEntryInfo& uei);
36 bool Step(uintptr_t pc, uintptr_t fdeAddr, std::shared_ptr<RegLocState> rs);
|
H A D | dwarf_cfa_instructions.h | 34 bool Parse(uintptr_t pc, FrameDescEntry fde, RegLocState& rsState);
37 bool Iterate(uintptr_t pc, FrameDescEntry fde, uintptr_t instStart, uintptr_t instEnd, RegLocState &rsState);
|
H A D | dfx_map.h | 52 uint64_t GetRelPc(uint64_t pc); 85 bool Contain(uint64_t pc) const in Contain() 87 return (pc >= begin && pc < end); in Contain()
|
/base/hiviewdfx/faultloggerd/test/fuzztest/faultloggerdunwinder_fuzzer/ |
H A D | faultloggerdunwinder_fuzzer.cpp | 43 uintptr_t pc; in TestGetArkNativeFrameInfo() local 46 int offsetTotalLength = sizeof(pid) + sizeof(pc) + sizeof(fp) + sizeof(sp); in TestGetArkNativeFrameInfo() 52 STREAM_TO_VALUEINFO(data, pc); in TestGetArkNativeFrameInfo() 59 DfxArk::GetArkNativeFrameInfo(pid, pc, fp, sp, jsFrames, size); in TestGetArkNativeFrameInfo() 64 uintptr_t pc; in TestStepArkFrame() local 68 int offsetTotalLength = sizeof(pc) + sizeof(fp) + sizeof(sp) + sizeof(methodid); in TestStepArkFrame() 73 STREAM_TO_VALUEINFO(data, pc); in TestStepArkFrame() 80 DfxArk::StepArkFrame(&dfxMemory, &(Unwinder::AccessMem), &fp, &sp, &pc, &methodid, &isJsFrame); in TestStepArkFrame() 86 uintptr_t pc; in TestStepArkFrameWithJit() local 89 int offsetTotalLength = sizeof(pc) in TestStepArkFrameWithJit() 126 uintptr_t pc; TestParseArkFrameInfoLocal() local 182 uint64_t pc; TestDfxHap() local [all...] |
/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/ |
H A D | dfx_hap.cpp | 43 bool DfxHap::ParseHapInfo(pid_t pid, uint64_t pc, uintptr_t methodid, std::shared_ptr<DfxMap> map, in ParseHapInfo() argument 58 if (!ParseHapFileInfo(pc, methodid, map, jsFunction)) { in ParseHapInfo() 63 if (!ParseHapMemInfo(pid, pc, methodid, map, jsFunction)) { in ParseHapInfo() 74 bool DfxHap::ParseHapFileInfo(uint64_t pc, uintptr_t methodid, std::shared_ptr<DfxMap> map, JsFunction *jsFunction) in ParseHapFileInfo() argument 81 if (DfxArk::ParseArkFileInfo(static_cast<uintptr_t>(pc), methodid, static_cast<uintptr_t>(map->begin), in ParseHapFileInfo() 83 DFXLOGW("Failed to parse ark file info, pc: %{public}p, begin: %{public}p", in ParseHapFileInfo() 84 reinterpret_cast<void *>(pc), reinterpret_cast<void *>(map->begin)); in ParseHapFileInfo() 92 bool DfxHap::ParseHapMemInfo(pid_t pid, uint64_t pc, uintptr_t methodid, std::shared_ptr<DfxMap> map, in ParseHapMemInfo() argument 104 if (DfxArk::ParseArkFrameInfo(static_cast<uintptr_t>(pc), methodid, static_cast<uintptr_t>(map->begin), in ParseHapMemInfo() 106 DFXLOGW("Failed to parse ark frame info, pc in ParseHapMemInfo() [all...] |
H A D | dfx_accessors.cpp | 46 bool DfxAccessors::GetMapByPcAndCtx(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg) in GetMapByPcAndCtx() argument 52 if (ctx->map != nullptr && ctx->map->Contain(static_cast<uint64_t>(pc))) { in GetMapByPcAndCtx() 58 if (ctx->maps == nullptr || !ctx->maps->FindMapByAddr(pc, map) || (map == nullptr)) { in GetMapByPcAndCtx() 131 int DfxAccessorsLocal::FindUnwindTable(uintptr_t pc, UnwindTableInfo& uti, void *arg) in FindUnwindTable() argument 145 ret = elf->FindUnwindTableInfo(pc, ctx->map, uti); in FindUnwindTable() 147 ret = DfxElf::FindUnwindTableLocal(pc, uti); in FindUnwindTable() 155 int DfxAccessorsLocal::GetMapByPc(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg) in GetMapByPc() argument 157 if (!DfxAccessors::GetMapByPcAndCtx(pc, map, arg)) { in GetMapByPc() 228 int DfxAccessorsRemote::FindUnwindTable(uintptr_t pc, UnwindTableInfo& uti, void *arg) in FindUnwindTable() argument 235 if (pc > in FindUnwindTable() 253 GetMapByPc(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg) GetMapByPc() argument 277 FindUnwindTable(uintptr_t pc, UnwindTableInfo& uti, void *arg) FindUnwindTable() argument 285 GetMapByPc(uintptr_t pc, std::shared_ptr<DfxMap>& map, void *arg) GetMapByPc() argument [all...] |
H A D | unwinder.cpp | 176 bool Step(uintptr_t& pc, uintptr_t& sp, void *ctx); 177 bool FpStep(uintptr_t& fp, uintptr_t& pc, void *ctx); 188 bool GetFrameByPc(uintptr_t pc, std::shared_ptr<DfxMaps> maps, DfxFrame& frame); 207 uintptr_t pc = 0; member 228 void DoPcAdjust(uintptr_t& pc); 379 bool Unwinder::Step(uintptr_t& pc, uintptr_t& sp, void *ctx) in Step() argument 381 return impl_->Step(pc, sp, ctx); in Step() 384 bool Unwinder::FpStep(uintptr_t& fp, uintptr_t& pc, void *ctx) in FpStep() argument 386 return impl_->FpStep(fp, pc, ctx); in FpStep() 419 bool Unwinder::GetFrameByPc(uintptr_t pc, st argument 826 uintptr_t pc = regs_->GetPc(); UnwindByFp() local 841 FpStep(uintptr_t& fp, uintptr_t& pc, void *ctx) FpStep() argument 872 Step(uintptr_t& pc, uintptr_t& sp, void *ctx) Step() argument 1106 DoPcAdjust(uintptr_t& pc) DoPcAdjust() argument 1279 GetFrameByPc(uintptr_t pc, std::shared_ptr<DfxMaps> maps, DfxFrame &frame) GetFrameByPc() argument 1357 GetSymbolByPc(uintptr_t pc, std::shared_ptr<DfxMaps> maps, std::string& funcName, uint64_t& funcOffset) GetSymbolByPc() argument [all...] |
H A D | dfx_regs.cpp | 155 void DfxRegs::GetSpecialRegs(uintptr_t& fp, uintptr_t& lr, uintptr_t& sp, uintptr_t& pc) const in GetSpecialRegs() 162 pc = regsData_[REG_PC]; in GetSpecialRegs() 165 void DfxRegs::SetSpecialRegs(uintptr_t fp, uintptr_t lr, uintptr_t sp, uintptr_t pc) in SetSpecialRegs() argument 172 regsData_[REG_PC] = pc; in SetSpecialRegs() 190 void DfxRegs::SetPc(uintptr_t pc) in SetPc() argument 192 regsData_[REG_PC] = pc; in SetPc() 213 uintptr_t fp = 0, lr = 0, sp = 0, pc = 0; in GetSpecialRegsName() local 214 GetSpecialRegs(fp, lr, sp, pc); in GetSpecialRegsName() 215 if (val == pc) { in GetSpecialRegsName() 216 return "pc"; in GetSpecialRegsName() 248 uintptr_t fp = 0, lr = 0, sp = 0, pc = 0; PrintSpecialRegs() local [all...] |
H A D | dwarf_section.cpp | 36 bool DwarfSection::LinearSearchEntry(uintptr_t pc, struct UnwindTableInfo uti, struct UnwindEntryInfo& uei)
in LinearSearchEntry() argument 47 if (pc >= fdeInfo.pcStart && pc < fdeInfo.pcEnd) {
in LinearSearchEntry() 60 bool DwarfSection::SearchEntry(uintptr_t pc, struct UnwindTableInfo uti, struct UnwindEntryInfo& uei)
in SearchEntry() argument 66 DFXLOGU("SearchEntry pc: %{public}p segbase:%{public}p, tableData:%{public}p, tableLen: %{public}u",
in SearchEntry() 67 (void*)pc, (void*)segbase, (void*)tableData, (uint32_t)fdeCount);
in SearchEntry() 84 if (startPc == pc) {
in SearchEntry() 91 } else if (pc < startPc) {
in SearchEntry() 117 bool DwarfSection::Step(uintptr_t pc, uintptr_t fdeAddr, std::shared_ptr<RegLocState> rs)
in Step() argument 127 if (pc < fdeInf in Step() [all...] |
H A D | dfx_frame_formatter.cpp | 56 uint64_t pc = frame->relPc == 0 ? frame->pc : frame->relPc; in GetFrameStr() local 58 data = StringPrintf("#%02zu pc %016" PRIx64, frame->index, pc); in GetFrameStr() 60 data = StringPrintf("#%02zu pc %08" PRIx64, frame->index, pc); in GetFrameStr()
|
/base/hiviewdfx/hicollie/frameworks/native/thread_sampler/ |
H A D | sample_stack_printer.cpp | 27 uintptr_t pc, int32_t count, uint64_t level, SampleStackItem* acientNode)
in Insert() 33 if (curNode->pc == pc) {
in Insert() 38 if (curNode->pc == 0) {
in Insert() 39 curNode->pc = pc;
in Insert() 44 unwinder_->GetFrameByPc(pc, maps_, *(curNode->current));
in Insert() 54 return Insert(curNode->child, pc, count, level, acientNode);
in Insert() 57 if (curNode->child->pc == pc) {
in Insert() 26 Insert(SampleStackItem* curNode, uintptr_t pc, int32_t count, uint64_t level, SampleStackItem* acientNode) Insert() argument [all...] |
/base/hiviewdfx/faultloggerd/test/unittest/unwind/ |
H A D | fp_unwinder_test.cpp | 47 uintptr_t regs[2]; // 2: pc and fp reg in HWTEST_F() 49 uintptr_t pc = regs[0]; in HWTEST_F() local 53 auto unwSz = FpUnwinder::GetPtr()->Unwind(pc, fp, pcs, maxSize); in HWTEST_F() 60 frame.pc = static_cast<uint64_t>(pcs[i]); in HWTEST_F() 79 uintptr_t regs[2]; // 2: pc and fp reg in HWTEST_F() 81 uintptr_t pc = regs[0]; in HWTEST_F() local 85 auto unwSz = FpUnwinder::GetPtr()->UnwindSafe(pc, fp, pcs, maxSize); in HWTEST_F() 92 frame.pc = static_cast<uint64_t>(pcs[i]); in HWTEST_F()
|
H A D | dfx_hap_test.cpp | 46 uint64_t pc = 1; in HWTEST_F() local 51 bool res = dfxHap.ParseHapInfo(pid, pc, methodid, map, nullptr); in HWTEST_F() 53 res = dfxHap.ParseHapInfo(pid, pc, methodid, map, &jsFunction); in HWTEST_F() 56 res = dfxHap.ParseHapInfo(pid, pc, methodid, map, &jsFunction); in HWTEST_F() 117 uint64_t pc = 1; in HWTEST_F() local 121 auto res = dfxHap.ParseHapMemInfo(pid, pc, methodid, map, nullptr); in HWTEST_F() 123 res = dfxHap.ParseHapMemInfo(pid, pc, methodid, map, &jsFunction); in HWTEST_F()
|
/base/hiviewdfx/faultloggerd/test/funchook/ |
H A D | dfx_hook_utils.c | 54 unw_word_t pc; in LogBacktrace() local 62 if (unw_get_reg(&cursor, UNW_REG_IP, (unw_word_t*)(&pc))) { in LogBacktrace() 66 if (index > MIN_FRAME && prevPc == pc) { in LogBacktrace() 69 prevPc = pc; in LogBacktrace()
|
/base/hiviewdfx/faultloggerd/test/benchmarktest/unwind/ |
H A D | unwind_local_benchmark.cpp | 68 unw_word_t pc = 0;
in UnwindLocal() local 71 if ((unw_get_reg(&cursor, UNW_REG_IP, (unw_word_t*)(&(pc)))) || (prevPc == pc)) {
in UnwindLocal() 74 pcs.emplace_back(pc);
in UnwindLocal() 75 prevPc = pc;
in UnwindLocal()
|
H A D | unwind_remote_benchmark.cpp | 87 unw_word_t pc = 0;
in UnwindRemote() local 90 if ((unw_get_reg(&cursor, UNW_REG_IP, (unw_word_t*)(&(pc)))) || (prevPc == pc)) {
in UnwindRemote() 93 pcs.emplace_back(pc);
in UnwindRemote() 94 prevPc = pc;
in UnwindRemote()
|
/base/hiviewdfx/hicollie/frameworks/native/thread_sampler/include/ |
H A D | sample_stack_printer.h | 30 uintptr_t pc;
member 37 SampleStackItem() : pc(0),
in SampleStackItem() 68 uintptr_t pc, int32_t count, uint64_t level, SampleStackItem* acientNode);
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/async_stack/ |
H A D | fp_unwinder.cpp | 59 uintptr_t pc = *reinterpret_cast<uintptr_t*>(fp + sizeof(uintptr_t)); in Unwind() local 60 pcs[index - skipFrameNum] = pc > 0x4 ? pc - 0x4 : pc; // adjust pc in Arm64 architecture in Unwind()
|