From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752466AbbCXLHs (ORCPT ); Tue, 24 Mar 2015 07:07:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60040 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752270AbbCXLHo (ORCPT ); Tue, 24 Mar 2015 07:07:44 -0400 Date: Tue, 24 Mar 2015 12:07:10 +0100 From: Jiri Olsa To: Adrian Hunter Cc: Peter Zijlstra , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, David Ahern , Frederic Weisbecker , Namhyung Kim , Paul Mackerras , Stephane Eranian , Alexander Shishkin , Andi Kleen Subject: Re: [PATCH V6 04/25] perf tools: Add support for AUX area recording Message-ID: <20150324110710.GA27134@krava.brq.redhat.com> References: <1426509707-24961-1-git-send-email-adrian.hunter@intel.com> <1426509707-24961-5-git-send-email-adrian.hunter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426509707-24961-5-git-send-email-adrian.hunter@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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