Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2323799lqo; Mon, 20 May 2024 02:07:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWh4pO7+Id7/4jATGDcpQvtOuN9ovOCje9kH5WlPhwKEc/BWrxH8K0/F/kO0aI76thP9PysygifatHlhae5NROMi6j5UEvkCZyS1iKM9A== X-Google-Smtp-Source: AGHT+IFxbWdfjhbZASXthcb49BP3dJ0JbDbZHBYw9VxRs8YPhlIHJ2r1NQpKUVCL7Sj0HkluwcT9 X-Received: by 2002:a17:907:9405:b0:a5a:5b8b:d14 with SMTP id a640c23a62f3a-a5a5b8b0de6mr1709693066b.40.1716196031012; Mon, 20 May 2024 02:07:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716196031; cv=pass; d=google.com; s=arc-20160816; b=evh6AWLr8jtBzYZVfoyirJfy4/D0nv3J4Ju5NmGg12nWiuFBDhaymC5YwEKT78dmwR +9rC8U7IleT7gwTwKGrbtW/zgF2pPWitoCik+hHTtQISEhX58JzXRXtLG90q3Uuwn4m1 07Fi3m/N9MHk5jaHXzroFAc0CVx0e366nkA54l4nYlow5Hu9Bb26FNta8vIm6d5aV+r5 v550XOt37AQkoSKu3VnIUk+auFrNgAWEIfIwlgdzCXHqMTrF6KXFoB9TXA+BKXPosZGC 5a03rp6rYAWeLQKgGaj1umdP7EnTWq04shtNqxCuaZTfkD60En7oicsf2I3cf9fU+tkT pdmg== 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=zM1EsQNZvg6SqZt+JWFa8dzLOfD/XaCgWEtO7xFniE0=; fh=JOiFANok4lIGun7AKujmJvZINFW1b8q3TjGOgKWA58E=; b=fzZDCxRXx8+wkvGRymYkUH7vmqlBcNFOoTSuvHn0OV/tvTVxucPgtZQ8cBy/D038ot eRUAtRk0RzcPHvYu8jVKp827R91Ff8cLkFhjo7BEsg/txqxiMPlB5207iIOxScf8IUbm HbRrgI4UmNEWpgvzeMwWTI7wQEXVf1WkxYo7b5GUBwwomd1PXJVugV9Wyw7knitfF2z/ 1Iq9jg5sXP6qTWqhHwW72GyJRHe7jFGE6GCrT8J2xpEmcOYtIbqdAVywCAcWvnCzszIG tcpY2wREcJ5hVFJZUxzkRre7jfhdNuSueYwZ5RXUvTNRxvWt0aOUDn8bLSLoJgLp8kcd 4OnA==; 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-183513-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183513-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1b7907f7si1384180566b.772.2024.05.20.02.07.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 02:07:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183513-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; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-183513-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183513-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 am.mirrors.kernel.org (Postfix) with ESMTPS id BB8DD1F21059 for ; Mon, 20 May 2024 09:07:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2ECE61CAA2; Mon, 20 May 2024 09:07:02 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 934D18BEA; Mon, 20 May 2024 09:06:59 +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=1716196021; cv=none; b=ik6m9NdTHUszb6Fo9L46Yg+tx+Jq2rYtBUZ29mYts9ztDcAYlR5sdF99XdYKQD/QUXft6QJQkgFu8pXRbdYnrEcmvruG71S+SZ+D84XvNkqbnA1f7jnuhnH27OOqIRDXSPAKHPBxuiDZU9atIspHcrWhftTGpi0aJw8xUM7bvxQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716196021; c=relaxed/simple; bh=f5AN/Ym0NPTwsCQk/Bh1Scol91Pp0/1dSpqgnp8kUiQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ciAjozOCgJmX83u7gS43Lr/bdvNxLRQSxbH14eqayXwIi6Jd2+BTWULbShgU0KF4OLfJIJPGiK8wNVNwA1YxRVRt2OPe26pyU5ibI69Z23p9fMLAL5pzW9cyNS2E4MciWOMNlGlj/H3MMXJ3BnnUXAssC3lRc2dKMvHVQYlXOek= 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 DE5D0FEC; Mon, 20 May 2024 02:07:22 -0700 (PDT) Received: from e132581.cambridge.arm.com (e132581.arm.com [10.2.76.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6478D3F766; Mon, 20 May 2024 02:06:57 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Ian Rogers , Namhyung Kim , James Clark , Adrian Hunter , Athira Rajeev , Mark Rutland , Alexander Shishkin , Jiri Olsa , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v3 0/3] perf maps: Improve the kcore maps merging Date: Mon, 20 May 2024 10:06:44 +0100 Message-Id: <20240520090647.949371-1-leo.yan@arm.com> X-Mailer: git-send-email 2.34.1 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 mess, e.g. some kcore maps might be ignored. Patch 01 sorts the kcore maps and ensures the subset region is placed ahead of the superset region in the list. Patch 02 uses maps__remove_maps() to remove the identical kernel map (generated by reading symbols from '/proc/kallsyms') from the map list. This can give us a neat list without interfered by old map data and is a preparation for later relying puerly on kcore maps. Patch 03 removes the kernel text section replacement. Alternatively, it searches the kcore maps and finds the map for kernel text section, then update the pointer 'machine->vmlinux_map'. 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 (3): perf maps: Sort kcore maps perf maps: Remove the kernel text map with maps__remove_maps() perf maps: Remove the replacement of kernel map tools/perf/util/maps.c | 4 +- tools/perf/util/maps.h | 2 +- tools/perf/util/symbol.c | 136 ++++++++++++++++++++------------------- 3 files changed, 74 insertions(+), 68 deletions(-) -- 2.34.1