[PATCH] D63695: [sancov] Ignore PC samples with value 0

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 16:00:47 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL365839: [sancov] Ignore PC samples with value 0 (authored by phosek, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D63695?vs=206277&id=209364#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63695/new/

https://reviews.llvm.org/D63695

Files:
  llvm/trunk/tools/sancov/sancov.cpp


Index: llvm/trunk/tools/sancov/sancov.cpp
===================================================================
--- llvm/trunk/tools/sancov/sancov.cpp
+++ llvm/trunk/tools/sancov/sancov.cpp
@@ -259,6 +259,10 @@
     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 @@
   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 "


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63695.209364.patch
Type: text/x-patch
Size: 881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190711/d7ea78ad/attachment.bin>


More information about the llvm-commits mailing list