Skip to content
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

When profiling generated gcno files can have weird source files #54791

Closed
calixteman opened this issue Oct 3, 2018 · 3 comments
Closed

When profiling generated gcno files can have weird source files #54791

calixteman opened this issue Oct 3, 2018 · 3 comments
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) C-bug Category: This is a bug.

Comments

@calixteman
Copy link

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'

@marco-c
Copy link
Contributor

marco-c commented Oct 3, 2018

The tracking issue for -Zprofile is #42524.

@jonas-schievink jonas-schievink added C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 6, 2019
@Enselic
Copy link
Member

Enselic commented Nov 25, 2023

Triage: Can you still reproduce? I closed a similar issue some days ago but this looks slightly different. It is probably fixed now though.

@Enselic
Copy link
Member

Enselic commented Nov 8, 2024

Triage: No objections, so let's close.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
@workingjubilee workingjubilee added A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants