X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=idletime.c;h=2f59f5104b4152c7b156a1bd255f898eb1ba7c72;hp=90bc1d9eb09fb7a763dcf567e21062ad2320973d;hb=de5ed0e4d398bc9d4576f9b2b82d7686989c27e1;hpb=8b6a404cdd2c40715885e562416c3db039912773 diff --git a/idletime.c b/idletime.c index 90bc1d9e..2f59f510 100644 --- a/idletime.c +++ b/idletime.c @@ -1,4 +1,5 @@ #include +#include "fio.h" #include "json.h" #include "idletime.h" @@ -396,7 +397,7 @@ static double fio_idle_prof_cpu_stat(int cpu) return p * 100.0; } -static void fio_idle_prof_cleanup(void) +void fio_idle_prof_cleanup(void) { if (ipc.ipts) { free(ipc.ipts); @@ -470,10 +471,6 @@ void show_idle_prof_stats(int output, struct json_object *parent, log_buf(out, " stddev=%3.2f\n", ipc.cali_stddev); } - /* dynamic mem allocations can now be freed */ - if (ipc.opt != IDLE_PROF_OPT_NONE) - fio_idle_prof_cleanup(); - return; } @@ -497,7 +494,5 @@ void show_idle_prof_stats(int output, struct json_object *parent, json_object_add_value_float(tmp, "unit_mean", ipc.cali_mean); json_object_add_value_float(tmp, "unit_stddev", ipc.cali_stddev); - - fio_idle_prof_cleanup(); } }