Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp336353lqj; Wed, 10 Apr 2024 11:51:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU76mcEU8uiVnP0OyNHMg/C2oxE6yT/zzIPmC05iiSxLdkg662wRhcAlAx0g5V5tsi2bRO3/6CfZ0aPA80kjGOpKb6+YCn7IOj8fwYGlg== X-Google-Smtp-Source: AGHT+IFJvHkymUI8gOiXwCmyPwfWMmNepfB0t6OumyHWdNNOZXF3+dQW1qwM+ldplK1k3NkVenF9 X-Received: by 2002:a17:907:7f87:b0:a51:d605:49ea with SMTP id qk7-20020a1709077f8700b00a51d60549eamr3160855ejc.8.1712775088072; Wed, 10 Apr 2024 11:51:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712775088; cv=pass; d=google.com; s=arc-20160816; b=ZRxh+dyOZnOZQCpQaaTHmmg7+uvnZTr0+wKCKVEOtb04/SOnrl6ySkUprXwjmIiFvP /mz/rMVMb9ID4T94WsTVsxdCKK0Y5jD+Suh5N2wlE2dwV4tf+FV+yS1moa6g8SMo/i1P dlb8F5dWEoyEP/VsATLjsLrAdeS8vz14TlzTad1DIH8TvKTfT1zVH1X7G+ke4Q33oQBG B6vNRmL5sfCT9RwlEoXkwXerow7tUFTmNBIx8UYIbH7xSZP+gEoJBdEn3QGTzcuRMGLw Guvn8BiEV1vOrD8m3WhXtLcV/k73YWpsU1MxDI1CHevo9bTA9M9VjsOTt6B/uI1vPZXi VxIQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=8z5HgFFu9tEpX2X2DACuuh94vIHapJHHWLjrimZDpao=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=WV2X1ZkgHZvHM26r1uZIRn9Mh/X4akEsozPEMgGkMQZskwvq5ODKQ5lg+n8/UxdDSi jdRkgjhn7iwuA9NCOCyWGnx/3vE+enOmwH5rLQWRHdsJzf1JD8tCUWH6k11aEfCgmecB CDhFkQBySD8UQHKzZLe0vK/xRi+jaYEREimZD6vGoTXZQ1aySWN/3gEpdXAmM5a/feAj dppE1GCPNMbEJdxdViGFBfkAHpfbUBFepTmAhyDiipxUpw60bWeI17WBmyk46t+j1OIO QtE9JpMOeu3eG7FhpBy04D1rwD9jHVpnWOf9skCzRzJ4DsjySALiMcDhfIho/f+IzkWP igOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AlIJSi6E; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139222-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s1-20020a170906a18100b00a51fe594977si1793405ejy.792.2024.04.10.11.51.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 11:51:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AlIJSi6E; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139222-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139222-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C97691F23347 for ; Wed, 10 Apr 2024 18:51:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FEB7177986; Wed, 10 Apr 2024 18:51:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AlIJSi6E" 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 AAC4215B553; Wed, 10 Apr 2024 18:51:18 +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=1712775078; cv=none; b=E+aWiiBw4JGgrJ64lx3knFixreBYnPkHO7qizl+MD8DL3Qk98mTt3JVEzS0DCMO9X8KvBpeJype7NUIm5LrMlrmjkLRXoFhvsqe2xGF08WbJpPQBvplIU9kdu1shxrHe2J5eTxvvYUUTtCH8yOsraXy7qh6JygeqLHwSp1LZQbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712775078; c=relaxed/simple; bh=uk6YkMUxJv7HaSVCQDn74ZjZOlGw6gZ/lMU0WUZv8wc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=njVkklJqx01swx+Yz03+ftQMhY7tPohj2P/48UjBw/ly/F2ovHg2ymcxH1JSK4LVSQKr99B2VuZw6wE+vH4B1mKJo6JRheGJ9Vqbq9qcm4Zpn4uABX4XmRfFT6KLThWLKguzEes6+JdPhaDrsuevJXcoM/B2tGR3v2wIIzsm19g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AlIJSi6E; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1486C433C7; Wed, 10 Apr 2024 18:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712775078; bh=uk6YkMUxJv7HaSVCQDn74ZjZOlGw6gZ/lMU0WUZv8wc=; h=From:To:Cc:Subject:Date:From; b=AlIJSi6EVyRPBDTwk89QTm3T25I2dRXoRynSPHKZacJN9n4FGA79xwE143AjcMFIW q2/6N1vg11ojb+fbfxo5fYQs9AqFPzwM54vPk6BVkwIPz/FMSft5AMZoW4e1snzUch 415Qt5kiQeJZoy9HmFTQBQIExQxVXIQQ39DaLeRVjTqUwlexc3xylI+HhB9MM6GRxt IeYwsA/LMviGhW/OiQ7omPMH65B4eZQ7RZnYlrbabwrI0d/S3B74lrxC9GBpLerprO twZulNVcD0KOZVl3ZtzVvpbXwMer7mnEatC7d9hX+7FJCG8qFBq1YirzYLTb9hN96N nmzCAAxS91jFQ== 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] perf annotate: Skip DSOs not found Date: Wed, 10 Apr 2024 11:51:17 -0700 Message-ID: <20240410185117.1987239-1-namhyung@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In some data file, I see the following messages repeated. It seems it doesn't have DSOs in the system and the dso->binary_type is set to DSO_BINARY_TYPE__NOT_FOUND. Let's skip them to avoid the followings. No output from objdump --start-address=0x0000000000000000 --stop-address=0x00000000000000d4 -d --no-show-raw-insn -C "$1" Error running objdump --start-address=0x0000000000000000 --stop-address=0x0000000000000631 -d --no-show-raw-insn -C "$1" ... 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 a1219eb930aa..92937809be85 100644 --- a/tools/perf/util/disasm.c +++ b/tools/perf/util/disasm.c @@ -1669,6 +1669,8 @@ int symbol__disassemble(struct symbol *sym, struct annotate_args *args) return symbol__disassemble_bpf(sym, args); } else if (dso->binary_type == DSO_BINARY_TYPE__BPF_IMAGE) { return symbol__disassemble_bpf_image(sym, args); + } else if (dso->binary_type == DSO_BINARY_TYPE__NOT_FOUND) { + return -1; } else if (dso__is_kcore(dso)) { kce.kcore_filename = symfs_filename; kce.addr = map__rip_2objdump(map, sym->start); -- 2.44.0.478.gd926399ef9-goog