Messages in this thread | | | From | Stephane Eranian <> | Date | Wed, 29 Apr 2020 19:13:01 -0700 | Subject | Re: [PATCH] perf/script: remove extraneous newline in perf_sample__fprintf_regs() |
| |
On Wed, Apr 29, 2020 at 7:09 PM Andi Kleen <ak@linux.intel.com> wrote: > > > I was under the impression that perf script was generating one line > > per sample. Otherwise, seems hard to parse. > > That's only true for simple cases. A lot of the extended output options > have long generated multiple lines. And of course call stacks always did. > > > Could you give me the cmdline options of perf script that justify the newline. > > e.g. perf script -F iregs,uregs > But then it should only use the \n when needed. It is a bit like perf stat printing cgroup as "" when not using cgroup mode add a bunch of white spaces/tab at the end of the line for nothing.
I also suggest that we improve perf stat/script output with an output format that is easier to parse, such as JSON with name: value pairs. that would avoid all these \n and flaky parsing regexp or script I have seen, even internally.
> -Andi
| |