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

Small enhancement on function execution time statistic #2985

Merged
merged 6 commits into from
Jan 17, 2024

Conversation

lum1n0us
Copy link
Collaborator

@lum1n0us lum1n0us commented Jan 8, 2024

  • support cpu time and real time.
  • support children execution time.

TODOs:

  • need customer confirmation about cpu time or real time
  • fix aot name section emission failure
  • multi-threads

@lum1n0us lum1n0us force-pushed the fr/wasm_func_exec branch 3 times, most recently from 7cc7f6a to 1da449b Compare January 10, 2024 22:43
@lum1n0us lum1n0us marked this pull request as ready for review January 11, 2024 06:45
@lum1n0us lum1n0us force-pushed the fr/wasm_func_exec branch 2 times, most recently from 5cf3f2d to 183d93e Compare January 15, 2024 04:10
core/iwasm/aot/aot_runtime.c Outdated Show resolved Hide resolved
core/iwasm/include/wasm_export.h Show resolved Hide resolved
core/shared/utils/bh_atomic.h Outdated Show resolved Hide resolved
core/shared/utils/bh_atomic.h Outdated Show resolved Hide resolved
core/iwasm/interpreter/wasm_runtime.c Outdated Show resolved Hide resolved
Copy link
Contributor

@wenyongh wenyongh left a comment

Choose a reason for hiding this comment

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

LGTM

@wenyongh wenyongh merged commit 5c8b8a1 into bytecodealliance:main Jan 17, 2024
393 of 395 checks passed
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…nce#2985)

Enhance the statistic of wasm function execution time, or the performance
profiling feature:
- Add os_time_thread_cputime_us() to get the cputime of a thread,
  and use it to calculate the execution time of a wasm function
- Support the statistic of the children execution time of a function,
  and dump it in wasm_runtime_dump_perf_profiling
- Expose two APIs:
  wasm_runtime_sum_wasm_exec_time
  wasm_runtime_get_wasm_func_exec_time

And rename os_time_get_boot_microsecond to os_time_get_boot_us.
@lum1n0us lum1n0us deleted the fr/wasm_func_exec branch May 31, 2024 03:19
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.

3 participants