|
18 | 18 | namespace fuzzer {
|
19 | 19 |
|
20 | 20 | const size_t Dictionary::kMaxDictSize;
|
| 21 | +static const size_t kMaxMutationsToPrint = 10; |
21 | 22 |
|
22 | 23 | static void PrintASCII(const Word &W, const char *PrintAfter) {
|
23 | 24 | PrintASCII(W.data(), W.size(), PrintAfter);
|
@@ -481,15 +482,21 @@ void MutationDispatcher::PrintRecommendedDictionary() {
|
481 | 482 | Printf("###### End of recommended dictionary. ######\n");
|
482 | 483 | }
|
483 | 484 |
|
484 |
| -void MutationDispatcher::PrintMutationSequence() { |
| 485 | +void MutationDispatcher::PrintMutationSequence(bool Verbose) { |
485 | 486 | Printf("MS: %zd ", CurrentMutatorSequence.size());
|
486 |
| - for (auto M : CurrentMutatorSequence) |
487 |
| - Printf("%s-", M.Name); |
| 487 | + size_t EntriesToPrint = |
| 488 | + Verbose ? CurrentMutatorSequence.size() |
| 489 | + : std::min(kMaxMutationsToPrint, CurrentMutatorSequence.size()); |
| 490 | + for (size_t i = 0; i < EntriesToPrint; i++) |
| 491 | + Printf("%s-", CurrentMutatorSequence[i].Name); |
488 | 492 | if (!CurrentDictionaryEntrySequence.empty()) {
|
489 | 493 | Printf(" DE: ");
|
490 |
| - for (auto DE : CurrentDictionaryEntrySequence) { |
| 494 | + EntriesToPrint = Verbose ? CurrentDictionaryEntrySequence.size() |
| 495 | + : std::min(kMaxMutationsToPrint, |
| 496 | + CurrentDictionaryEntrySequence.size()); |
| 497 | + for (size_t i = 0; i < EntriesToPrint; i++) { |
491 | 498 | Printf("\"");
|
492 |
| - PrintASCII(DE->GetW(), "\"-"); |
| 499 | + PrintASCII(CurrentDictionaryEntrySequence[i]->GetW(), "\"-"); |
493 | 500 | }
|
494 | 501 | }
|
495 | 502 | }
|
|
0 commit comments