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

Open
calixteman opened this issue Oct 3, 2018 · 2 comments
Open

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

calixteman opened this issue Oct 3, 2018 · 2 comments
Labels
C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants