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

Comments

@alberts
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented May 4, 2012

Comment 2:

Labels changed: added gccgo.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented May 4, 2012

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

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 4:

Labels changed: added repo-gccgo.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2014

Comment 5:

Adding Release=None to all Priority=Someday bugs.

Labels changed: added release-none.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc added Gccgo and removed priority-someday labels Apr 10, 2015

@rsc rsc modified the milestones: Gccgo, Unplanned Apr 15, 2015

@rsc rsc removed the Gccgo label Apr 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.