When profiling generated gcno files can have weird source files #54791
Labels
A-code-coverage
Area: Source-based code coverage (-Cinstrument-coverage)
C-bug
Category: This is a bug.
When profiling the following code (with CARGO_INCREMENTAL=0 RUSTFLAGS="-Zprofile -Ccodegen-units=1" cargo +nightly run):
extern crate thread_local;
use thread_local::ThreadLocal;
fn main() {
let tls: ThreadLocal = ThreadLocal::new();
assert_eq!(tls.get(), None);
assert_eq!(tls.get_or(|| Box::new(5)), &5);
assert_eq!(tls.get(), Some(&5));
}
the generated file ./target/debug/deps/thread_local-45219195a6458363.gcno have some strange file informations:
$ llvm-cov-7 gcov -dump thread_local-45219195a6458363.gcno 2>1 | rg '<'
9:File '<__lazy_static_internal macros>'
11:<__lazy_static_internal macros>:creating '<__lazy_static_internal macros>.gcov'
13:File '<__thread_local_inner macros>'
15:<__thread_local_inner macros>:creating '<__thread_local_inner macros>.gcov'
The text was updated successfully, but these errors were encountered: