Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp787713lqd; Wed, 24 Apr 2024 17:52:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXgIo5e/Jpt+Qc75/5HOCqgbbNbW1xnbwBX1ycsm+Ru6415mSfKeSxu5FLA+pJWI2+f/5+pmC2F4aXr5BuaeXXK5rRd9Gpgm/lRFkbDUg== X-Google-Smtp-Source: AGHT+IHEFG6F+QYSjHhB0ciP2s+tSUoCr9T9hC64lUYaCj0bw9HOTivAC7QFyfSMLGiMJx1sL5yq X-Received: by 2002:a05:6a00:2e1a:b0:6ea:e841:5889 with SMTP id fc26-20020a056a002e1a00b006eae8415889mr6438732pfb.33.1714006330690; Wed, 24 Apr 2024 17:52:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714006330; cv=pass; d=google.com; s=arc-20160816; b=Dm9lz0rHge9tqN1YH5TCs/nKeaG6VjuKYAEogn/rUAZMN2QgwKC+IWLsGMKiGeIc2R 9vVBp19u0gZ9RIWAH8mG18InSKNLDhPjBrcDUjI0FVN1UGe3HrBtYPy2GyjYsYqh+ZI2 UynMB7qrw4I6N9Ji0a31uUCVODytQCLBQOtcD02dVXFTQGoZFeQEVk3pykDY8CyWBzLE TQrfw6iSGRHBrUVFgUj9B/PZZipjFxoyVEf+m9n/l+6dT7u+k3kLVjB2xI5IY93qMWfL H4z7dz1AZ9fhAVL+1pcGSo9bMRKBI+xvXYPxsPwf/hVcrlC9Ra6x3Wr0HtS2FMVhPpNy HHdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6MPeJDwWFK0YL7kY6Hj/y4VhAlv0yuWkwcBXtFLRzqU=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=CgNqsUpGU9w6Vairu5tq0ywJCNpbiynJHlZsFwlbF0siDyJH5hVAkhFRoxkGnBvKUb ONG4CQ2v/UF3NqX4h6QFV+XBgMkgkdM2uST2sgJvJKOT0crMRT7TlJpRxedVu4CbbycK aBnPbOjzfL2hmGNxxn+gcJBCIg3WqrI/gG/bfQvgBdXSj659fNnuqYFsZvvIfzEsQjtu ZZndVizRZZHcU4sGZzLl90c303gWy4FtsuypcOUQbQz3v1v00WEQS+AjRZST2O8h7YC2 1mt8s5n0Y7fawE6jyuHwEOOUS4LZORIahS0DQl41j00L7aYd0F/H5VwLPPqiVEth7Wkl 8U0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZwhqtkYT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l9-20020a654489000000b005dc528a5317si12285866pgq.50.2024.04.24.17.52.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 17:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZwhqtkYT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3B2BB2853EA for ; Thu, 25 Apr 2024 00:52:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9756AAD59; Thu, 25 Apr 2024 00:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZwhqtkYT" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C060D4C7B; Thu, 25 Apr 2024 00:51:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714006318; cv=none; b=tQAs8bktxQqRTMw+YrwW22NWkAWfOWZ4ZN8TUWURMY4oENCemrTv6n8+EKhk93Op7ySK4vj4kIpkSB1HjfJPnkE9H/f0/K7OqFYuJbxGLpox0gR/a7oTJde7wd4dvRtJ/fTBdbcQOOxQ9ga2gjOx+80efF4EVMZiN5ocW6/NJhU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714006318; c=relaxed/simple; bh=46mCUHG3XUnFa6d7tBAIJFcTt/fWfv/oNt7QX7k73LM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gUjUySJOQI5axom585lMj7Abj6D4om+Xk6DkoZLSFz+7qjJG4TMm48CeJfPsA4RHMO0qvf3P31LBI4Qm5srF459t+8misHTlZ5us2ZPWmkzcmUOmoV2RBjXCk0eVAywwC8wCjHx9R6dfM1spMaMO07IkwJFWJfQEYY5RT8Wywyg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZwhqtkYT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4375DC32782; Thu, 25 Apr 2024 00:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714006318; bh=46mCUHG3XUnFa6d7tBAIJFcTt/fWfv/oNt7QX7k73LM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZwhqtkYTiRSahlNP2D07Y1XWzeGXNos4PpGa+PxDJfLjtMaYAum7L+UxvtbpF/uXO rknaQpufh6ML83UzZ/AD0aeGWAhQbNdo3W/h6HXQ/BonexWKko9ULzMOou3QEr4RqD u6VlKmnC83gx5lktDkXjjloC3B1VePuIkROcHGdhdkuGD4bi6qUi9QQI9bd/QWuUaU hK2TH+6cSqJ/hFgCKfDXbSFXzchUD2Jrx5t4cJYJe5WCciUD7n+j3ket5IN37TKTc+ BO+KZXsDTGF3tMcBe3SvdzSIzIueWfxTIqKI4hC3M7tzcSx29J91MxO5hG8Ki7wq+C qEluc2iFVA35g== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCH 2/2] perf annotate: Update dso binary type when try build-id Date: Wed, 24 Apr 2024 17:51:57 -0700 Message-ID: <20240425005157.1104789-2-namhyung@kernel.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog In-Reply-To: <20240425005157.1104789-1-namhyung@kernel.org> References: <20240425005157.1104789-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit dso__disassemble_filename() tries to get the filename for objdump (or capstone) using build-id. But I found sometimes it didn't disassemble some functions. It turned out that those functions belong to a dso which has no binary type set. It seems it sets the binary type for some special files only - like kernel (kallsyms or kcore) or BPF images. And there's a logic to skip dso with DSO_BINARY_TYPE__NOT_FOUND. As it's checked the build-id cache linke, it should set the binary type as DSO_BINARY_TYPE__BUILD_ID_CACHE. Fixes: 873a83731f1c ("perf annotate: Skip DSOs not found") Signed-off-by: Namhyung Kim --- tools/perf/util/disasm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/disasm.c b/tools/perf/util/disasm.c index 412101f2cf2a..6d1125e687b7 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -1156,6 +1156,8 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil } } mutex_unlock(&dso->lock); + } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) { + dso->binary_type = DSO_BINARY_TYPE__BUILD_ID_CACHE; } free(build_id_path); -- 2.44.0.769.g3c40516874-goog