rust/src/doc
Matthias Krüger f347c42461
Rollup merge of #100384 - ridwanabdillahi:instr_profile_output, r=wesleywiser
Add support for generating unique profraw files by default when using `-C instrument-coverage`

Currently, enabling the rustc flag `-C instrument-coverage` instruments the given crate and by default uses the naming scheme `default.profraw` for any instrumented profile files generated during the execution of a binary linked against this crate. This leads to multiple binaries being executed overwriting one another and causing only the last executable run to contain actual coverage results.

This can be overridden by manually setting the environment variable `LLVM_PROFILE_FILE` to use a unique naming scheme.

This PR adds a change to add support for a reasonable default for rustc to use when enabling coverage instrumentation similar to how the Rust compiler treats generating these same `profraw` files when PGO is enabled.

The new naming scheme is set to `default_%m_%p.profraw` to ensure the uniqueness of each file being generated using [LLVMs special pattern strings](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#running-the-instrumented-program).

Today the compiler sets the default for PGO `profraw` files to `default_%m.profraw` to ensure a unique file for each run. The same can be done for the instrumented profile files generated via the `-C instrument-coverage` flag as well which LLVM has API support for.

Linked Issue: https://github.com/rust-lang/rust/issues/100381

r? `@wesleywiser`
2022-08-16 06:05:56 +02:00
..
book@36383b4da2 Update books 2022-07-21 20:41:44 -07:00
edition-guide@c55611dd6c Update books 2022-03-01 09:10:58 -08:00
embedded-book@befe684087 Update books 2022-08-01 18:57:55 -07:00
man Update rustc man page to match rustc --help 2022-08-01 22:03:18 +00:00
nomicon@8d1e4dccf7 Update books 2022-07-21 20:41:44 -07:00
reference@f3d3953bf3 Update books 2022-08-01 18:57:55 -07:00
rust-by-example@ee342dc91e Update books 2022-08-01 18:57:55 -07:00
rustc Rollup merge of #100384 - ridwanabdillahi:instr_profile_output, r=wesleywiser 2022-08-16 06:05:56 +02:00
rustc-dev-guide@04f3cf0bb2 Update books 2022-08-01 18:57:55 -07:00
rustdoc Fix some broken link fragments. 2022-07-25 09:16:28 -07:00
unstable-book Rollup merge of #99620 - hudson-ayers:fix-location-detail, r=davidtwco 2022-07-31 23:39:40 +02:00
complement-design-faq.md Remove the FAQs in favor of the website 2015-12-23 14:03:45 -08:00
complement-lang-faq.md Remove the FAQs in favor of the website 2015-12-23 14:03:45 -08:00
complement-project-faq.md Remove the FAQs in favor of the website 2015-12-23 14:03:45 -08:00
favicon.inc doc: no shortcut in rel="icon" 2022-01-28 13:42:48 +01:00
footer.inc rustdoc: Improve playground run buttons 2016-10-15 18:32:03 +01:00
full-toc.inc doc: add webfonts and tweak the styles accordingly 2014-04-19 21:25:35 +09:00
grammar.md Remove legacy grammar 2019-09-30 07:46:10 +02:00
guide-crates.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide-error-handling.md Convert old doc links to current edition 2019-02-13 14:39:25 +00:00
guide-ffi.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide-macros.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide-ownership.md Convert old doc links to current edition 2019-02-13 14:39:25 +00:00
guide-plugins.md Add top level sections to the Unstable Book. 2017-04-18 21:26:09 -04:00
guide-pointers.md Convert old doc links to current edition 2019-02-13 14:39:25 +00:00
guide-strings.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide-tasks.md Fix broken link in old rust guide 2015-03-04 23:18:24 +00:00
guide-testing.md Convert old doc links to current edition 2019-02-13 14:39:25 +00:00
guide-unsafe.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
guide.md Grammar tweak to old guide stub documents. 2015-01-16 22:25:22 -05:00
index.md Add Clippy book link to rust doc index page 2022-07-06 10:01:28 +02:00
intro.md Remove the 30 minute intro 2015-04-18 17:55:31 -04:00
not_found.md Update location from a relative path to absolute 2022-01-07 01:29:20 -08:00
redirect.inc doc: no shortcut in rel="icon" 2022-01-28 13:42:48 +01:00
reference.md Update reference.md 2021-07-10 19:51:36 +02:00
robots.txt Block version-specific docs from search engines 2020-03-14 02:29:35 +00:00
rust.css override rustdoc.css {webkit,moz} box-sizing:unset 2021-06-29 13:05:00 +08:00
rust.md Avoid linking to a moved page in rust.html 2017-03-29 15:38:47 +02:00
rustdoc.md Move rustdoc.md into the book 2015-01-21 14:59:25 -05:00
tutorial.md Update tutorial.md 2018-05-17 12:25:24 -07:00
version_info.html.template Add alt tags for logos 2016-01-20 11:53:20 -05:00