Skip to contentSkip to conversation

trace-cmd library: Write buffer option in out_write_cpu_data()

PATCH New Steven Rostedt 1 participant 1 message Apr 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd library: Write buffer option in out_write_cpu_data()

From: "Steven Rostedt (Google)" <[email protected]>

When putting together the tracing files for trace-cmd restore, the call to out_write_cpu_data() does not write the final options that added the buffer data, and it is not able to be read.

---
 lib/trace-cmd/trace-output.c | 3 +++
 1 file changed, 3 insertions(+)
lib/trace-cmd/trace-output.c +3 -0
index f3a203ec347f..ca7132e113c0 100644
@@ -2526,6 +2526,9 @@ __hidden int out_write_cpu_data(struct tracecmd_output *handle,
 
 	handle->file_state = TRACECMD_FILE_CPU_FLYRECORD;
 
+	if (HAS_SECTIONS(handle))
+		tracecmd_write_options(handle);
+
 	return 0;
 
  out_free:
Signature · 1 line
2.35.1