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

Implement aot_alloc_frame/aot_free_frame with LLVM IRs #2830

Merged

Conversation

wenyongh
Copy link
Contributor

No description provided.

@wenyongh wenyongh marked this pull request as draft November 28, 2023 12:17
@wenyongh wenyongh marked this pull request as ready for review December 4, 2023 01:52
@wenyongh wenyongh changed the title Refine aot_alloc_frame Implement aot_alloc_frame/aot_free_frame with LLVM IRs Dec 4, 2023
#endif

#if WASM_ENABLE_MEMORY_PROFILING != 0
if (alloc_frame) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems alloc_frame means start of the function, is it correct to measure stack use at the start of the function rather than end of the function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here it does the same thing in aot_alloc_frame, which calls wasm_exec_env_alloc_wasm_frame, and wasm_exec_env_alloc_wasm_frame sets exec_env->max_wasm_stack_used if needed:

https://github.com/bytecodealliance/wasm-micro-runtime/blob/dev/gc_refactor/core/iwasm/aot/aot_runtime.c#L3173

https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/iwasm/common/wasm_exec_env.h#L234-L235

@wenyongh wenyongh merged commit cf7350f into bytecodealliance:dev/gc_refactor Dec 12, 2023
387 checks passed
@wenyongh wenyongh deleted the dev/refine_aot_alloc_frame branch December 24, 2023 12:29
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