diff options
| author | Jun Wu <quark@fb.com> | 2018-12-30 11:59:03 -0800 |
|---|---|---|
| committer | Jun Wu <quark@fb.com> | 2018-12-30 11:59:03 -0800 |
| commit | 31a5066e0b5f0e7e79b6cc04ae09166de0352c63 (patch) | |
| tree | 734d3c518bbaa8a07aaf49bc8aec9aad20a5e956 /src/rustllvm/RustWrapper.cpp | |
| parent | a35cf79fcb961d43828aa9f010e7109b60633f52 (diff) | |
| download | rust-31a5066e0b5f0e7e79b6cc04ae09166de0352c63.tar.gz rust-31a5066e0b5f0e7e79b6cc04ae09166de0352c63.zip | |
Add `-Z instrument-mcount`
This flag inserts `mcount` function call to the beginning of every function after inline processing. So tracing tools like uftrace [1] (or ftrace for Linux kernel modules) have a chance to examine function calls. It is similar to the `-pg` flag provided by gcc or clang, but without generating a `__gmon_start__` function for executables. If a program runs without being traced, no `gmon.out` will be written to disk. Under the hood, it simply adds `"instrument-function-entry-inlined"="mcount"` attribute to every function. The `post-inline-ee-instrument` LLVM pass does the actual job. [1]: https://github.com/namhyung/uftrace
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
