Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
pci = get_cpu_info(pdi, msp->cpu);
pci->nelems++;
+ bit->time -= genesis_time;
+ pdi->last_reported_time = bit->time;
if (bit->action & (act_mask << BLK_TC_SHIFT))
dump_trace(bit, pci, pdi);
;
}
+ /*
+ * Get the initial time stamp
+ */
+ if (ms_head)
+ genesis_time = ms_peek_time(ms_head);
+
/*
* Keep processing traces while any are left
*/
ret = do_file();
show_stats();
- if (ofp_buffer)
+ if (ofp_buffer) {
+ fflush(ofp);
free(ofp_buffer);
- if (bin_ofp_buffer)
+ }
+ if (bin_ofp_buffer) {
+ fflush(dump_fp);
free(bin_ofp_buffer);
+ }
return ret;
}