-
Notifications
You must be signed in to change notification settings - Fork 242
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
Strange 'function coverage' result in C++ code? #98
Comments
FWIW: a trivial filter was so easy that I just did it. |
It's the compiler. There can be different versions of destructors (or functions in general). Some with a call to Haven't tried it, but you can try compiling with |
Hi –
Thanks for the quick response and the explanation.
As it turns out, our makefiles already specify ‘-ffunction-sections’ and --gc-sections – so we see the issues with those flags. (I don’t know what we would see if we didn’t use the flags – and I no longer recall why we thought we needed to add them in the first place.)
Filtering it is, then (for the moment, at least).
It would not be hard to continue to report all the aliases as well (e.g., in an ‘expanded function table’, not unlike the testcase ‘show-details’ table) – but I didn’t implement that because I don’t think any of my users will care.
Maybe an even better approach would be to simply merge everything that _doesn’t_ look like a template instantiation difference – and to keep aliases for everything that does.
(Again: not done.)
Henry
|
Replying to my own issue.... |
#169 is merged - so I'm closing my issue :-) |
I see some strange results that I do not understand.
For example, I have a singleton class "ErrorManager" whose constructor and destructor are defined in file 'errorManger.cpp'
The "function" coverage page for the file contains the following (extracted - many other lines elided):
(note the ErrorManager::~ErrorManager() is hit zero times).
Slightly later on the page, I find:
Note that now we see that "ErrorManager::ErrorManager().2" is hit 2415 times.
(It would be a good guess, to suspect that this regression suite contains 2415 testcases.)
The hrefs for both links point to the same line (.../errorManager.cpp:147) - so it seems clear that these two are aliases for the same function.
Question: why is geninfo (or gcov??) creating these alias entries? Is there a way to stop it?
This is a problem because we tend to care about uncovered code - but quite a few of the "uncovered" functions that we see in the function coverage report are bogus.
I am considering to add a simple filter, to merge the data for all "unique" functions which are declared on the same file/line.
I suspect that the resulting report will be more useful in our current methodology.
The text was updated successfully, but these errors were encountered: