about summary refs log tree commit diff
path: root/src/test/codegen/gdb_debug_script_load.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-12-31 14:30:17 +0000
committerbors <bors@rust-lang.org>2018-12-31 14:30:17 +0000
commit6efaef61899f6551914156f69809aa7d5854399d (patch)
treed6e75566a32706aa1ce1d777fc8081af98698673 /src/test/codegen/gdb_debug_script_load.rs
parent433ef826f001652f13ecff3697c2233fbe1ce4e2 (diff)
parent31a5066e0b5f0e7e79b6cc04ae09166de0352c63 (diff)
downloadrust-6efaef61899f6551914156f69809aa7d5854399d.tar.gz
rust-6efaef61899f6551914156f69809aa7d5854399d.zip
Auto merge of #57220 - quark-zju:mcount, r=estebank
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/test/codegen/gdb_debug_script_load.rs')
0 files changed, 0 insertions, 0 deletions