Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance LLVM AOT/JIT stack frame dump #2350

Merged

Conversation

wenyongh
Copy link
Contributor

@wenyongh wenyongh commented Jul 10, 2023

Implement a full LLVM AOT/JIT stack frame dump:
commit the function arguments, locals, stack operands from LLVM values to the stack frame,
which is required for the GC AOT/JIT feature, and may be required by the aot debug, aot snapshot
and other features.

Refer to:
#2144
#2333

@wenyongh wenyongh marked this pull request as draft July 10, 2023 07:56
@no1wudi
Copy link
Collaborator

no1wudi commented Jul 17, 2023

Should we add a dedicate document to describe the current implementation and motivation?

@wenyongh
Copy link
Contributor Author

Should we add a dedicate document to describe the current implementation and motivation?

Yes, I will open a new issue to describe them later.

@wenyongh wenyongh marked this pull request as ready for review August 21, 2023 07:25
Merge bytecodealliance:dev/aot_stack_frame into wenyongh:dev/aot_stack_frame
/* The non-imported function index of current function */
uintptr_t func_index;

/* Used when performance profiling is enabled */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we guard time_started with WASM_ENABLE_PERF_PROFILING ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had better not, the field offsets of AOTFrame had better be fixed so the AOT compiler doesn't need to calculate them (e.g. ip_offset/sp/frame_ref/lp) according to the target architectures in running, like some fields in AOTModuleInstance, WASMMemoryInstance and WASMExecEnv.

Note that I added some bh_static_assert sentences in aot_runtime.c.

@wenyongh wenyongh merged commit 33ac031 into bytecodealliance:dev/aot_stack_frame Aug 28, 2023
wenyongh added a commit to wenyongh/wasm-micro-runtime that referenced this pull request Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants