display: display percentage of paths hit
@@ -251,9 +251,10 @@ static void display_displayLocked(honggfuzz_t* hfuzz) {
uint64_t softCntPc = ATOMIC_GET(hfuzz->linux.hwCnts.softCntPc);
uint64_t softCntEdge = ATOMIC_GET(hfuzz->linux.hwCnts.softCntEdge);
uint64_t softCntCmp = ATOMIC_GET(hfuzz->linux.hwCnts.softCntCmp);
+ uint64_t guardNb = ATOMIC_GET(hfuzz->feedback.feedbackMap->guardNb);
display_put(" edge: " ESC_BOLD "%" _HF_NONMON_SEP PRIu64 ESC_RESET "/" ESC_BOLD
- "%" _HF_NONMON_SEP PRIu64 ESC_RESET,
- softCntEdge, ATOMIC_GET(hfuzz->feedback.feedbackMap->guardNb));
+ "%" _HF_NONMON_SEP PRIu64 ESC_RESET " (%" PRId64 "%%)",
+ softCntEdge, guardNb, softCntEdge ? ((softCntEdge * 100) / softCntEdge) : 0);
display_put(" pc: " ESC_BOLD "%" _HF_NONMON_SEP PRIu64 ESC_RESET, softCntPc);
display_put(" cmp: " ESC_BOLD "%" _HF_NONMON_SEP PRIu64 ESC_RESET, softCntCmp);
}
