hide queue introspection behind define

This commit is contained in:
vanhauser-thc
2022-12-20 13:36:56 +01:00
parent 96f05c7f69
commit 0165ca8c6c
4 changed files with 94 additions and 4 deletions

View File

@ -365,6 +365,7 @@ void write_stats_file(afl_state_t *afl, u32 t_bytes, double bitmap_cvg,
}
#ifdef INTROSPECTION
void write_queue_stats(afl_state_t *afl) {
FILE *f;
@ -395,6 +396,8 @@ void write_queue_stats(afl_state_t *afl) {
}
#endif
/* Update the plot file if there is a reason to. */
void maybe_update_plot_file(afl_state_t *afl, u32 t_bytes, double bitmap_cvg,
@ -649,7 +652,9 @@ void show_stats_normal(afl_state_t *afl) {
cur_ms - afl->stats_last_queue_ms > QUEUE_UPDATE_SEC * 1000)) {
afl->stats_last_queue_ms = cur_ms;
#ifdef INTROSPECTION
write_queue_stats(afl);
#endif
}
@ -1445,7 +1450,9 @@ void show_stats_pizza(afl_state_t *afl) {
cur_ms - afl->stats_last_queue_ms > QUEUE_UPDATE_SEC * 1000)) {
afl->stats_last_queue_ms = cur_ms;
#ifdef INTROSPECTION
write_queue_stats(afl);
#endif
}