Messages in this thread | | | Date | Tue, 24 Mar 2015 12:07:10 +0100 | From | Jiri Olsa <> | Subject | Re: [PATCH V6 04/25] perf tools: Add support for AUX area recording |
| |
On Mon, Mar 16, 2015 at 02:41:26PM +0200, Adrian Hunter wrote:
SNIP
> index 8acd0df..7553788 100644 > --- a/tools/perf/util/record.c > +++ b/tools/perf/util/record.c > @@ -119,7 +119,16 @@ void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts) > evsel->attr.comm_exec = 1; > } > > - if (evlist->nr_entries > 1) { > + if (opts->full_auxtrace) { > + /* > + * Need to be able to synthesize and parse selected events with > + * arbitrary sample types, which requires always being able to > + * match the id. > + */ > + use_sample_identifier = true;
no need to set use_sample_identifier, you can call perf_evsel__set_sample_id with true
> + evlist__for_each(evlist, evsel) > + perf_evsel__set_sample_id(evsel, use_sample_identifier); > + } else if (evlist->nr_entries > 1) {
but shouldn't you first detect the perf_can_sample_identifier bool same as the other leg does and use it accordingly? maybe smth like:
if (evlist->nr_entries > 1 || opts->full_auxtrace) { ... }
if (opts->full_auxtrace && !use_sample_identifier) err..
jirka
| |