mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[sancov] Ignore PC samples with value 0
The sancov runtime for the (Fuchsia) Zircon kernel delivers results in the standard format, but as the full array of possible samples with 0 in uncovered slots. That runtime delivers "live" data and has no final "export" pass to compactify out the uncovered slots, and it seems silly to require another offline tool just for that. Patch By: mcgrathr Differential Revision: https://reviews.llvm.org/D63695 llvm-svn: 365839
This commit is contained in:
parent
9e855532d8
commit
a33a1a19cb
@ -259,6 +259,10 @@ RawCoverage::read(const std::string &FileName) {
|
||||
return make_error_code(errc::illegal_byte_sequence);
|
||||
}
|
||||
|
||||
// Ignore slots that are zero, so a runtime implementation is not required
|
||||
// to compactify the data.
|
||||
Addrs->erase(0);
|
||||
|
||||
return std::unique_ptr<RawCoverage>(new RawCoverage(std::move(Addrs)));
|
||||
}
|
||||
|
||||
@ -1229,7 +1233,7 @@ int main(int Argc, char **Argv) {
|
||||
llvm::InitializeAllTargetMCs();
|
||||
llvm::InitializeAllDisassemblers();
|
||||
|
||||
cl::ParseCommandLineOptions(Argc, Argv,
|
||||
cl::ParseCommandLineOptions(Argc, Argv,
|
||||
"Sanitizer Coverage Processing Tool (sancov)\n\n"
|
||||
" This tool can extract various coverage-related information from: \n"
|
||||
" coverage-instrumented binary files, raw .sancov files and their "
|
||||
|
Loading…
x
Reference in New Issue
Block a user