Merge branch 'fix-corrupt-hist-log' of https://github.com/sitsofe/fio
authorJens Axboe <axboe@kernel.dk>
Sun, 13 Oct 2019 17:02:00 +0000 (11:02 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 13 Oct 2019 17:02:00 +0000 (11:02 -0600)
* 'fix-corrupt-hist-log' of https://github.com/sitsofe/fio:
  stat: fix corruption in histogram logs

stat.c

diff --git a/stat.c b/stat.c
index 33637900df622c2fae42841f19fc0ed5cd9ebdc1..05663e07b4379f7850a022b82ae96c19041cd27f 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -2580,7 +2580,7 @@ void add_clat_sample(struct thread_data *td, enum fio_ddir ddir,
                        io_u_plat = (uint64_t *) td->ts.io_u_plat[ddir];
                        dst = malloc(sizeof(struct io_u_plat_entry));
                        memcpy(&(dst->io_u_plat), io_u_plat,
-                               FIO_IO_U_PLAT_NR * sizeof(unsigned int));
+                               FIO_IO_U_PLAT_NR * sizeof(uint64_t));
                        flist_add(&dst->list, &hw->list);
                        __add_log_sample(iolog, sample_plat(dst), ddir, bs,
                                                elapsed, offset);