From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> The saving of command lines was moved out of the create_file() logic to capture them after the tracing has finished. But this broke trace-cmd restore as it expected them to be saved by the tracecmd_create_init_file_override() function. Fixes: 1eea02a4b ("trace-cmd: Write saved cmdlines in the trace file at the end of the trace.") Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- tracecmd/trace-restore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tracecmd/trace-restore.c b/tracecmd/trace-restore.c index 98e757337a03..13f803053582 100644 --- a/tracecmd/trace-restore.c +++ b/tracecmd/trace-restore.c @@ -94,6 +94,8 @@ void trace_restore (int argc, char **argv) kallsyms); if (!handle) die("Unabled to create output file %s", output); + if (tracecmd_write_cmdlines(handle) < 0) + die("Failed to write command lines"); tracecmd_output_close(handle); exit(0); } -- 2.30.0