@@ -604,6 +604,9 @@ static int put_together_file(int cpus, int ofd, const char *node,
if (write_options) {
ret = tracecmd_write_cpus(handle, cpus);
+ if (ret)
+ goto out;
+ ret = tracecmd_write_buffer_info(handle);
if (ret)
goto out;
ret = tracecmd_write_options(handle);
@@ -3729,6 +3729,9 @@ setup_connection(struct buffer_instance *instance, struct common_record_context
if (ret)
goto error;
ret = tracecmd_write_cpus(network_handle, instance->cpu_count);
+ if (ret)
+ goto error;
+ ret = tracecmd_write_buffer_info(network_handle);
if (ret)
goto error;
ret = tracecmd_write_options(network_handle);
@@ -4092,6 +4095,7 @@ static void setup_agent(struct buffer_instance *instance,
add_options(network_handle, ctx);
tracecmd_write_cmdlines(network_handle);
tracecmd_write_cpus(network_handle, instance->cpu_count);
+ tracecmd_write_buffer_info(network_handle);
tracecmd_write_options(network_handle);
tracecmd_write_meta_strings(network_handle);
tracecmd_msg_finish_sending_data(instance->msg_handle);
When creating a trace file, tracecmd_write_buffer_info() should be called, to write buffers metadata in file version 6 trace files. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- tracecmd/trace-listen.c | 3 +++ tracecmd/trace-record.c | 4 ++++ 2 files changed, 7 insertions(+)