Bug 213659

Summary: trace-cmd record requires splice to the output filesystem
Product: Tools Reporter: Johannes Berg (johannes)
Component: Trace-cmd/KernelsharkAssignee: Default virtual assignee for Trace-cmd and kernelshark (tools_tracecmd_kernelshark)
Status: NEW ---    
Severity: normal CC: rostedt
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: N/A Subsystem:
Regression: No Bisected commit-id:
Attachments: Verify that splice works before using splice

Description Johannes Berg 2021-07-06 21:21:53 UTC
If trace-cmd record is called to write to a file that is on a filesystem, it fails:

  trace-cmd: Invalid argument
    recorder error in splice output
  CPU0 data recorded at offset=0x2bd000
      0 bytes in size

(single-core system because this was ARCH=um)

and while it actually creates a trace.dat file, it ends up being empty.

It should instead detect that situation and fall back to read/write if splice doesn't work.
Comment 1 Steven Rostedt 2022-06-07 22:06:43 UTC
Created attachment 301119 [details]
Verify that splice works before using splice

I do not have any file systems available to me that does not work with splice.

Can you test this patch to see if it switches over to read/write properly if the source directory does not handle splice?

Thanks,

-- Steve