-
Notifications
You must be signed in to change notification settings - Fork 625
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
Generate jitdump to support linux perf for LLVM JIT #2788
Conversation
92a04a1
to
349ad8b
Compare
core/iwasm/include/wasm_export.h
Outdated
@@ -169,6 +169,14 @@ typedef struct RuntimeInitArgs { | |||
uint32_t llvm_jit_size_level; | |||
/* Segue optimization flags for LLVM JIT */ | |||
uint32_t segue_flags; | |||
/** | |||
* If enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had better If enabled
?
product-mini/platforms/posix/main.c
Outdated
@@ -99,6 +99,7 @@ print_help() | |||
#if WASM_ENABLE_STATIC_PGO != 0 | |||
printf(" --gen-prof-file=<path> Generate LLVM PGO (Profile-Guided Optimization) profile file\n"); | |||
#endif | |||
printf(" --perf-profile Enable linux perf support. For now, it only works in llvm-jit.\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had better wrap the line with macro: #if WASM_ENABLE_JIT !=0 ... #endif
product-mini/platforms/posix/main.c
Outdated
@@ -593,6 +594,7 @@ main(int argc, char *argv[]) | |||
#if WASM_ENABLE_THREAD_MGR != 0 | |||
int timeout_ms = -1; | |||
#endif | |||
bool enable_linux_perf_support = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, had better wrap the code with macro WASM_ENABLE_JIT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about putting this line after L563 uint32 segue_flags = 0;
2476014
to
0af902b
Compare
product-mini/platforms/posix/main.c
Outdated
@@ -593,6 +594,7 @@ main(int argc, char *argv[]) | |||
#if WASM_ENABLE_THREAD_MGR != 0 | |||
int timeout_ms = -1; | |||
#endif | |||
bool enable_linux_perf_support = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about putting this line after L563 uint32 segue_flags = 0;
0af902b
to
a9ed54b
Compare
a9ed54b
to
f6d6eb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
doc/perf_tune.md
Outdated
|
||
### 7.1 Flamegraph | ||
|
||
[Flamegraph](https://www.brendangregg.com/flamegraphs.html) is a powerful tool to visualize stack traces of profiled software so that the most frequent code-paths to be identified quickly and accurately. In order to use it, you need to record call graphs when running `perf record` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be
or can be
?
[Flamegraph](https://www.brendangregg.com/flamegraphs.html) is a powerful tool to visualize stack traces of profiled software so that the most frequent code-paths to be identified quickly and accurately. In order to use it, you need to record call graphs when running `perf record` | |
[Flamegraph](https://www.brendangregg.com/flamegraphs.html) is a powerful tool to visualize stack traces of profiled software so that the most frequent code-paths can be identified quickly and accurately. In order to use it, you need to record call graphs when running `perf record` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
f6d6eb3
to
a1b0bb3
Compare
No description provided.