From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74365C433E2 for ; Sun, 13 Sep 2020 21:05:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4019D206A1 for ; Sun, 13 Sep 2020 21:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600031137; bh=o2WgM6e4aRpIF5vVkptHu7DfjK7vO9LghGYxp8OWX4U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=k9cdNEW9IXG6ulrWiED6MpRk8XVczoNr1/aHEZyOtW6cxV9Ht70g6YnpJbtyc6x1Y C1/wI3W89MDkF7KczOcqPccwAAeFD16mlHrNelZabFixPRsQCkn0u0CmjKTo2MW1iX o+ocoFxcIQR+GY7WXEEKg8tnbddIDZb6reGGqAvs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726086AbgIMVFb convert rfc822-to-8bit (ORCPT ); Sun, 13 Sep 2020 17:05:31 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41689 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726049AbgIMVEz (ORCPT ); Sun, 13 Sep 2020 17:04:55 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-471-0OO31HHyNqODwkIEtW8-qw-1; Sun, 13 Sep 2020 17:04:49 -0400 X-MC-Unique: 0OO31HHyNqODwkIEtW8-qw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1E1F91074651; Sun, 13 Sep 2020 21:04:47 +0000 (UTC) Received: from krava.redhat.com (ovpn-112-4.ams2.redhat.com [10.36.112.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B35A10021AA; Sun, 13 Sep 2020 21:04:43 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Song Liu , "Frank Ch. Eigler" , Ian Rogers , Stephane Eranian , Alexey Budankov , Andi Kleen , Adrian Hunter Subject: [PATCH 19/26] perf tools: Add buildid-list support for mmap3 Date: Sun, 13 Sep 2020 23:03:06 +0200 Message-Id: <20200913210313.1985612-20-jolsa@kernel.org> In-Reply-To: <20200913210313.1985612-1-jolsa@kernel.org> References: <20200913210313.1985612-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jolsa@kernel.org X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: kernel.org Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add buildid-list support for mmap3 so we can display hit dso objects buildid with filename for mmap3 data: $ perf buildid-list 1805c738c8f3ec0f47b7ea09080c28f34d18a82b /usr/lib64/ld-2.31.so d278249792061c6b74d1693ca59513be1def13f2 /usr/lib64/libc-2.31.so Signed-off-by: Jiri Olsa --- tools/perf/builtin-buildid-list.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c index e3ef75583514..adcc64478ec1 100644 --- a/tools/perf/builtin-buildid-list.c +++ b/tools/perf/builtin-buildid-list.c @@ -57,6 +57,7 @@ static int perf_session__list_build_ids(bool force, bool with_hits) .mode = PERF_DATA_MODE_READ, .force = force, }; + bool has_build_id; symbol__elf_init(); /* @@ -77,6 +78,15 @@ static int perf_session__list_build_ids(bool force, bool with_hits) perf_header__has_feat(&session->header, HEADER_AUXTRACE)) with_hits = false; + has_build_id = perf_header__has_feat(&session->header, HEADER_BUILD_ID); + + /* + * We don't really show non hit dsos, keep that also for mmap3 + * buildid data, we don't care about non hit dsos anyway. + */ + if (!has_build_id) + with_hits = true; + /* * in pipe-mode, the only way to get the buildids is to parse * the record stream. Buildids are stored as RECORD_HEADER_BUILD_ID -- 2.26.2