Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp274365lqo; Wed, 15 May 2024 14:11:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWz37WgJSPkdZ8HAO4Qlz5y3kMX/hev5xQimCE4JBTUeZsyX/DqpY2HCtg/JSSb5h9v188s4oTipx1aW4FGU4laooZJse7nDP53gJ7d9g== X-Google-Smtp-Source: AGHT+IF81LLVP18sk1U6Whp7H7xgtME2e+7Rs8J+xc4EasdnPu60ns276xLy6FLNww2hst5/3CvK X-Received: by 2002:a05:6a00:1144:b0:6e6:970f:a809 with SMTP id d2e1a72fcca58-6f4e02d3405mr16973800b3a.20.1715807475328; Wed, 15 May 2024 14:11:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715807475; cv=pass; d=google.com; s=arc-20160816; b=1Efx5NzLtjtgCQsTKHA6VAaS9LTAIx1WCLluC4zmQB/8pY+W+YwdvPJh7E+0nsnVSY KrIL3W7Q4t5vppj7nHYFvii1ZVxISr7cxP3u4gTFKMXnUwuDDJJIRUwSEcyeYqit7Z31 cc3uV30mrELTCHACqs1iQmtmn1ZFKX3uzD9YXhGIm96xe/eZtSmySI4ZHKb6cL8OT2pT WEXjeYvI1CtXcwCXvcLpIX3q08rj/yVJaJ62IdSaeQH6aVVBofT6uPvRe0CW8LaJ5NPY WEoLKgFuvvYN0TaFSwevwll+Ubqi1zUMrp3qF3WntIT83Gtfz7QJZDXsLHB5eHQ/0gdS yL5Q== 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; bh=W4C8FnLZXxBtt21ZUy5Bc2R6wzr0nY+5NA0akrlcbAM=; fh=5BksDJxA/SfhQk3QQHTEZ4fXEO+DxcBDG1/AZim0b5U=; b=YQvEX/CsNBuDRBb2+qTWk2MW4pJl34cDJZ3FOVpCUCGGP4xijQO0dadbBPtcW9XRxp 5LkZxW/TQ7x0Uit8Ur8q8lOdyrTc1ThkZeAed/OreNrupghaqhkw1iUCyaXHViweymZ2 Wa9UnwpfM/RnXxec7u+6GiyUEojzdoh332vnbWLll3qGBsHQIPrDm54u6wi+F2pP9EuA b3vFiuH+HF9G9oQNXEcHev/XfpcrYzsj1UAXiyu3991yMOBmgJkYD4Tih7by/O+Tgzkr brPpsOufwNd7kxSEPrCUWG/bo/Jm5/jUnmqyTDvZnsYla20hiPecTiU3T4YNDTOD0zKI qhAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-180368-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180368-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63409e824a8si14388872a12.128.2024.05.15.14.11.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 14:11:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180368-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-180368-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180368-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 CA395281BED for ; Wed, 15 May 2024 21:11:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E50115B126; Wed, 15 May 2024 21:11:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22D8C1581E2; Wed, 15 May 2024 21:11:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715807468; cv=none; b=cGHTUBSFDUyG+JQRAqP6mtrN3xJHaGXSYl/Bq8LtFidgQ1wDjMdEBuDKgZBUtLhba/E8HFF1C87E2F3D1lGQMSJqV2awh8Y1t5bO1OJY6JnY1gWvOMzX05fo8S8ddm/bfyppC+PqABCEP6zEwtCtu6Z5b94Gbb2/spWg7EIz5cg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715807468; c=relaxed/simple; bh=cLwxtMm8r2GhQ994afjM2kPtSmB+IUYXXOxywWbJ1Ok=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=udWXs9NHiXcABz5HQFjb1jO/IRrrqGS+Qtn7rBE4fLQtoitEpOH7ltY2H5s9yE1OOZBfKEJGtRGvX4go3omC39HPcJqkKpExfkngnw5bl2A/3Cd/FO/JtX2BQ273/h54sYysf0P7EQmP2rSWlLBOYZOPrOve9aRYTDNkoHZHgy8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 81FF8DA7; Wed, 15 May 2024 14:11:28 -0700 (PDT) Received: from PF4Q20KV.arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E21F93F7A6; Wed, 15 May 2024 14:11:00 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Adrian Hunter , James Clark , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Ian Rogers , Mark Rutland , Alexander Shishkin , Jiri Olsa , Athira Rajeev , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 0/2] perf maps: Improve the kcore maps merging Date: Wed, 15 May 2024 22:10:43 +0100 Message-Id: <20240515211045.377080-1-leo.yan@arm.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series follows up on the patch [1] to improve the sorting and merging of kcore maps. Since the kcore maps are not sorted, merging them into the kernel maps causes difficulty, e.g. some kcore maps might be ignored. This is why the dso__load_kcore() function handles the kernel text section particularly for replacement a complete kernel section. This patch sorts the kcore maps and ensures the subset region is placed ahead of the superset region in the list. With this change, merging these maps becomes easier - no need the special handling for the kernel text section. This patch series is based on the latest acme's perf-tool-next branch and tested on Arm64 Hikey960 board. [1] https://lore.kernel.org/linux-perf-users/438f8725-ef3f-462f-90e2-840cab478ee5@arm.com/T/#m7c86a69d43103cd0cb446b0993e47c36df0f40f2 Leo Yan (2): perf maps: Sort kcore maps perf maps: Remove the replacement of kernel map tools/perf/util/symbol.c | 117 +++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 60 deletions(-) -- 2.34.1