Open jmfrank63 opened 12 months ago
I did more research into this, and it seems to be a bug. Handling directly profdata
produces a different result than it would be using lcov
. Also, if profdata
and lcov
is present, it seems to produce a mixture of both which is also different from both other reports.
Finally, the workaround is to produce an lcov
report, then delete the profdata (*.profraw)
and then create the html
report, which produces the same result as lcov
. However, this is rather pointless, as the genhtml
report is so much more detailed.
IMHO, the goal is to produce the same data as lcov
without lcov
by just looking at the profdata
, and have the same details as lcov
. I might be looking into this, but first I'll wait for some feedback on this issue.
i just ran into this one as well. a number of the work-arounds suggested over in #556 suggest invoking lcov
directly which works but sadly produces an inaccurate summary
First, thank you for this great piece of software.
I am currently diving deeper into code coverage and set up
grcov
for a sample project, which can be found here:inst-decoding-8086
GitHub actions work fine with
codecov.io
and locallylcov
gave me all the hints I needed to achieve 100% coverage. I callgrcov
like this:However, despite
lcov
being 100% thehtml
report is still missing out function calls. I dug deeper into this and present one of the examples here I am not certain about but seems to be strange. This is the code in question:Though the following tests are not useful, as they test something that is already been tested, they provide some good insights:
Normally,
into()
should suffice, but to be absolutely sure, I used bothinto()
andfrom()
.I forked the project, and modified the
html.rs
to get the content ofresult.functions (fn get_stats line 182)
to get the call of line 20 (see above)
but also
Since I used both of my Error variants, I can exclude monomorphication of them.
Before I dive into the demangling and looking deeper into this, I'd like to have some guidance from folks having more experience than 1 hour of code reading and debugging.
The questions that arise here:
Why does the
html
report differ from thelcov
report? Is there a natural explanation, or is this simply a bug?Having already put some work in here, I also wanted to ask if there would be interest in making the
html
report a little more interactive likelcov
. I think it might be helpful if the number of hit and missed functions would be links pointing to the source lines of the functions considered.If I tried to implement this, would this be considered to be merged (provided the general guidelines are followed)? Also, if I missed any information, feel free to ask for more.