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

Questionable decision to include perl CORE headers in coverage report #344

Open
rwfranks opened this issue Jul 22, 2024 · 1 comment
Open

Comments

@rwfranks
Copy link

The time has surely come to reconsider the decision to include perl included header files in the coverage report.
The more ingenious the compiler engineers become in their quest for efficiency, the more uncoverable branches and statements appear in the coverage reports. None of this extraneous information is of any value to the end user.

The following report shows how bad this situation has become for this uncomplicated perl XS example.

cover: running /usr/bin/perl /home/rwf/perl5/bin/gcov2perl -db /home/rwf/devel/Net-DNS-Resolver-Unbound/cover_db sv_inline.h.gcov Unbound.xs.gcov perlstatic.h.gcov inline.h.gcov
gcov2perl: Warning: ignoring branch with 7 targets at /usr/lib64/perl5/CORE/sv_inline.h:383     switch (type) {
gcov2perl: Warning: ignoring branch with 4 targets at /usr/lib64/perl5/CORE/sv_inline.h:420         switch(type) {
gcov2perl: Writing coverage database to /home/rwf/devel/Net-DNS-Resolver-Unbound/cover_db/runs/1721594850.17753.20173
gcov2perl: Writing coverage database to /home/rwf/devel/Net-DNS-Resolver-Unbound/cover_db/runs/1721594850.17753.65286
gcov2perl: Writing coverage database to /home/rwf/devel/Net-DNS-Resolver-Unbound/cover_db/runs/1721594850.17753.62899
gcov2perl: Writing coverage database to /home/rwf/devel/Net-DNS-Resolver-Unbound/cover_db/runs/1721594850.17753.05179
Reading database from /home/rwf/devel/Net-DNS-Resolver-Unbound/cover_db


---------------------------- ------ ------ ------ ------ ------ ------ ------
File                           stmt   bran   cond    sub    pod   time  total
---------------------------- ------ ------ ------ ------ ------ ------ ------
...lib64/perl5/CORE/inline.h  100.0    n/a    n/a    n/a    n/a    n/a  100.0
...4/perl5/CORE/perlstatic.h  100.0    n/a    n/a    n/a    n/a    n/a  100.0
...64/perl5/CORE/sv_inline.h   32.6   19.6    n/a    n/a    n/a    n/a   27.8
Unbound.xs                    100.0  100.0    n/a    n/a    n/a    n/a  100.0
...t/DNS/Resolver/Unbound.pm  100.0  100.0  100.0  100.0  100.0  100.0  100.0
Total                          83.8   68.7  100.0  100.0  100.0  100.0   82.1
---------------------------- ------ ------ ------ ------ ------ ------ ------
@mohawk2
Copy link
Contributor

mohawk2 commented Nov 5, 2024

If you use the -relative_only flag (and for more complex distros, also -gcov_chdir) in https://metacpan.org/dist/Devel-Cover/view/bin/cover, you shouldn't see this, since that's why I added them. @kiwiroy perhaps of interest to you too

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

2 participants