/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/include/ |
H A D | dfx_regs_get.h | 31 inline AT_ALWAYS_INLINE void GetLocalRegs(void* regs) in GetLocalRegs() argument 46 : [base] "+r"(regs) in GetLocalRegs() 52 inline AT_ALWAYS_INLINE void GetFramePointerMiniRegs(void *regs, size_t size) in GetFramePointerMiniRegs() argument 69 : [base] "+r"(regs) in GetFramePointerMiniRegs() 74 // Fill regs[7] with [r4, r7, r10, r11, sp, pc, unset]. 75 inline AT_ALWAYS_INLINE void GetQuickenMiniRegsAsm(void *regs) in GetQuickenMiniRegsAsm() argument 89 : [base] "+r"(regs) in GetQuickenMiniRegsAsm() 96 inline AT_ALWAYS_INLINE void GetLocalRegs(void* regs) 119 : [base] "+r"(regs) 125 inline AT_ALWAYS_INLINE void GetFramePointerMiniRegs(void *regs, size_ [all...] |
H A D | dfx_regs.h | 38 static std::shared_ptr<DfxRegs> CreateFromRegs(const UnwindMode mode, const uintptr_t* regs, 42 virtual void SetFromFpMiniRegs(const uintptr_t* regs, const size_t size) = 0; 43 virtual void SetFromQutMiniRegs(const uintptr_t* regs, const size_t size) = 0; 54 void SetRegsData(const uintptr_t* regs, const size_t size); 79 void SetFromFpMiniRegs(const uintptr_t* regs, const size_t size) override; 80 void SetFromQutMiniRegs(const uintptr_t* regs, const size_t size) override; 93 void SetFromFpMiniRegs(const uintptr_t* regs, const size_t size) override; 94 void SetFromQutMiniRegs(const uintptr_t* regs, const size_t size) override; 107 void SetFromFpMiniRegs(const uintptr_t* regs, const size_t size) override; 108 void SetFromQutMiniRegs(const uintptr_t* regs, cons [all...] |
H A D | dwarf_op.h | 43 AddressType Eval(DfxRegs& regs, AddressType initStackValue, AddressType startPtr); 46 bool Decode(DfxRegs& regs, uintptr_t& addr); 341 inline void OpReg(uint8_t opcode, DfxRegs& regs) in OpReg() argument 349 stack_.push_front(regs[reg]); in OpReg() 353 inline void OpRegx(AddressType& exprPtr, DfxRegs& regs) in OpRegx() argument 361 stack_.push_front(regs[reg]); in OpRegx() 364 inline void OpBReg(uint8_t opcode, AddressType& exprPtr, DfxRegs& regs) in OpBReg() argument 373 value += static_cast<SignedType>(regs[reg]); in OpBReg() 377 inline void OpBRegx(AddressType& exprPtr, DfxRegs& regs) in OpBRegx() argument 386 value += static_cast<SignedType>(regs[re in OpBRegx() [all...] |
/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/ |
H A D | dfx_regs_arm64.cpp | 36 regsData_[REG_AARCH64_X0] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X0]); in SetFromUcontext() 37 regsData_[REG_AARCH64_X1] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X1]); in SetFromUcontext() 38 regsData_[REG_AARCH64_X2] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X2]); in SetFromUcontext() 39 regsData_[REG_AARCH64_X3] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X3]); in SetFromUcontext() 40 regsData_[REG_AARCH64_X4] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X4]); in SetFromUcontext() 41 regsData_[REG_AARCH64_X5] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X5]); in SetFromUcontext() 42 regsData_[REG_AARCH64_X6] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X6]); in SetFromUcontext() 43 regsData_[REG_AARCH64_X7] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X7]); in SetFromUcontext() 44 regsData_[REG_AARCH64_X8] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X8]); in SetFromUcontext() 45 regsData_[REG_AARCH64_X9] = static_cast<uintptr_t>(context.uc_mcontext.regs[REG_AARCH64_X in SetFromUcontext() 71 SetFromFpMiniRegs(const uintptr_t* regs, const size_t size) SetFromFpMiniRegs() argument 82 SetFromQutMiniRegs(const uintptr_t* regs, const size_t size) SetFromQutMiniRegs() argument 108 auto regs = GetRegsData(); PrintRegs() local [all...] |
H A D | dfx_regs_riscv64.cpp | 71 void DfxRegsRiscv64::SetFromFpMiniRegs(const uintptr_t* regs, const size_t size) in SetFromFpMiniRegs() argument 76 regsData_[REG_FP] = regs[0]; // 0 : fp offset in SetFromFpMiniRegs() 77 regsData_[REG_LR] = regs[1]; // 1 : lr offset in SetFromFpMiniRegs() 78 regsData_[REG_SP] = regs[2]; // 2 : sp offset in SetFromFpMiniRegs() 79 regsData_[REG_PC] = regs[3]; // 3 : pc offset in SetFromFpMiniRegs() 82 void DfxRegsRiscv64::SetFromQutMiniRegs(const uintptr_t* regs, const size_t size) in SetFromQutMiniRegs() argument 87 regsData_[REG_RISCV64_X20] = regs[1]; // 1 : X20 offset in SetFromQutMiniRegs() 88 regsData_[REG_RISCV64_X28] = regs[2]; // 2 : X28 offset in SetFromQutMiniRegs() 89 regsData_[REG_FP] = regs[3]; // 3 : fp offset in SetFromQutMiniRegs() 90 regsData_[REG_SP] = regs[ in SetFromQutMiniRegs() 108 auto regs = GetRegsData(); PrintRegs() local [all...] |
H A D | dfx_regs_arm.cpp | 70 void DfxRegsArm::SetFromFpMiniRegs(const uintptr_t* regs, const size_t size) in SetFromFpMiniRegs() argument 75 regsData_[REG_ARM_R7] = regs[0]; // 0: R7 offset in SetFromFpMiniRegs() 76 regsData_[REG_ARM_R11] = regs[1]; // 1: R11 offset in SetFromFpMiniRegs() 77 regsData_[REG_SP] = regs[2]; // 2 : sp offset in SetFromFpMiniRegs() 78 regsData_[REG_PC] = regs[3]; // 3 : pc offset in SetFromFpMiniRegs() 81 void DfxRegsArm::SetFromQutMiniRegs(const uintptr_t* regs, const size_t size) in SetFromQutMiniRegs() argument 86 regsData_[REG_ARM_R4] = regs[0]; // 0 : r4 offset in SetFromQutMiniRegs() 87 regsData_[REG_ARM_R7] = regs[1]; // 1 : r7 offset in SetFromQutMiniRegs() 88 regsData_[REG_ARM_R10] = regs[2]; // 2 : r10 offset in SetFromQutMiniRegs() 89 regsData_[REG_ARM_R11] = regs[ in SetFromQutMiniRegs() 108 auto regs = GetRegsData(); PrintRegs() local [all...] |
H A D | dfx_regs_x86_64.cpp | 56 void DfxRegsX86_64::SetFromFpMiniRegs(const uintptr_t* regs, const size_t size) in SetFromFpMiniRegs() argument 60 void DfxRegsX86_64::SetFromQutMiniRegs(const uintptr_t* regs, const size_t size) in SetFromQutMiniRegs() argument 78 auto regs = GetRegsData(); in PrintRegs() local 81 regs[REG_X86_64_RAX], regs[REG_X86_64_RDX], regs[REG_X86_64_RCX], regs[REG_X86_64_RBX]); in PrintRegs() 84 regs[REG_X86_64_RSI], regs[REG_X86_64_RDI], regs[REG_X86_64_RB in PrintRegs() [all...] |
H A D | dfx_instructions.cpp | 38 bool DfxInstructions::Flush(DfxRegs& regs, std::shared_ptr<DfxMemory> memory, uintptr_t cfa, RegLoc loc, uintptr_t& val) in Flush() argument 54 if (location >= regs.RegsSize()) { in Flush() 58 val = regs[location]; in Flush() 62 location = dwarfOp.Eval(regs, cfa, loc.val); in Flush() 68 val = dwarfOp.Eval(regs, cfa, loc.val); in Flush() 78 bool DfxInstructions::Apply(std::shared_ptr<DfxMemory> memory, DfxRegs& regs, RegLocState& rsState, uint16_t& errCode) in Apply() argument 83 cfa = regs[rsState.cfaReg] + static_cast<uint32_t>(rsState.cfaRegOffset); in Apply() 87 if (!Flush(regs, memory, 0, cfaLoc, cfa)) { in Apply() 101 if (Flush(regs, memory, cfa, rsState.locs[i], regs[re in Apply() [all...] |
H A D | dfx_regs.cpp | 60 std::shared_ptr<DfxRegs> DfxRegs::CreateFromRegs(const UnwindMode mode, const uintptr_t* regs, in CreateFromRegs() argument 70 dfxregs->SetRegsData(regs, REG_LAST); in CreateFromRegs() 72 dfxregs->SetFromFpMiniRegs(regs, FP_MINI_REGS_SIZE); in CreateFromRegs() 74 dfxregs->SetFromQutMiniRegs(regs, QUT_MINI_REGS_SIZE); in CreateFromRegs() 85 gregset_t regs; in CreateRemoteRegs() local 87 iov.iov_base = ®s; in CreateRemoteRegs() 88 iov.iov_len = sizeof(regs); in CreateRemoteRegs() 95 dfxregs->regsData_[REG_X86_64_RAX] = regs[RAX]; in CreateRemoteRegs() 96 dfxregs->regsData_[REG_X86_64_RDX] = regs[RDX]; in CreateRemoteRegs() 97 dfxregs->regsData_[REG_X86_64_RCX] = regs[RC in CreateRemoteRegs() 126 SetRegsData(const std::vector<uintptr_t>& regs) SetRegsData() argument 131 SetRegsData(const uintptr_t* regs, const size_t size) SetRegsData() argument [all...] |
H A D | dwarf_op.cpp | 30 AddressType DwarfOp<AddressType>::Eval(DfxRegs& regs, AddressType initStackValue, AddressType startPtr)
in Eval() argument 39 if (!Decode(regs, addr)) {
in Eval() 52 bool DwarfOp<AddressType>::Decode(DfxRegs& regs, uintptr_t& addr)
in Decode() argument 316 OpReg(opcode, regs);
in Decode() 320 OpRegx(addr, regs);
in Decode() 355 OpBReg(opcode, addr, regs);
in Decode() 359 OpBRegx(addr, regs);
in Decode()
|
H A D | dfx_accessors.cpp | 123 if (ctx->regs == nullptr || reg < 0 || reg >= (int)ctx->regs->RegsSize()) { in AccessReg() 127 *val = static_cast<uintptr_t>((*(ctx->regs))[reg]); in AccessReg() 220 if (ctx->regs == nullptr || reg < 0 || reg >= (int)ctx->regs->RegsSize()) { in AccessReg() 224 *val = static_cast<uintptr_t>((*(ctx->regs))[reg]); in AccessReg()
|
/base/startup/hvb/libhvb/src/crypto/ |
H A D | hvb_hash_sha256.c | 130 static inline void rotate_regs(uint32_t regs[8]) in rotate_regs() argument 133 backup = regs[6]; in rotate_regs() 134 regs[6] = regs[5]; in rotate_regs() 135 regs[5] = regs[4]; in rotate_regs() 136 regs[4] = regs[3]; in rotate_regs() 137 regs[3] = regs[ in rotate_regs() 144 sha256_block_calc(uint32_t regs[8], const uint8_t *data) sha256_block_calc() argument 164 uint32_t regs[8]; sha256_data_blk_update() local [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() local 48 FpUnwinder::GetPcFpRegs(regs); in HWTEST_F() 49 uintptr_t pc = regs[0]; in HWTEST_F() 50 uintptr_t fp = regs[1]; in HWTEST_F() 79 uintptr_t regs[2]; // 2: pc and fp reg in HWTEST_F() local 80 FpUnwinder::GetPcFpRegs(regs); in HWTEST_F() 81 uintptr_t pc = regs[0]; in HWTEST_F() 82 uintptr_t fp = regs[1]; in HWTEST_F()
|
H A D | unwinder_test.cpp | 297 auto regs = DfxRegs::CreateRemoteRegs(child); in HWTEST_F() local 298 unwinder->SetRegs(regs); in HWTEST_F() 302 context.regs = regs; in HWTEST_F() 334 auto regs = DfxRegs::Create(); in HWTEST_F() local 335 auto regsData = regs->RawData(); in HWTEST_F() 337 unwinder->SetRegs(regs); in HWTEST_F() 340 context.regs = regs; in HWTEST_F() 421 auto regs in HWTEST_F() local 460 auto regs = DfxRegs::Create(); HWTEST_F() local 494 auto regs = DfxRegs::CreateRemoteRegs(child); HWTEST_F() local 526 auto regs = DfxRegs::Create(); HWTEST_F() local 582 auto regs = DfxRegs::Create(); HWTEST_F() local 620 auto regs = DfxRegs::Create(); HWTEST_F() local 750 auto regs = DfxRegs::Create(); HWTEST_F() local 930 uintptr_t regs[] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa}; HWTEST_F() local 953 auto regs = unwinder->GetRegs(); HWTEST_F() local [all...] |
H A D | unwinder_pac_test.cpp | 60 auto regs = DfxRegs::CreateRemoteRegs(pid); in HWTEST_F() local 62 unwinder->SetRegs(regs); in HWTEST_F() 65 context.regs = regs; in HWTEST_F() 99 auto regs = DfxRegs::CreateRemoteRegs(pid); in HWTEST_F() local 100 unwinder->SetRegs(regs); in HWTEST_F() 103 context.regs = regs; in HWTEST_F()
|
H A D | regs_test.cpp | 50 for (size_t i = 0; i < 10; i++) { // test 10 regs in HWTEST_F() 150 context.uc_mcontext.regs[i] = i; in HWTEST_F() 236 uintptr_t regs[QUT_MINI_REGS_SIZE]; in HWTEST_F() local 238 regs[i] = i + 1; in HWTEST_F() 243 auto dfxRegs = DfxRegs::CreateFromRegs(UnwindMode::FRAMEPOINTER_UNWIND, regs, sizeof(regs) / sizeof(regs[0])); in HWTEST_F() 245 ASSERT_EQ((*dfxRegs.get())[framePointer[i]], regs[i]); in HWTEST_F() 247 dfxRegs = DfxRegs::CreateFromRegs(UnwindMode::MINIMAL_UNWIND, regs, sizeof(regs) / sizeo in HWTEST_F() 253 uintptr_t regs[QUT_MINI_REGS_SIZE]; HWTEST_F() local [all...] |
H A D | instr_statistic_test.cpp | 66 auto regs = DfxRegs::CreateRemoteRegs(pid); in HWTEST_F() local 67 unwinder->SetRegs(regs); in HWTEST_F() 71 context.regs = regs; in HWTEST_F()
|
H A D | memory_test.cpp | 56 uintptr_t regs[] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa}; in HWTEST_F() local 58 ctx.regs = DfxRegs::CreateFromRegs(UnwindMode::DWARF_UNWIND, regs, sizeof(regs) / sizeof(regs[0])); in HWTEST_F() 229 uintptr_t regs[] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa}; in HWTEST_F() local 231 ctx.regs = DfxRegs::CreateFromRegs(UnwindMode::DWARF_UNWIND, regs, sizeof(regs) / sizeof(regs[ in HWTEST_F() 458 uintptr_t regs[] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa}; HWTEST_F() local [all...] |
/base/hiviewdfx/hicollie/frameworks/native/thread_sampler/ |
H A D | thread_sampler_utils.cpp | 78 static std::shared_ptr<DfxRegs> regs = std::make_shared<DfxRegsArm64>(); in DoUnwind() local 79 regs->SetSp(unwindInfo.context->sp); in DoUnwind() 80 regs->SetPc(unwindInfo.context->pc); in DoUnwind() 81 regs->SetFp(unwindInfo.context->fp); in DoUnwind() 82 regs->SetReg(REG_LR, &(unwindInfo.context->lr)); in DoUnwind() 83 unwinder->SetRegs(regs); in DoUnwind()
|
/base/hiviewdfx/faultloggerd/tools/process_dump/ |
H A D | dfx_unwind_async_thread.cpp | 42 auto regs = thread_->GetThreadRegs(); in UnwindStack() local 43 unwinder_->SetRegs(regs); in UnwindStack() 49 regs != nullptr, in UnwindStack() 131 std::shared_ptr<DfxRegs> regs = thread_->GetThreadRegs(); in UnwindThreadFallback() local 132 if (regs == nullptr) { in UnwindThreadFallback() 160 createFrame(0, regs->GetPc(), regs->GetSp()); in UnwindThreadFallback() 161 createFrame(1, *(regs->GetReg(REG_LR))); in UnwindThreadFallback()
|
H A D | printer.cpp | 139 DFXLOGW("regs is nullptr"); in PrintReason() 258 auto regs = thread->GetThreadRegs(); in PrintThreadRegsByConfig() local 259 if (regs != nullptr) { in PrintThreadRegsByConfig() 260 DfxRingBufferWrapper::GetInstance().AppendMsg(regs->PrintRegs()); in PrintThreadRegsByConfig() 265 void Printer::PrintRegsByConfig(std::shared_ptr<DfxRegs> regs) in PrintRegsByConfig() argument 267 if (regs == nullptr) { in PrintRegsByConfig() 271 DfxRingBufferWrapper::GetInstance().AppendMsg(regs->PrintRegs()); in PrintRegsByConfig() 272 DfxRingBufferWrapper::GetInstance().AppendBaseInfo(regs->PrintRegs()); in PrintRegsByConfig() 289 DFXLOGE("process regs is nullptr"); in PrintThreadFaultStackByConfig()
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/async_stack/ |
H A D | fp_unwinder.h | 25 static inline AT_ALWAYS_INLINE void GetFpPcRegs(void *regs) in GetFpPcRegs() argument 32 : [base] "+r"(regs) in GetFpPcRegs()
|
/base/hiviewdfx/hiview/framework/native/unified_collection/decorator/test/ |
H A D | decorator_test.cpp | 130 bool IsMatchAnyRegex(const std::string& line, const std::vector<std::regex>& regs)
in IsMatchAnyRegex() argument 132 return std::any_of(regs.begin(), regs.end(), [line](std::regex reg) {return regex_match(line, reg);});
in IsMatchAnyRegex() 145 bool CheckContent(const std::string& fileName, const std::vector<std::regex>& regs,
in CheckContent() argument 161 if (!IsMatchAnyRegex(line, regs)) {
in CheckContent()
|
/base/hiviewdfx/faultloggerd/test/benchmarktest/unwinder/ |
H A D | unwind_local_benchmark.cpp | 115 auto regs = DfxRegs::CreateFromRegs(UnwindMode::FRAMEPOINTER_UNWIND, miniRegs,
in UnwinderLocalFp() local 117 dataPtr->unwinder->SetRegs(regs);
in UnwinderLocalFp() 120 context.regs = regs;
in UnwinderLocalFp() 145 uintptr_t regs[2]; // 2: pc and fp reg
in FpUnwinderLocal() local 146 FpUnwinder::GetPcFpRegs(regs);
in FpUnwinderLocal() 149 auto unwSize = FpUnwinder::GetPtr()->Unwind(regs[0], regs[1], pcs, maxSize);
in FpUnwinderLocal() 168 uintptr_t regs[2]; // 2: pc and fp reg
in FpUnwinderLocalSafe() local 169 FpUnwinder::GetPcFpRegs(regs);
in FpUnwinderLocalSafe() [all...] |
/base/hiviewdfx/faultloggerd/test/fuzztest/faultloggerdunwinder_fuzzer/ |
H A D | faultloggerdunwinder_fuzzer.cpp | 204 uintptr_t regs; in TestSetFromFpMiniRegs() local 205 if (size < sizeof(regs)) { in TestSetFromFpMiniRegs() 209 STREAM_TO_VALUEINFO(data, regs); in TestSetFromFpMiniRegs() 212 dfxregs->SetFromFpMiniRegs(®s, size); in TestSetFromFpMiniRegs() 219 uintptr_t regs; in TestSetFromQutMiniRegs() local 220 if (size < sizeof(regs)) { in TestSetFromQutMiniRegs() 224 STREAM_TO_VALUEINFO(data, regs); in TestSetFromQutMiniRegs() 227 dfxregs->SetFromQutMiniRegs(®s, size); in TestSetFromQutMiniRegs()
|