diff options
| author | Kostya Serebryany <kcc@google.com> | 2016-09-30 01:19:56 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2016-09-30 01:19:56 +0000 |
| commit | 2c55613a08b1b66eb337fc5a84fd2d6b086bb8b4 (patch) | |
| tree | c57bbca017cacdb8989a06b5a4a6c2c8a5225856 /llvm/lib/Fuzzer/FuzzerTracePC.cpp | |
| parent | fce01788477ee62a4a65bee2dbc5b222117b64f3 (diff) | |
| download | bcm5719-llvm-2c55613a08b1b66eb337fc5a84fd2d6b086bb8b4.tar.gz bcm5719-llvm-2c55613a08b1b66eb337fc5a84fd2d6b086bb8b4.zip | |
[libFuzzer] more the feature set to InputCorpus; on feature update, change the feature counter of the old best input
llvm-svn: 282829
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerTracePC.cpp')
| -rw-r--r-- | llvm/lib/Fuzzer/FuzzerTracePC.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerTracePC.cpp b/llvm/lib/Fuzzer/FuzzerTracePC.cpp index 44149922a15..f97da96589d 100644 --- a/llvm/lib/Fuzzer/FuzzerTracePC.cpp +++ b/llvm/lib/Fuzzer/FuzzerTracePC.cpp @@ -109,31 +109,6 @@ void TracePC::PrintCoverage() { } } - -void TracePC::UpdateFeatureSet(size_t CurrentElementIdx, size_t CurrentElementSize) { - if (!CurrentElementSize) return; - for (size_t Idx = 0; Idx < kFeatureSetSize; Idx++) { - if (!CounterMap.Get(Idx)) continue; - Feature &Fe = FeatureSet[Idx]; - Fe.Count++; - if (!Fe.SmallestElementSize || Fe.SmallestElementSize > CurrentElementSize) { - Fe.SmallestElementIdx = CurrentElementIdx; - Fe.SmallestElementSize = CurrentElementSize; - } - } -} - -void TracePC::PrintFeatureSet() { - Printf("[id: cnt idx sz] "); - for (size_t i = 0; i < kFeatureSetSize; i++) { - auto &Fe = FeatureSet[i]; - if (!Fe.Count) continue; - Printf("[%zd: %zd %zd %zd] ", i, Fe.Count, Fe.SmallestElementIdx, - Fe.SmallestElementSize); - } - Printf("\n"); -} - } // namespace fuzzer extern "C" { |

