@@ -1891,7 +1891,7 @@ struct tracecmd_output *tracecmd_create_file_latency(const char *output_file, in
if (!path)
goto out_free;
- copy_file(handle, path);
+ copy_file_compress(handle, path, NULL);
put_tracing_file(path);
@@ -2038,7 +2038,8 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle,
if (lseek64(data[i].fd, data[i].offset, SEEK_SET) == (off64_t)-1)
goto out_free;
if (data[i].size) {
- read_size = copy_file_fd(handle, data[i].fd, data[i].size);
+ read_size = out_copy_fd_compress(handle, data[i].fd,
+ data[i].size, &data_files[i].write_size);
if (read_size != data_files[i].file_size) {
errno = EINVAL;
tracecmd_warning("did not match size of %lld to %lld",
If the output file handler supports compression, use it to compress the flyrecord and latency trace data. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- lib/trace-cmd/trace-output.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)