forked from erlang/otp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: cover: Use native coverage if enabled
This is a crude modification to use the native coverage feature when it is enabled in the runtime system when running the compiler test suite. Some rough measurements when running the compiler test suite on my Intel iMac: * Without coverage: 4 min 22 sec * With -JPcover line_coverage: 5 min 42 sec * With -JPcover line_counters: 6 min 5 sec * With traditional coverage: 8 min 15 sec Note that when coverage is enabled for the compiler test suite, each test module will be recompiled, which does not happen when running without coverage. Therefore, these measurements don't say anything about the overhead for native coverage compared to uninstrumented code. To get a better idea of the overhead, I compiled the entire compiler with the `line_coverage` option, and then run the test case `compilation_SUITE:self_compile/1` with different configurations. I ran each test case several times for each configuration and noted the shortest time for each: * -JPcover false: 11.5 sec * -JPcover line_coverage: 11.5 sec * -JPcover line_counters: 12.4 sec I repeated the measurments on my M1 MacBook Pro and got the following times: * -JPcover false: 7.2 sec * -JPcover line_coverage: 7.2 sec * -JPcover line_counters: 8.0 sec At least according to this benchmark, the overhead for the line_coverage mode is negligible.
- Loading branch information
Showing
1 changed file
with
91 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters