Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3768632pxb; Tue, 17 Nov 2020 03:06:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyOCQjFsNN5asOuf+uT51UqglWAt4WJoFKpjbnhf3m0Iqv8YZb7ahS8k72SiWNFAs2EE/q X-Received: by 2002:a05:6402:1218:: with SMTP id c24mr20816844edw.259.1605611177880; Tue, 17 Nov 2020 03:06:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605611177; cv=none; d=google.com; s=arc-20160816; b=bz0Zp+onQyx8BrKNmoWtjQb8tFzEvyTu9MYl74+ZTdV3of0zkIa/HpIRklV7EZVbEL 3P5bGhIN9sO6WPekp4n+L5td2BAVVMgVCeApRMhlTV3w5FktA2jE3Tyu749fO4TTY1WN WnpBTIs9Ek00Uldyj86Q/14GlOS3SmcbIlgtxI8cO9QKb7o+1lGMbly0HujM9ss1+toc tXq7bjAFKNs6122M5sp5zskale0mYGEg3zHNE/OdSbbKOO5FfnH+vDEcHVTRaxfPu8RK y7XGnyvEW2xQ1ETZGGW+hpR9nrkHhvWkhNV95AIJ9LTg6I2WmljnmUM7awCPW56uyxES DzIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AfsBBJQlAh57+ie4wVJxlFJCOKfqGL6i0947M+1Am1I=; b=A/0FEkM7E+Syd8dKfUkrAWxLLq0y6xESreKkMQXUJRCuJ+gHDT0iul9JFiUdHKsmHs nE8vjHJ8YlyG8GCDCA4aMzcRgCd/4HlR6hTJvyIiFoAHf8RyX2bJANIMuoQyxkpK/uJA 90ymdaPvLFoTY2bl3evVqfYuKVHBE/dSHU0L9BRdEddv9mKVWT3nXwT4FmdS1dZqGJ57 1s7+qMtg7jpUVarPpwxHiC9vyLGP5h5afaMAnWK4QGOgaa7QX/9Ho7Nm5cq/LRlUTiJn 4ueCaycwargGVGFAloKwsrZ0MKwj184ByulShQjCGLFq8+FZdv8aXsB4Rgf8UBV6LSAX TERw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f4si13653432edq.363.2020.11.17.03.05.55; Tue, 17 Nov 2020 03:06:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbgKQLCb convert rfc822-to-8bit (ORCPT + 99 others); Tue, 17 Nov 2020 06:02:31 -0500 Received: from us-smtp-delivery-44.mimecast.com ([207.211.30.44]:49035 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728444AbgKQLCa (ORCPT ); Tue, 17 Nov 2020 06:02:30 -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-449-Xvf4NYRbNUuyKkuruKdGjQ-1; Tue, 17 Nov 2020 06:02:23 -0500 X-MC-Unique: Xvf4NYRbNUuyKkuruKdGjQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 647441017DCB; Tue, 17 Nov 2020 11:02:21 +0000 (UTC) Received: from krava.redhat.com (unknown [10.40.192.215]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6205F5C1CF; Tue, 17 Nov 2020 11:02:18 +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: Tue, 17 Nov 2020 12:00:52 +0100 Message-Id: <20201117110053.1303113-24-jolsa@kernel.org> In-Reply-To: <20201117110053.1303113-1-jolsa@kernel.org> References: <20201117110053.1303113-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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