• Namhyung Kim's avatar
    perf record: Display data size on pipe mode · 5b9e4eef
    Namhyung Kim authored
    Currently pipe mode doesn't set the file size and it results in a
    misleading message of 0 data size at the end.  Although it might miss
    some accounting for pipe header or more, just displaying the data size
    would reduce the possible confusion.
    
    Before:
      $ perf record -o- perf test -w noploop | perf report -i- -q --percent-limit=1
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.000 MB - ]    <======  (here)
          99.58%  perf     perf                  [.] noploop
    
    After:
      $ perf record -o- perf test -w noploop | perf report -i- -q --percent-limit=1
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.229 MB - ]
          99.46%  perf     perf                  [.] noploop
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Reviewed-by: default avatarIan Rogers <irogers@google.com>
    Link: https://lore.kernel.org/r/20240112231340.779469-1-namhyung@kernel.org
    5b9e4eef
builtin-record.c 113 KB