-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Generate gcov coverage data #690
Comments
Depends on #237. |
Should this issue be tagged with "debuginfo"? |
Yes |
According to a comment in #2234, this bug is unblocked now. |
This is definitely blocked again on functioning debug info. |
revisiting for triage. this would be especially great to have in the concurrency tests, where covering all the branches is a function of scheduling rather than input values. |
i was already here, but now i am here again |
This would be super-interesting to dig into now, since we have quite functional debug symbols after this summer's GSOC. |
Would be awesome, but not 1.0 |
On a related note, I found this project today: https://github.com/SimonKagstrom/kcov
|
kcov looks much nicer than gcov overall. |
I'm not sure how relevant this is, but Go did it in a pretty interesting way: http://blog.golang.org/cover |
I was recently looking at this. llvm has built-in gcov generation passes. On Mon, Feb 3, 2014 at 12:54 AM, Michael Darakananda <
|
I tested kcov, it seems to (mostly) just work with
However, all-in-all kcov seems pretty good. |
(drive-by-triage) LLVM's gcov pass requires some runtime support in the form of |
/cc me |
Tinkered with
it fails to find the appropriate runtime support (llvm_gcda_start_file, llvm_gcda_emit_function, etc.). So I tried adding those from clang's compiler-rt:
Fails with
Well, at that point I just linked everything to Now the problem is that those two binaries have different timestamps:
Any ideas what to do with that? |
@farcaller do they need to have the same timestamp? |
Yes, that's how they check that gcda output corresponds to gcno provided by complier. It might be because of some differences in clang's libclang_rt.profile-x86_64.a and whatever llvm generates in there at compile time, I'm rebuilding rustc with matching version of compiler-rt's profile now to verify. |
With matching profile part of compiler-rt:
you can get gcov profiling generated by
Now, there are two more problems. The compiler can't find The bigger issue is that the file is still not parseable:
|
It actually works fine on extremely simple "hello world" binary. Could it be the case that insert-gcov-profiling pass should be inserted at another time in the pipeline? |
FWIW, kcov actually seems to work if |
/cc me |
Triage bump: anyone know the status of this today? |
rustc nightly (dcaeb6a), ubuntu 14.10, x86_64.
Building with
and
So there is no way to generate coverage data for rust that I'm aware of at the moment (that's bad). |
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#646 |
Update for "modern" `meta` matcher.
It would be nice to know what our test coverage looks like. I believe this depends on #689.
The text was updated successfully, but these errors were encountered: