summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerTracePC.h
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-08-25 20:09:25 +0000
committerKostya Serebryany <kcc@google.com>2017-08-25 20:09:25 +0000
commit2eef816e6e5d8a45da77ba8f9df49ed372672585 (patch)
treee44522292370bfbba72bebbbf1a74d6e98b3c385 /compiler-rt/lib/fuzzer/FuzzerTracePC.h
parent1dbb7578fffa65ab1ee52be04b1ed30f530d8b0a (diff)
downloadbcm5719-llvm-2eef816e6e5d8a45da77ba8f9df49ed372672585.tar.gz
bcm5719-llvm-2eef816e6e5d8a45da77ba8f9df49ed372672585.zip
[libFuzzer] add -print_funcs=1 (on bey default): print newly discovered functions during fuzzing
llvm-svn: 311797
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerTracePC.h')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerTracePC.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerTracePC.h b/compiler-rt/lib/fuzzer/FuzzerTracePC.h
index 0c9d4b69b61..76aa0748f15 100644
--- a/compiler-rt/lib/fuzzer/FuzzerTracePC.h
+++ b/compiler-rt/lib/fuzzer/FuzzerTracePC.h
@@ -82,6 +82,7 @@ class TracePC {
void SetUseCounters(bool UC) { UseCounters = UC; }
void SetUseValueProfile(bool VP) { UseValueProfile = VP; }
void SetPrintNewPCs(bool P) { DoPrintNewPCs = P; }
+ void SetPrintNewFuncs(bool P) { DoPrintNewFuncs = P; }
void UpdateObservedPCs();
template <class Callback> void CollectFeatures(Callback CB) const;
@@ -133,6 +134,7 @@ private:
bool UseCounters = false;
bool UseValueProfile = false;
bool DoPrintNewPCs = false;
+ bool DoPrintNewFuncs = false;
struct Module {
uint32_t *Start, *Stop;
@@ -158,6 +160,7 @@ private:
uintptr_t *PCs() const;
std::set<uintptr_t> ObservedPCs;
+ std::set<uintptr_t> ObservedFuncs;
ValueBitMap ValueProfileMap;
uintptr_t InitialStack;
OpenPOWER on IntegriCloud