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=-10.0 required=3.0 tests=BAYES_00,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 90D50C2D0A3 for ; Mon, 9 Nov 2020 21:55:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A0D22074F for ; Mon, 9 Nov 2020 21:55:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732006AbgKIVz5 convert rfc822-to-8bit (ORCPT ); Mon, 9 Nov 2020 16:55:57 -0500 Received: from us-smtp-delivery-44.mimecast.com ([207.211.30.44]:60682 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731873AbgKIVzy (ORCPT ); Mon, 9 Nov 2020 16:55:54 -0500 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-425-FZ8nvyeGM_2i2l4ZduwS8A-1; Mon, 09 Nov 2020 16:55:47 -0500 X-MC-Unique: FZ8nvyeGM_2i2l4ZduwS8A-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9E1A7802B6C; Mon, 9 Nov 2020 21:55:44 +0000 (UTC) Received: from krava.redhat.com (unknown [10.40.192.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 97FE86EF46; Mon, 9 Nov 2020 21:55:41 +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 , Ian Rogers , Stephane Eranian , Alexey Budankov , Andi Kleen , Adrian Hunter Subject: [PATCH 23/24] perf buildid-list: Add support for mmap2's buildid events Date: Mon, 9 Nov 2020 22:54:14 +0100 Message-Id: <20201109215415.400153-24-jolsa@kernel.org> In-Reply-To: <20201109215415.400153-1-jolsa@kernel.org> References: <20201109215415.400153-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jolsa@kernel.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset=WINDOWS-1252 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add buildid-list support for mmap2's build id data, so we can display build ids for dso objects for data without the build id cache update. $ perf buildid-list 1805c738c8f3ec0f47b7ea09080c28f34d18a82b /usr/lib64/ld-2.31.so d278249792061c6b74d1693ca59513be1def13f2 /usr/lib64/libc-2.31.so By default only dso objects with hits are shown. Signed-off-by: Jiri Olsa --- tools/perf/builtin-buildid-list.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c index e3ef75583514..87f5b1a4a7fa 100644 --- a/tools/perf/builtin-buildid-list.c +++ b/tools/perf/builtin-buildid-list.c @@ -77,6 +77,9 @@ static int perf_session__list_build_ids(bool force, bool with_hits) perf_header__has_feat(&session->header, HEADER_AUXTRACE)) with_hits = false; + if (!perf_header__has_feat(&session->header, HEADER_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