-
Notifications
You must be signed in to change notification settings - Fork 67
CP-17268 integrate coverage profiling #267
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d513789
CP-17268 Integrate bisect_ppx for coverage profiling.
lindig c802c90
CP-17268 Updated opam file and README
lindig 9d7036e
CP-17268 sets xenopsd to log bisect files to tmp dir
lindig 82a8930
CP-17268 combine all setup code for bisect_ppx into one function
lindig 143ce01
CP-17268 move bisect setup code into a module of its own
lindig 7a25ada
CP-17268 Updated README re where log files are written
lindig 8a9dbc3
CP-17268 cleaner integrates coverage profiling: make coverage
lindig a0b917e
CP-17268 remove init code from xenopsd.ml (moved to xc/xenops_xc_main…
lindig d7411e1
CP-17268 fix some typos, update README
lindig 56d49e3
CP-17268 set up more binaries for coverage analysis
lindig e970a0b
CP-17268 simplify finding tmpdir, fix indentation
lindig 49f1024
CP-17268 don't profile for coverage by default
lindig 5d87a67
CP-17268 Fix more indentation
lindig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
# Coverage Analysis | ||
|
||
This project can be compiled for coverage analysis using [bisect_ppx]. By | ||
default, this is not done. To compile for coverage analysis, do: | ||
|
||
make coverage | ||
make | ||
|
||
The `coverage` target adds the rules in `_tags.coverage` to the `_tags` | ||
file, which in turn causes all code to be compiled for coverage | ||
analysis. The `_tags.coverage` file could be tweaked to control which | ||
files get instrumented. | ||
|
||
## Support Files | ||
|
||
See [profiling/coverage.ml](./profiling/coverage.ml) for the run-time | ||
setup of coverage profiling. This code has no effect when not profiling | ||
during execution. Once [bixect_ppx] has better defaults we could get rid | ||
of it. | ||
|
||
## Execution and Logging | ||
|
||
During program execution, a binary writes coverage data to | ||
|
||
/tmp/bisect-<binary>-*.out | ||
|
||
This can be overridden by setting the `BISECT_FILE` environment | ||
variable, which is otherwise set at startup using the code in | ||
`profiling/coverage.ml`; | ||
|
||
## Analysis | ||
|
||
See the [bisect_ppx] documentation for details but try from the | ||
top-level directory: | ||
|
||
bisect-ppx-report -I _build -html coverage /tmp/bisect-*.out | ||
|
||
This creates an HTML document in [coverage/](./coverage]. | ||
|
||
[bisect_ppx]: https://github.com/aantron/bisect_ppx | ||
|
||
|
||
|
||
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad you have split these out onto separate lines! Much better for resolving merges. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to move to
oasis setup -setup-update dynamic
in a separate step. It is not in all projects straight forward but I have tested that the proposed method works in that context, too. It's done here: https://github.com/lindig/luna-rossa.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine. Let's make sure we come back to it before we wrap this work up.