lkml.org 
[lkml]   [2019]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC/PATCH 00/14] perf record: Add support to store data in directory
Jiri,

While you're looking at the output format, I think it would be good
time to simplify the code handling perf.data file.
Today, perf record can emit in two formats: file mode or pipe mode.
This adds complexity in the code and
is error prone as the file mode path is tested more than the pipe mode
path. We have run into multiple issues with
the pipe mode in recent years. There is no real reason why we need to
maintain two formats. If I recall, the pipe format
was introduced because on pipes you cannot lseek to update the headers
and therefore some of the information present as tables
updated on the fly needed to be generated as pseudo records by the
tool. I believe that the pipe format covers all the needs and could
supersede the file mode format. That would simplify code in perf
record and eliminate the risk of errors when new headers
are introduced.

Related to your effort to make perf record multi-threaded, I was
wondering how this would impact pipe mode.
Could you explain?

Thanks.


On Mon, Feb 4, 2019 at 12:28 PM Jiri Olsa <jolsa@redhat.com> wrote:
>
> On Mon, Feb 04, 2019 at 12:05:38PM -0800, Stephane Eranian wrote:
>
> SNIP
>
> > > > > > >
> > > > > > > [jolsa@krava perf]$ ll result_1/
> > > > > > > total 348
> > > > > > > -rw-------. 1 jolsa jolsa 27624 Feb 4 11:35 data.0
> > > > > > > -rw-------. 1 jolsa jolsa 56672 Feb 4 11:35 data.1
> > > > > > > -rw-------. 1 jolsa jolsa 30824 Feb 4 11:35 data.2
> > > > > > > -rw-------. 1 jolsa jolsa 49136 Feb 4 11:35 data.3
> > > > > > > -rw-------. 1 jolsa jolsa 22712 Feb 4 11:35 data.4
> > > > > > > -rw-------. 1 jolsa jolsa 53392 Feb 4 11:35 data.5
> > > > > > > -rw-------. 1 jolsa jolsa 43352 Feb 4 11:35 data.6
> > > > > > > -rw-------. 1 jolsa jolsa 46688 Feb 4 11:35 data.7
> > > > > > > -rw-------. 1 jolsa jolsa 9068 Feb 4 11:35 header
> > > > > >
> > > > > > Awesome. What do you think about having it like this:
> > > > > >
> > > > > > $ perf record --output result_1.data ... - writes data to a file
> > > > > >
> > > > > > $ perf record --dir result_1 ... - or even
> > > > > > $ perf record --output_dir result_1 ... - writes data into a directory
> > > > > >
> > > > > > IMHO, this interface is simpler for a user.
> > > > >
> > > > > yep, seems more convenient.. I'll add it
> > > > >
> > > > But what happens if you do: perf record -o foo --output_dir foo.d?
> > >
> > > Should fail, i.e. either you use single-file or directory output, I
> > > think.
> > >
> > Agreed
>
> ok, will do that
>
> thanks,
> jirka

\
 
 \ /
  Last update: 2019-02-04 23:45    [W:0.164 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site