Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-06-06 Thread David Carrillo-Cisneros
On Tue, Jun 6, 2017 at 4:04 AM, Jiri Olsa wrote: > On Mon, Jun 05, 2017 at 06:32:50PM -0700, David Carrillo-Cisneros wrote: >> On Thu, May 25, 2017 at 1:10 AM, Jiri Olsa wrote: >> > On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: >> > >> > SNIP >> > >> >> +int perf_event_

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-06-06 Thread Jiri Olsa
On Mon, Jun 05, 2017 at 06:32:50PM -0700, David Carrillo-Cisneros wrote: > On Thu, May 25, 2017 at 1:10 AM, Jiri Olsa wrote: > > On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: > > > > SNIP > > > >> +int perf_event__synthesize_features(struct perf_tool *tool, > >> +

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-06-06 Thread Jiri Olsa
On Tue, Jun 06, 2017 at 12:57:53AM +, David Carrillo-Cisneros wrote: > On Thu, May 25, 2017 at 1:09 AM Jiri Olsa wrote: > > > On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: > > > > SNIP > > > > > + for_each_set_bit(feat, header->adds_features, HEADER_FEAT_BITS) {

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-06-05 Thread David Carrillo-Cisneros
On Thu, May 25, 2017 at 1:10 AM, Jiri Olsa wrote: > On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: > > SNIP > >> +int perf_event__synthesize_features(struct perf_tool *tool, >> + struct perf_session *session, >> +

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-05-25 Thread Jiri Olsa
On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: SNIP > +int perf_event__synthesize_features(struct perf_tool *tool, > + struct perf_session *session, > + struct perf_evlist *evlist, > +

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-05-25 Thread Jiri Olsa
On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: SNIP > +int perf_event__process_feature(struct perf_tool *tool, > + union perf_event *event, > + struct perf_session *session __maybe_unused) > +{ > + struct feat_f

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-05-25 Thread Jiri Olsa
On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: SNIP > + for_each_set_bit(feat, header->adds_features, HEADER_FEAT_BITS) { > + if (!feat_ops[feat].has_record) { > + pr_debug("No record header feature for header :%d\n", > feat); > +

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-05-25 Thread Jiri Olsa
On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: SNIP > }; > > @@ -488,6 +489,12 @@ struct time_conv_event { > u64 time_zero; > }; > > +struct feature_event { > + struct perf_event_header header; > + u64 header_id; > + char data[]; /* size bytes of

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-05-25 Thread Jiri Olsa
On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: SNIP > +int perf_event__synthesize_features(struct perf_tool *tool, > + struct perf_session *session, > + struct perf_evlist *evlist, > +

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-05-25 Thread Jiri Olsa
On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: SNIP > diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c > index 3041c6b98191..ffde0dafed6f 100644 > --- a/tools/perf/util/session.c > +++ b/tools/perf/util/session.c > @@ -256,6 +256,14 @@ static int proces

Re: [PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-05-24 Thread Namhyung Kim
On Tue, May 23, 2017 at 12:48:53AM -0700, David Carrillo-Cisneros wrote: > Add header record types to pipe-mode, reusing the functions > used in file-mode and leveraging the new struct feat_fd. > > Add the perf_event__synthesize_feature event call back to > process the new header records. > > Bef

[PATCH v2 13/13] perf tools: add feature header record to pipe-mode

2017-05-23 Thread David Carrillo-Cisneros
Add header record types to pipe-mode, reusing the functions used in file-mode and leveraging the new struct feat_fd. Add the perf_event__synthesize_feature event call back to process the new header records. Before this patch: $ perf record -o - -e cycles sleep 1 | perf report --stdio --header