| /arkcompiler/runtime_core/docs/ |
| D | runtime-compiled_code-interaction.md | 50 … StackFrameKind | A kind of the current stack frame (compiled code or interpreter stack fra… 82 ## Stack frame 83 A stack frame contains data necessary to execute the function the frame belongs to. 84 … code must have the structure described in [Compiled code stack frame](#compiled-code-stack-frame). 86 ### Interpreter stack frame argument 87 …ter stack frame is decribed by `panda::Frame` class. The class has fields to store virtual registe… 88 …a linked list. The field `panda::Frame::prev_` contains a pointer to the previous interpreter (or … 90 ### Compiled code stack frame argument 91 Each compiled function is responsible to reserve stack frame for its purpose and then release it wh… 92 Generaly compiled function builds the stack frame in prolog and releases it in epilog. If a compile… [all …]
|
| /arkcompiler/runtime_core/static_core/docs/ |
| D | runtime-compiled_code-interaction.md | 56 … StackFrameKind | A kind of the current stack frame (compiled code or interpreter stack fra… 88 ## Stack frame 89 A stack frame contains data necessary to execute the function the frame belongs to. 90 … code must have the structure described in [Compiled code stack frame](#compiled-code-stack-frame). 92 ### Interpreter stack frame argument 93 …eter stack frame is decribed by `ark::Frame` class. The class has fields to store virtual register… 94 …o a linked list. The field `ark::Frame::prev_` contains a pointer to the previous interpreter (or … 96 ### Compiled code stack frame argument 97 Each compiled function is responsible to reserve stack frame for its purpose and then release it wh… 98 Generaly compiled function builds the stack frame in prolog and releases it in epilog. If a compile… [all …]
|
| D | deoptimization.md | 23 1. fill the `Frame`(saves pointer to current CFrame) and `is_compiled_frame_`(saves true) fields in… 32 …e we should start executing code in the interpreter, restores interpreter frame from current CFram… 40 Frame* iframe = frame.ConvertToIFrame(&prev_frame_kind, &num_inlined_methods); 41 Frame* last_iframe = iframe; 52 Frame* StackWalker::ConvertToIFrame(CFrameType& cframe, uint32_t* num_inlined_methods) { 61 Frame* frame = CreateFrameAndSetsVRegs(cframe, prev_frame); 62 frame->SetBytecodeOffset(cframe.GetBytecodePc()); 70 * pointer to first restoring interpreter Frame 72 * pointer to last restoring interpreter Frame 84 …C(Interpreter To Compile) bridge, set last IFrame's previous frame to this C2I bridge frame and ca… [all …]
|
| D | cfi_directives.md | 7 `CFI` (**Call Frame Information**) is a subset of these debug symbols which is responsible for corr… 27 - to find the right previous `frame` (with `fp` and `lr` regs) 28 - to restore `callees` in previous frame 34 There are bridges which `hack` stack memory (setting `stack pointer` to other stack frame), i.e.: 41 …s frame. So we directly specify other frame in which we will return + spot slots for `callees` (it…
|
| /arkcompiler/runtime_core/static_core/runtime/entrypoints/ |
| D | entrypoints.h | 24 class Frame; variable 26 extern "C" Frame *CreateFrameWithSize(uint32_t size, uint32_t nregs, Method *method, Frame *prev); 28 extern "C" Frame *CreateFrameWithActualArgsAndSize(uint32_t size, uint32_t nregs, uint32_t numActua… 29 Method *method, Frame *prev); 31 extern "C" PANDA_PUBLIC_API Frame *CreateNativeFrameWithActualArgsAndSize(uint32_t size, uint32_t n… 33 Frame *prev); 35 extern "C" Frame *CreateFrameForMethod(Method *method, Frame *prev); 37 extern "C" Frame *CreateFrameForMethodDyn(Method *method, Frame *prev); 39 extern "C" Frame *CreateFrameForMethodWithActualArgs(uint32_t numActualArgs, Method *method, Frame … 41 extern "C" Frame *CreateFrameForMethodWithActualArgsDyn(uint32_t numActualArgs, Method *method, Fra… [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/interpreter/ |
| D | state.h | 21 #include "runtime/interpreter/frame.h" 32 ALWAYS_INLINE inline explicit StateIface(Frame *frame) : acc_(frame->GetAcc()) {} in StateIface() argument 44 ALWAYS_INLINE inline Frame *GetFrame() const in GetFrame() 49 ALWAYS_INLINE inline void SetFrame(Frame *frame) in SetFrame() argument 51 static_cast<T *>(this)->SetFrame(frame); in SetFrame() 92 …ALWAYS_INLINE inline State(ManagedThread *thread, const uint8_t *pc, Frame *frame, const void *con… in State() argument 93 : StateIface(frame) in State() 96 SetFrame(frame); in State() 101 ALWAYS_INLINE inline void UpdateState(const uint8_t *pc, Frame *frame) in UpdateState() argument 104 SetFrame(frame); in UpdateState() [all …]
|
| D | frame.h | 31 // ========== Compatible Frame Layout ========== 33 // Frame layout - Static Languages 35 // | ark::Frame | 50 // Frame layout - Dynamic Languages 52 // | ark::Frame | 72 class Frame { 74 // Instrumentation: indicate what the frame must be force poped 76 // Instrumentation: indicate what the frame must retry last instruction 78 // Instrumentation: indicate what the frame must notify when poped 80 // Indicate that the frame was created after deoptimization. [all …]
|
| D | interpreter_impl.cpp | 37 …teImplType(InterpreterType interpreterType, ManagedThread *thread, const uint8_t *pc, Frame *frame, in ExecuteImplType() argument 45 ExecuteImplFastEH_LLVM(thread, const_cast<uint8_t *>(pc), frame, dispathTable); in ExecuteImplType() 47 ExecuteImplFast_LLVM(thread, const_cast<uint8_t *>(pc), frame, dispathTable); in ExecuteImplType() 57 ExecuteImplFastEH(thread, const_cast<uint8_t *>(pc), frame, dispathTable); in ExecuteImplType() 59 ExecuteImplFast(thread, const_cast<uint8_t *>(pc), frame, dispathTable); in ExecuteImplType() 65 if (frame->IsDynamic()) { in ExecuteImplType() 67 ExecuteImplInner<RuntimeInterface, true, true>(thread, pc, frame, jumpToEh); in ExecuteImplType() 69 ExecuteImplInner<RuntimeInterface, true, false>(thread, pc, frame, jumpToEh); in ExecuteImplType() 72 ExecuteImplInner<RuntimeInterface, false>(thread, pc, frame, jumpToEh); in ExecuteImplType() 77 void ExecuteImpl(ManagedThread *thread, const uint8_t *pc, Frame *frame, bool jumpToEh) in ExecuteImpl() argument [all …]
|
| D | instruction_handler_state.h | 27 ALWAYS_INLINE InstructionHandlerState(ManagedThread *thread, const uint8_t *pc, Frame *frame, in InstructionHandlerState() argument 29 : state_(thread, pc, frame, dispatchTable) in InstructionHandlerState() 33 ALWAYS_INLINE void UpdateInstructionHandlerState(const uint8_t *pc, Frame *frame) in UpdateInstructionHandlerState() argument 35 state_.UpdateState(pc, frame); in UpdateInstructionHandlerState() 53 ALWAYS_INLINE Frame *GetFrame() const in GetFrame() 58 ALWAYS_INLINE void SetFrame(Frame *frame) in SetFrame() argument 60 state_.SetFrame(frame); in SetFrame()
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | frames.cpp | 31 auto frame = GetFrame<BaselineBuiltinFrame>(); in FrameIterator() local 32 baselineNativePc_ = frame->GetReturnAddr(); in FrameIterator() 59 auto frame = GetFrame<OptimizedJSFunctionFrame>(); in GetFunction() local 60 return frame->GetFunction(); in GetFunction() 64 auto frame = GetFrame<AsmInterpretedFrame>(); in GetFunction() local 65 return frame->function; in GetFunction() 69 auto frame = GetFrame<InterpretedFrame>(); in GetFunction() local 70 return frame->function; in GetFunction() 73 auto frame = GetFrame<InterpretedBuiltinFrame>(); in GetFunction() local 74 return frame->function; in GetFunction() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/interpreter/ |
| D | frame_handler.cpp | 62 auto frame = it.GetFrame<AsmInterpretedFrame>(); in PrevJSFrame() local 64 fp_ = frame->GetCurrentFramePointer(); in PrevJSFrame() 81 auto *frame = AsmInterpretedFrame::GetFrameFromSp(sp_); in GetNumberArgs() local 82 return static_cast<uint32_t>(frame->GetCurrentFramePointer() - sp_); in GetNumberArgs() 88 auto *frame = it.GetFrame<AsmInterpretedFrame>(); in GetNumberArgs() local 89 prevSp = frame->GetPrevFrameFp(); in GetNumberArgs() 91 auto *frame = it.GetFrame<InterpretedFrame>(); in GetNumberArgs() local 92 prevSp = frame->GetPrevFrameFp(); in GetNumberArgs() 115 auto *frame = it.GetFrame<BaselineBuiltinFrame>(); in FindAndSetBaselineNativePc() local 116 baselineNativePc_ = frame->GetReturnAddr(); in FindAndSetBaselineNativePc() [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/bridge/ |
| D | bridge.cpp | 62 …upposed to be called from the deoptimization code. It aims to call interpreter for given frame from 63 * specific pc. Note, that it releases input interpreter's frame at the exit. 65 extern "C" int64_t InvokeInterpreter(ManagedThread *thread, const uint8_t *pc, Frame *frame, Frame … in InvokeInterpreter() argument 68 thread->SetCurrentFrame(frame); in InvokeInterpreter() 70 LOG(DEBUG, INTEROP) << "InvokeInterpreter for method: " << frame->GetMethod()->GetFullName(); in InvokeInterpreter() 72 interpreter::Execute(thread, pc, frame, thread->HasPendingException()); in InvokeInterpreter() 75 auto acc = frame->GetAcc(); in InvokeInterpreter() 76 if (frame->IsDynamic()) { in InvokeInterpreter() 82 auto prevFrame = frame->GetPrevFrame(); in InvokeInterpreter() 84 FreeFrame(frame); in InvokeInterpreter() [all …]
|
| D | bridge.h | 25 class Frame; variable 28 extern "C" void InterpreterToCompiledCodeBridge(const uint8_t *, const Frame *, const Method *, Man… 29 extern "C" void InterpreterToCompiledCodeBridgeDyn(const uint8_t *, const Frame *, const Method *, … 30 extern "C" uint64_t InvokeCompiledCodeWithArgArray(const int64_t *, const Frame *, const Method *, … 31 extern "C" uint64_t InvokeCompiledCodeWithArgArrayDyn(const uint64_t *, uint32_t, const Frame *, co… 34 extern "C" int64_t InvokeInterpreter(ManagedThread *thread, const uint8_t *pc, Frame *frame, Frame …
|
| /arkcompiler/runtime_core/static_core/runtime/tests/ |
| D | i2c_bridge_test.cpp | 31 #include "runtime/interpreter/frame.h" 137 static Frame *CreateFrame(size_t nregs, Method *method, Frame *prev) in CreateFrame() 139 return ark::CreateFrameWithSize(Frame::GetActualSize<IS_DYNAMIC>(nregs), nregs, method, prev); in CreateFrame() 147 Frame *frame = CreateFrame(0, nullptr, nullptr); in TEST_F() local 151 InterpreterToCompiledCodeBridge(insn, frame, &callee, thread_); in TEST_F() 156 InterpreterToCompiledCodeBridge(insn2, frame, &callee, thread_); in TEST_F() 160 InvokeCompiledCodeWithArgArray(nullptr, frame, &callee, thread_); in TEST_F() 163 FreeFrame(frame); in TEST_F() 176 Frame *frame = CreateFrame(1, nullptr, nullptr); in TEST_F() local 177 auto frameHandler = StaticFrameHandler(frame); in TEST_F() [all …]
|
| D | debugger_test.cpp | 68 static Frame *CreateFrame(size_t nregs, Method *method, Frame *prev) in CreateFrame() 71 … void *mem = aligned_alloc(8, Frame::GetAllocSize(Frame::GetActualSize<IS_DYNAMIC>(nregs), extSz)); in CreateFrame() 72 return new (Frame::FromExt(mem, extSz)) Frame(mem, method, prev, nregs); in CreateFrame() 75 static void FreeFrame(Frame *frame) in FreeFrame() argument 78 std::free(frame->GetExt()); in FreeFrame() 86 static void SetVRegs(Frame *frame, std::vector<VRegValue> ®s) in SetVRegs() argument 88 auto frameHandler = StaticFrameHandler(frame); in SetVRegs() 106 static void CheckFrame(Frame *frame, std::vector<VRegValue> ®s, const MethodInfo &methodInfo) in CheckFrame() argument 108 SetVRegs(frame, regs); in CheckFrame() 116 frame->GetAccAsVReg().SetPrimitive(static_cast<int64_t>(acc.value)); in CheckFrame() [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/ |
| D | osr.cpp | 41 void WriteOsrEventError(Frame *frame, FrameKind kind, uintptr_t loopHeadBc) in WriteOsrEventError() argument 57 …EVENT_OSR_ENTRY(std::string(frame->GetMethod()->GetFullName()), loopHeadBc, osrKind, events::OsrEn… in WriteOsrEventError() 61 static size_t GetStackParamsSize(const Frame *frame); 66 Frame *frame = stack.GetIFrame(); in OsrEntry() local 72 WriteOsrEventError(frame, stack.GetPreviousFrameKind(), loopHeadBc); in OsrEntry() 79 LOG(DEBUG, INTEROP) << "OSR: after interpreter frame"; in OsrEntry() 80 EVENT_OSR_ENTRY(std::string(frame->GetMethod()->GetFullName()), loopHeadBc, in OsrEntry() 82 …OsrEntryAfterIFrame(frame, loopHeadBc, osrCode, codeInfo.GetFrameSize(), GetStackParamsSize(frame)… in OsrEntry() 85 … if (frame->IsDynamic() && frame->GetNumActualArgs() < frame->GetMethod()->GetNumArgs()) { in OsrEntry() 86 frame->DisableOsr(); in OsrEntry() [all …]
|
| D | osr.h | 20 #include "runtime/interpreter/frame.h" 26 extern "C" void *PrepareOsrEntry(const Frame *iframe, uintptr_t bcOffset, const void *osrCode, void… 31 extern "C" void OsrEntryAfterCFrame(Frame *frame, uintptr_t loopHeadBc, const void *osrCode, size_t… 32 extern "C" void OsrEntryAfterIFrame(Frame *frame, uintptr_t loopHeadBc, const void *osrCode, size_t… 34 extern "C" void OsrEntryTopFrame(Frame *frame, uintptr_t loopHeadBc, const void *osrCode, size_t fr… 37 extern "C" void SetOsrResult(Frame *frame, uint64_t uval, double fval);
|
| D | deoptimization.cpp | 36 …* @param frame Pointer to the first interpreter frame to that CFrame will be converted. It … 39 …* @param last_frame Pointer to the last interpreter frame to that CFrame will be converted. It w… 44 …"C" [[noreturn]] void DeoptimizeAfterCFrame(ManagedThread *thread, const uint8_t *pc, Frame *frame, 45 … void *cframeFp, Frame *lastFrame, void *calleeRegs); 47 * @brief Deoptimize CFrame that lies after interpreter frame. 50 …* @param frame Pointer to the first interpreter frame to that CFrame will be converted. It … 53 …* @param last_frame Pointer to the last interpreter frame to that CFrame will be converted. It w… 58 …"C" [[noreturn]] void DeoptimizeAfterIFrame(ManagedThread *thread, const uint8_t *pc, Frame *frame, 59 … void *cframeFp, Frame *lastFrame, void *calleeRegs); 111 …// NOTE(msherstennikov): remove this loop and check `methods` contains frame's method in stack tra… in InvalidateCompiledEntryPoint() [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/include/ |
| D | method-inl.h | 40 inline void FrameDeleter::operator()(Frame *frame) const in operator() 42 interpreter::RuntimeInterface::FreeFrame(thread_, frame); in operator() 55 …ALWAYS_INLINE inline static void InitActualArgs(Frame *frame, Span<Value> argsSpan, uint32_t numVr… in InitActualArgs() argument 58 StaticFrameHandler staticFrameHelper(frame); in InitActualArgs() 69 …NLINE inline static void InterpreterExecute(ManagedThread *thread, const uint8_t *pc, Frame *frame) in InterpreterExecute() argument 71 interpreter::Execute(thread, pc, frame); in InterpreterExecute() 74 …ALWAYS_INLINE static Frame *CreateFrame([[maybe_unused]] ManagedThread *thread, uint32_t nregsSize… in CreateFrame() 75 Frame *prev, uint32_t nregs, uint32_t numActualArgs) in CreateFrame() 92 …ALWAYS_INLINE inline static void InitActualArgs(Frame *frame, Span<coretypes::TaggedValue> argsSpa… in InitActualArgs() argument 95 frame->SetDynamic(); in InitActualArgs() [all …]
|
| /arkcompiler/runtime_core/compiler/tests/x86/ |
| D | asmjit_test.cpp | 68 FuncFrame frame; in TEST_F() local 69 frame.init(func); in TEST_F() 70 frame.addDirtyRegs(lhs, rhs); in TEST_F() 74 args.updateFuncFrame(frame); in TEST_F() 75 frame.finalize(); in TEST_F() 77 a.emitProlog(frame); in TEST_F() 78 a.emitArgsAssignment(frame, args); in TEST_F() 80 a.emitEpilog(frame); in TEST_F() 110 FuncFrame frame; in TEST_F() local 111 frame.init(func); in TEST_F() [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/tests/x86/ |
| D | asmjit_test.cpp | 67 FuncFrame frame; in TEST_F() local 68 frame.init(func); in TEST_F() 69 frame.addDirtyRegs(lhs, rhs); in TEST_F() 73 args.updateFuncFrame(frame); in TEST_F() 74 frame.finalize(); in TEST_F() 76 a.emitProlog(frame); in TEST_F() 77 a.emitArgsAssignment(frame, args); in TEST_F() 79 a.emitEpilog(frame); in TEST_F() 109 FuncFrame frame; in TEST_F() local 110 frame.init(func); in TEST_F() [all …]
|
| /arkcompiler/runtime_core/static_core/compiler/optimizer/code_generator/ |
| D | codegen_native.cpp | 24 auto frame = GetGraph()->GetLocalAllocator()->New<FrameInfo>( in CreateFrameInfo() local 27 frame->SetFrameSize(fl.GetFrameSize<CFrameLayout::OffsetUnit::BYTES>()); in CreateFrameInfo() 28 frame->SetSpillsCount(fl.GetSpillsCount()); in CreateFrameInfo() 30 …frame->SetCallersOffset(fl.GetOffset<CFrameLayout::OffsetOrigin::SP, CFrameLayout::OffsetUnit::SLO… in CreateFrameInfo() 32 …frame->SetFpCallersOffset(fl.GetOffset<CFrameLayout::OffsetOrigin::SP, CFrameLayout::OffsetUnit::S… in CreateFrameInfo() 34 …frame->SetCalleesOffset(-fl.GetOffset<CFrameLayout::OffsetOrigin::FP, CFrameLayout::OffsetUnit::SL… in CreateFrameInfo() 36 …frame->SetFpCalleesOffset(-fl.GetOffset<CFrameLayout::OffsetOrigin::FP, CFrameLayout::OffsetUnit::… in CreateFrameInfo() 40 // we don't need to setup frame in native mode in CreateFrameInfo() 41 frame->SetSetupFrame(false); in CreateFrameInfo() 43 frame->SetSaveFrameAndLinkRegs(!GetGraph()->GetMethodProperties().IsLeaf()); in CreateFrameInfo() [all …]
|
| /arkcompiler/runtime_core/static_core/irtoc/backend/compiler/ |
| D | codegen_interpreter.h | 41 auto frame = GetGraph()->GetLocalAllocator()->New<FrameInfo>( in CreateFrameInfo() local 44 frame->SetFrameSize(fl.GetFrameSize<CFrameLayout::OffsetUnit::BYTES>()); in CreateFrameInfo() 45 frame->SetSpillsCount(fl.GetSpillsCount()); in CreateFrameInfo() 47 …frame->SetCallersOffset(fl.GetOffset<CFrameLayout::OffsetOrigin::SP, CFrameLayout::OffsetUnit::SLO… in CreateFrameInfo() 49 …frame->SetFpCallersOffset(fl.GetOffset<CFrameLayout::OffsetOrigin::SP, CFrameLayout::OffsetUnit::S… in CreateFrameInfo() 51 …frame->SetCalleesOffset(-fl.GetOffset<CFrameLayout::OffsetOrigin::FP, CFrameLayout::OffsetUnit::SL… in CreateFrameInfo() 53 …frame->SetFpCalleesOffset(-fl.GetOffset<CFrameLayout::OffsetOrigin::FP, CFrameLayout::OffsetUnit::… in CreateFrameInfo() 56 frame->SetSetupFrame(true); in CreateFrameInfo() 57 frame->SetSaveFrameAndLinkRegs(true); in CreateFrameInfo() 58 frame->SetSaveUnusedCalleeRegs(true); in CreateFrameInfo() [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/bridge/arch/amd64/ |
| D | compiled_code_to_interpreter_bridge_dyn_amd64.S | 19 // Frame* CreateFrameForMethodWithActualArgsDyn(uint32_t num_actual_args, Method* method, Frame* pr… 21 // void InterpreterEntryPoint(Method* pc, Frame* frame, bool is_dynamic); 23 // void FreeFrame(Frame* frame); 46 // construct the frame 50 movq %rsp, %rbp // set frame pointer 70 // Before we call DecrementHotnessCounterDyn we should set pointer to C2I frame in the TLS, 83 // Compilation successfully done, so recover caller's frame in the TLS, since C2I is not needed. 104 // Create an interpreter frame 108 …// Frame* CreateFrameForMethodWithActualArgsDyn(uint32_t num_actual_args, Method* method, Frame* p… 180 // void InterpreterEntryPoint(Method *method, Frame* frame); [all …]
|
| /arkcompiler/runtime_core/static_core/runtime/bridge/arch/arm/ |
| D | compiled_code_to_interpreter_bridge_dyn_arm.S | 19 // Frame* CreateFrameForMethodDyn(Method* method, Frame* prev); 21 // void FreeFrame(Frame* frame) 23 // void InterpreterEntryPoint(const uint8_t* pc, Frame* frame);
|