Page MenuHomeFreeBSD

gcov support
ClosedPublic

Authored by mmacy on Feb 19 2019, 10:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 5, 9:02 AM
Unknown Object (File)
Jan 30 2024, 10:04 PM
Unknown Object (File)
Jan 14 2024, 7:42 AM
Unknown Object (File)
Jan 1 2024, 8:37 AM
Unknown Object (File)
Dec 23 2023, 7:12 PM
Unknown Object (File)
Dec 23 2023, 7:12 PM
Unknown Object (File)
Dec 23 2023, 7:12 PM
Unknown Object (File)
Dec 23 2023, 7:00 PM
Subscribers

Details

Summary

add gcov support and export results as files in debugfs

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 22591

Event Timeline

sys/gnu/gcov/gcc_4_7.c
1

Color me ignorant... is this code obtained from a GPL project by chance?

sys/gnu/gcov/gcov_subr.c
60

Is this defined in libkern?

119

I disagree with this assertion.

If someone is intentionally calling __gcov_flush, it means that they anticipate the coverage information to have been flushed out to disk.

In particular, if the kernel panics and this is treated as a no-op, the coverage data could be corrupted, rendering the data useless.

sys/gnu/gcov/gcc_4_7.c
1

It's tightly coupled with gcc internals. There's no way around it. And frankly it's not a useful concern as one would never ship a profiling kernel.

sys/gnu/gcov/gcov_subr.c
119

The data isn't being written synchronously. It's being exported by way of pseudofs for the user to collect. If you care about not losing data, collect after every test. The coverage of a kernel test that panics would be lost when using anything other than battery backed RAM.

This is currently a direct port of what Linux does.

sys/gnu/gcov/gcov_subr.c
60

No. It's copied from libc. Otherwise I wouldn't add a private copy.

Make sure you have a license header for all new files and $FreeBSD$

This revision is now accepted and ready to land.Feb 20 2019, 8:10 AM
This revision was automatically updated to reflect the committed changes.