summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a43f446)
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>
-static void fio_idle_prof_cleanup(void)
+void fio_idle_prof_cleanup(void)
{
if (ipc.ipts) {
free(ipc.ipts);
{
if (ipc.ipts) {
free(ipc.ipts);
log_buf(out, " stddev=%3.2f\n", ipc.cali_stddev);
}
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();
-
json_object_add_value_float(tmp, "unit_mean", ipc.cali_mean);
json_object_add_value_float(tmp, "unit_stddev", ipc.cali_stddev);
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();
extern void show_idle_prof_stats(int, struct json_object *, struct buf_output *);
extern void show_idle_prof_stats(int, struct json_object *, struct buf_output *);
+extern void fio_idle_prof_cleanup(void);
+
+ fio_idle_prof_cleanup();
+
log_info_flush();
free(runstats);
free(threadstats);
log_info_flush();
free(runstats);
free(threadstats);