From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423071AbbD2M0R (ORCPT ); Wed, 29 Apr 2015 08:26:17 -0400 Received: from mga11.intel.com ([192.55.52.93]:44031 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422838AbbD2M0O (ORCPT ); Wed, 29 Apr 2015 08:26:14 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,670,1422950400"; d="scan'208";a="487156137" Message-ID: <5540CD63.5080503@intel.com> Date: Wed, 29 Apr 2015 15:24:03 +0300 From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jiri Olsa CC: Arnaldo Carvalho de Melo , Peter Zijlstra , linux-kernel@vger.kernel.org, David Ahern , Frederic Weisbecker , Namhyung Kim , Stephane Eranian Subject: Re: [PATCH V3 05/25] perf tools: Hit all build ids when AUX area tracing References: <1429903807-20559-1-git-send-email-adrian.hunter@intel.com> <1429903807-20559-6-git-send-email-adrian.hunter@intel.com> <20150428124532.GC22258@krava.redhat.com> In-Reply-To: <20150428124532.GC22258@krava.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/04/15 15:45, Jiri Olsa wrote: > On Fri, Apr 24, 2015 at 10:29:47PM +0300, Adrian Hunter wrote: >> We need to include all buildids when a perf.data >> file contains AUX area tracing data because we >> do not decode the trace for that purpose because >> it would take too long. >> >> Signed-off-by: Adrian Hunter >> --- >> tools/perf/builtin-buildid-list.c | 9 +++++++++ >> tools/perf/builtin-inject.c | 8 +++++++- >> tools/perf/builtin-record.c | 10 +++++++++- >> 3 files changed, 25 insertions(+), 2 deletions(-) >> >> diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c >> index feb420f..9fe93c8 100644 >> --- a/tools/perf/builtin-buildid-list.c >> +++ b/tools/perf/builtin-buildid-list.c >> @@ -69,6 +69,15 @@ static int perf_session__list_build_ids(bool force, bool with_hits) >> session = perf_session__new(&file, false, &build_id__mark_dso_hit_ops); >> if (session == NULL) >> return -1; >> + >> + /* >> + * We take all buildids when the file contains AUX area tracing data >> + * because we do not decode the trace because it would take too long. >> + */ >> + if (!perf_data_file__is_pipe(&file) && >> + perf_header__has_feat(&session->header, HEADER_AUXTRACE)) >> + with_hits = false; > > when there's auxtrace in the perf.data, all the dsos would have > hits (as per builtin-record.c change below) and be display anyway, > so it seems we dont need this hunk? When there's auxtrace in the perf.data file, then all dsos would be recorded with build ids in the build_id section. This hunk causes: 1) no session processing to find hits 2) print all even if they have no hits > > jirka > > SNIP > >> * synthesized hardware events, so clear the feature flag. >> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c >> index c8c784c..4d0ebbb 100644 >> --- a/tools/perf/builtin-record.c >> +++ b/tools/perf/builtin-record.c >> @@ -620,8 +620,16 @@ out_child: >> if (!err && !file->is_pipe) { >> rec->session->header.data_size += rec->bytes_written; >> >> - if (!rec->no_buildid) >> + if (!rec->no_buildid) { >> process_buildids(rec); >> + /* >> + * We take all buildids when the file contains >> + * AUX area tracing data because we do not decode the >> + * trace because it would take too long. >> + */ >> + if (rec->opts.full_auxtrace) >> + dsos__hit_all(rec->session); >> + } >> perf_session__write_header(rec->session, rec->evlist, fd, true); >> } >> >> -- >> 1.9.1 >> > >