idle-prof: Fix segment fault issue when run with '--idle-prof' and multiple output format normal,json

Original issue:

./fio --output-format=normal,json --idle-prof=system jobfile.job

job1: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=sync, iodepth=1
fio-3.7-19-ga43f
Starting 1 process
Segmentation fault (core dumped)

Fix solution:

do fio_idle_prof_cleanup() after all formats of output shown.

Signed-off-by: friendy-su <friendy.su@sony.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
3 files changed