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

gccgo: gcov branch coverage doesn't look quite right #3302

Open
alberts opened this issue Mar 12, 2012 · 5 comments
Open

gccgo: gcov branch coverage doesn't look quite right #3302

alberts opened this issue Mar 12, 2012 · 5 comments
Milestone

Comments

@alberts
Copy link
Contributor

alberts commented Mar 12, 2012

What steps will reproduce the problem?

https://groups.google.com/d/msg/golang-nuts/g8DsZaN8o9Q/hsY_83nDGiMJ

What do you see instead?

look at a report like

http://alberts.github.com/home/alberts/deps/src/code.google.com/p/go.crypto/cast5/cast5.go.gcov.html

there's lots of untaken branches in places that look like code that doesn't involve
branches at all.

I'm wondering if it's due to bounds checks, allocations that could fail, etc.

Overall, I think these make the branch coverage numbers less useful than they could be.

Which compiler are you using (5g, 6g, 8g, gccgo)?

gccgo

Which operating system are you using?

linux

Which revision are you using?  (hg identify)

gofrontend rev ca4aaf510222
@rsc
Copy link
Contributor

rsc commented Mar 12, 2012

Comment 1:

gcov speaks the truth.
There are branches here for bounds checks and
checks of the shift size.  6cov had to work to
avoid reporting these.

Labels changed: added priority-later, removed priority-triage.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Labels changed: added gccgo.

@ianlancetaylor
Copy link
Contributor

Comment 3:

As Russ mentioned, these are real branches.  The GCC middle-end does not provide any way
for the frontend to indicate that certain branches should be ignored for profiling
purposes.  So this will require some new middle-end functionality before there is
anything that gccgo can do.

Labels changed: added priority-someday, removed priority-later.

Status changed to LongTerm.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added repo-gccgo.

@rsc
Copy link
Contributor

rsc commented Mar 3, 2014

Comment 5:

Adding Release=None to all Priority=Someday bugs.

Labels changed: added release-none.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants