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

GCNO files contain path which are neither absolute nor relative #54792

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

GCNO files contain path which are neither absolute nor relative #54792

calixteman opened this issue Oct 3, 2018 · 4 comments
Labels
A-code-coverage Area: Source-based code coverage (-Cinstrument-coverage) C-bug Category: This is a bug. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc

Comments

@calixteman
Copy link

calixteman commented Oct 3, 2018

When profiling this code:

fn main() {
    println!("hello");
}

the generated gcno contains the following paths:

llvm-cov-7 gcov -dump plop-12b91b0bdcb3e9a4.gcno 2>1 | rg 'File .*/'
1:File 'libcore/fmt/mod.rs'
5:File 'libcore/ops/function.rs'
9:File 'libcore/ptr.rs'
13:File 'libstd/process.rs'
17:File 'libstd/rt.rs'
21:File 'libstd/sys/unix/process/process_common.rs'
25:File 'src/main.rs'

The 6 first paths are neither absolute nor relative.
So it's pretty hard to do something with them.

@marco-c
Copy link
Contributor

marco-c commented Oct 3, 2018

The tracking issue for -Zprofile is #42524.

@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 23, 2019
@Enselic
Copy link
Member

Enselic commented Nov 18, 2023

Triage: Looks like this is fixed now? I get this:

$ rustc -Zprofile -Cdebuginfo=2 main.rs
$ llvm-cov-14 gcov -dump main.gcno 2>&1 | grep File
File '/rustc/a57770440f1ebe5b992551d3bcc489ae211908d4/library/std/src/sys_common/backtrace.rs'
File '/rustc/a57770440f1ebe5b992551d3bcc489ae211908d4/library/std/src/rt.rs'
File '/rustc/a57770440f1ebe5b992551d3bcc489ae211908d4/library/core/src/fmt/mod.rs'
File '/rustc/a57770440f1ebe5b992551d3bcc489ae211908d4/library/core/src/ops/function.rs'
File '/rustc/a57770440f1ebe5b992551d3bcc489ae211908d4/library/core/src/ptr/mod.rs'
File '/rustc/a57770440f1ebe5b992551d3bcc489ae211908d4/library/std/src/process.rs'
File 'src/main.rs'

@Enselic Enselic added the C-bug Category: This is a bug. label Nov 18, 2023
@Enselic
Copy link
Member

Enselic commented Nov 8, 2024

Triage: It would be good to use cargo bisect-rustc to find the fix and make sure a regression test was added.

@Enselic Enselic added the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Nov 8, 2024
@workingjubilee
Copy link
Member

this is about gcov-based profiling, which we now no longer support.

@workingjubilee workingjubilee closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 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. E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
Projects
None yet
Development

No branches or pull requests

5 participants