Adds optional '-logprefix' command line option to drcov #3510
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.
TL;DR
This PR adds an optional
-logprefix
command line toggle to thedrcov
tool.By default,
drcov
will prefix log files with 'drcov', egdrcov.ls.57735.0000.proc.log
. The addition of this command line option allows users to change the prefix to a string of their choosing. This can be used to build a clear relationship between which invocation produced which log file.Problem Usecase
A growing number of DynamoRIO users have been integrating
drcov
into their fuzzing and instrumentation workflows. A common nuisance among these users is that there isn't a great way for a fuzz harness (or anything) that wrapsdrcov
to specify an output filename for the coverage log.As a result, it can be difficult to correlate which fuzzed input testcase generated which log after the fact with any certainty.
Which log is which? Obviously, this becomes increasingly tedious when there are tens of thousands of executions / logs being generated simultaneously.
Example Usage
The example below demonstrates the usage of the new
-logprefix
option:Additional Comments
Most users would prefer the ability to specify a static / known log filename. But being able to change the log file prefix seemed like a fair compromise and the path of least resistance for the existing codebase.
I am open to alternative solutions, but would like to see a change like this integrated in one form or another.