Bug 213659 - trace-cmd record requires splice to the output filesystem
Summary: trace-cmd record requires splice to the output filesystem
Status: NEW
Alias: None
Product: Tools
Classification: Unclassified
Component: Trace-cmd/Kernelshark (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Default virtual assignee for Trace-cmd and kernelshark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 21:21 UTC by Johannes Berg
Modified: 2022-06-07 22:06 UTC (History)
1 user (show)

See Also:
Kernel Version: N/A
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Verify that splice works before using splice (1.44 KB, patch)
2022-06-07 22:06 UTC, Steven Rostedt
Details | Diff

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

Note You need to log in before you can comment on or make changes to this bug.