diff options
author | Kostya Serebryany <kcc@google.com> | 2018-07-03 22:33:09 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2018-07-03 22:33:09 +0000 |
commit | 3080d045631a8f6145db1cd757b5cf210585a2b3 (patch) | |
tree | b3b352b44b81ca054fee2b49ea48bf0511c84202 /lib/fuzzer/FuzzerTracePC.h | |
parent | 9aa2b629129147049ad614648ce7a2f7030e44a2 (diff) |
[libFuzzer] add one more value profile metric, under a flag (experimental)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@336234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/fuzzer/FuzzerTracePC.h')
-rw-r--r-- | lib/fuzzer/FuzzerTracePC.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/fuzzer/FuzzerTracePC.h b/lib/fuzzer/FuzzerTracePC.h index c17626cf3..d397bedf8 100644 --- a/lib/fuzzer/FuzzerTracePC.h +++ b/lib/fuzzer/FuzzerTracePC.h @@ -80,7 +80,7 @@ class TracePC { template <class T> void HandleCmp(uintptr_t PC, T Arg1, T Arg2); size_t GetTotalPCCoverage(); void SetUseCounters(bool UC) { UseCounters = UC; } - void SetUseValueProfile(bool VP) { UseValueProfile = VP; } + void SetUseValueProfileMask(uint32_t VPMask) { UseValueProfileMask = VPMask; } void SetPrintNewPCs(bool P) { DoPrintNewPCs = P; } void SetPrintNewFuncs(size_t P) { NumPrintNewFuncs = P; } void UpdateObservedPCs(); @@ -137,7 +137,7 @@ class TracePC { private: bool UseCounters = false; - bool UseValueProfile = false; + uint32_t UseValueProfileMask = false; bool DoPrintNewPCs = false; size_t NumPrintNewFuncs = 0; @@ -260,7 +260,7 @@ void TracePC::CollectFeatures(Callback HandleFeature) const { Handle8bitCounter); FirstFeature += (ExtraCountersEnd() - ExtraCountersBegin()) * 8; - if (UseValueProfile) { + if (UseValueProfileMask) { ValueProfileMap.ForEach([&](size_t Idx) { HandleFeature(FirstFeature + Idx); }); |