Re: [PATCH 04/37] perf tools: Add multi file interface to perf_data_file

2014-12-31 Thread Namhyung Kim
On Wed, Dec 31, 2014 at 8:26 PM, Jiri Olsa wrote: > On Wed, Dec 24, 2014 at 04:15:00PM +0900, Namhyung Kim wrote: > > SNIP > >> + >> static int open_file_read(struct perf_data_file *file) >> { >> struct stat st; >> + char path[PATH_MAX]; >> int fd; >> char sbuf[STRERR_BUFSI

Re: [PATCH 04/37] perf tools: Add multi file interface to perf_data_file

2014-12-31 Thread Jiri Olsa
On Wed, Dec 24, 2014 at 04:15:00PM +0900, Namhyung Kim wrote: SNIP > + > static int open_file_read(struct perf_data_file *file) > { > struct stat st; > + char path[PATH_MAX]; > int fd; > char sbuf[STRERR_BUFSIZE]; > > - fd = open(file->path, O_RDONLY); > + strcpy

Re: [PATCH 04/37] perf tools: Add multi file interface to perf_data_file

2014-12-25 Thread Namhyung Kim
Hi Jiri, On Fri, Dec 26, 2014 at 7:08 AM, Jiri Olsa wrote: > On Wed, Dec 24, 2014 at 04:15:00PM +0900, Namhyung Kim wrote: > > SNIP > >> #endif /* __PERF_DATA_H */ >> diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c >> index d5eab3f3323f..a5046d52e311 100644 >> --- a/tools/perf/util/

Re: [PATCH 04/37] perf tools: Add multi file interface to perf_data_file

2014-12-25 Thread Jiri Olsa
On Wed, Dec 24, 2014 at 04:15:00PM +0900, Namhyung Kim wrote: SNIP > #endif /* __PERF_DATA_H */ > diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c > index d5eab3f3323f..a5046d52e311 100644 > --- a/tools/perf/util/util.c > +++ b/tools/perf/util/util.c > @@ -72,6 +72,49 @@ int mkdir_p(

[PATCH 04/37] perf tools: Add multi file interface to perf_data_file

2014-12-23 Thread Namhyung Kim
When multi file storage is enabled, the perf data files will be saved in a directory (default: perf.data.dir) and it'll have a single header file for metadata (task/comm/mmap events and file header) and multiple data files (sample events) like below: $ tree perf.data.dir perf.data.dir |-- pe