[PATCH] D48054: [libFuzzer] Mutation tracking and logging implemented
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 26 12:46:54 PDT 2018
morehouse added a subscriber: kcc.
morehouse added inline comments.
================
Comment at: lib/fuzzer/FuzzerMutationStats.cpp:26
+ (1 + TotalMutations.at(i));
+ Printf("%.3f", UsefulPercentage);
+ if (i < NUMBER_OF_MUTATION_TYPES - 1) Printf(",");
----------------
kodewilliams wrote:
> morehouse wrote:
> > The output will be easier to understand if you also print the mutation names.
> I was told to remove the names from the output for parsing purposes, as it will make it easier to use in the latter phase of the project. Does this still stand?
I was interpreting this patch as an option to print human-readable stats similar to `-print_final_stats`.
@kcc, @Dor1s: Do we care if this information is human readable or not?
================
Comment at: lib/fuzzer/FuzzerMutationStats.cpp:25
+ // double UsefulPercentage = (100.0 * UsefulMutations.at(i)) /
+ // (1 + TotalMutations.at(i));
+ double UsefulPercentage = TotalMutations.at(i) ? (100.0 *
----------------
Please remove dead code.
================
Comment at: lib/fuzzer/FuzzerMutationStats.cpp:27
+ double UsefulPercentage = TotalMutations.at(i) ? (100.0 *
+ UsefulMutations.at(i)) / TotalMutations.at(i) : 0;
+ Printf("%.3f", UsefulPercentage);
----------------
This formatting looks odd. Please use `clang-format` on your changes.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D48054
More information about the llvm-commits
mailing list