Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp286194lqo; Wed, 15 May 2024 14:40:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXRP01QFO0LcB9nmVatflmj7S5taT9VS8rSRPF1GLVQv3cfxIqe9FUpsY7YoiRdi47MdwuCqulftfQFoZL+AQYk/qAfUNA535uKEDMimw== X-Google-Smtp-Source: AGHT+IHfb6Wmh9aGa07e+WB3GUwfuAq6DJxPrRF7fU0EUH5kOjVkBPk1NeX/QsTurjHDZtouuJHH X-Received: by 2002:a17:906:6944:b0:a59:bae0:b12c with SMTP id a640c23a62f3a-a5a2d65ed56mr1585281066b.48.1715809221773; Wed, 15 May 2024 14:40:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715809221; cv=pass; d=google.com; s=arc-20160816; b=ixG4cwA/pOaJ48d1mEAm2b6tTnWwRCW2xcrWch1OyoWnSIAFAnL7L9LSwZ4yrJNGF4 wi9iallSzGcLEoFXGVRSPE76xtMmb1Vi2A3ZOnlh6VXz7wbZlZH4EZu2TbqOnGcs/Nwz 6R7/bQF8m09NcyYnxseNKpawgZR4naLi5SWwB00gQasKZxKZV6VNPAzA48dG7UIxR+fe g36r1oa5LAa8YX/BWDooezZVcd0vce22dql7dodIK3lm+Wk1Z7E1iQaqf1URMkOCIwHT 9F1+lCk2dLaof//ExbA/QiW/pdGpmJTZocqD/Vz7FJ7622niesUdjaPch+Rup9RvNi6r 0D6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=6d83dhT+S2lh1yIex2/6qztxlK0GAg9WvVm+H2kk0ds=; fh=W3YwrkawzqW1q+DyLM3yNCegAZj5ntTHfyX30OGS0VM=; b=Ort31hGFBpwgQTqXFteloerndPVAdvFx+BGgYmPwu3oKqy8/w7oqlNYnEDzCJSQhH7 0a1LmpKZl5T0ikyCwSsbViZqlwU/j1RzpqfNqWnZ4p/QPr/WLHgH1auUaQ6IkA2ztECa e5uo2oICXtP1RXJhrgTlIKmrLmWlbim+sqfSXgT4n3nW5gk+Tvlzi0hRwqu84Nxz3+4G C/BiiqtIkWoCc022q89gnlwFyCSQwVX9FUUbXmFHm0HuE2pLgcFZEUHpDGKROBICbbKI k8Si7BX5pEP7UJ+3dDiWoNJ44AJFGDpUsYIHa8SWNpxzSRLPViKAZIY5vvvDaScA+gTg NBXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2GVWIDGy; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-180393-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180393-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17945e19si759425866b.23.2024.05.15.14.40.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 14:40:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180393-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=2GVWIDGy; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-180393-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180393-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 80A231F2254B for ; Wed, 15 May 2024 21:40:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9130A15B55B; Wed, 15 May 2024 21:40:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="2GVWIDGy" Received: from mail-il1-f181.google.com (mail-il1-f181.google.com [209.85.166.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D41DA15B15B for ; Wed, 15 May 2024 21:40:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715809213; cv=none; b=Ji5peKidrd6fewKoDrKpzve6hx1Lp3lM8DSHZWb9WV4TaUHIG0UVo5rDeMcv35QDYgFVxoXoBTgODvPMG3/7MFiSzmqv0JvHseCJ5IebSbwXX0zKwoa5aCUa8TBJ3alonunyTR5KaUGs/6ONEr9i1ggQdfzdLOzkm5MLzPU/5Qw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715809213; c=relaxed/simple; bh=Z+XgYM30VQnHp7z+uSPBDIaP8spUZThYi3RbwOOKqL4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=FXuMTB2V7lCC6gsG+Iu5XX7b4Gn3QyVUdxmCzmLhHsvVX3cgShy4w26odKGkz+YP3DbShJgYnYfOr8Ac0smhJlLXod7G7upyQROZPHcgH44nhGpzw0gvBOsawiRbvQav7Ne5b6Gzkha2dGQ8YVy4GBm4AjS7dwpsBEr/meW9i1k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=2GVWIDGy; arc=none smtp.client-ip=209.85.166.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-il1-f181.google.com with SMTP id e9e14a558f8ab-36c6056f7bdso107805ab.0 for ; Wed, 15 May 2024 14:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715809210; x=1716414010; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6d83dhT+S2lh1yIex2/6qztxlK0GAg9WvVm+H2kk0ds=; b=2GVWIDGyQW7rtdLvLBUG/T7AgFUFCST9wQnNV2EsE4GeNiRx6uWSwREJmnhR4w01Va w6sTc6/zddzMX1EC4vXQH6apQyLxyfEoBNDAhoF8B+2v5ijUuuHAKgSExVrPY+MES8IO SlN7/GflvqhV2z25L4Wx9BlO9gBYYE18jrEqQ4T9wrUwmnq+/fREETJtEAaJcO8EJG4b NCB9HvecTXSRVj1MEluTBb/VoJE+YsftHcFKM9Kx6od91TvcWiqe2CJJ00TlYK/Fk7H8 UILvDe7pOSZx4mZTXVEKKa4NRr7Q3ro0Hx26gulfzECGnft/Dub/Dej0EoSvnoLhXGwX u3+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715809210; x=1716414010; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6d83dhT+S2lh1yIex2/6qztxlK0GAg9WvVm+H2kk0ds=; b=RW6eBrFLbNbhDgymEZV59WnUo662jur2v1xDehZIk3RUOSCuBZ96Txbi2RLRwHWJUi a9q8t/yqB99ygdLSiryKbocK5LZ5jgb8BLeOuVZX9NqlncBBhIh7Duzm2QWiIFOez1DD IMCDfUYuhOwFhNrcSzFsS1qbQt25ymM7AK++85jib20xSY/nkgiyKjGdptR7Sj5LwjgR 19WZMnMQZ9Swz4E50kECN+1WV7hLaPz1MVCBrx8tDZxby2/nnAk26XkE3HCsv6wkSu2z oC8rOG3Wo5UwpGRsjUvfWfwHVtOBxWNFAffI+O5ngRDhqd4Qz6KkmUIVTegRpmQV2nd6 yIOw== X-Forwarded-Encrypted: i=1; AJvYcCU1U4uF7k2Qx35yHTM6rcScfp9H6YdyUXUXx4LAfqFwq3epGCwmezzAy2wV/t3pee+hLYJEMv6ig2w/fUpmQ14Kl1p8tFjtzEDKBatw X-Gm-Message-State: AOJu0YzL3VLv3VeXyfuZazyZrMCxfL7OjMCL9lAhCFDDnGWNGGXh3kIL NX7JGD9/MK27J1XJuMUoAti3kD6qCLgZCWQ4V/l5semvkKN59Y5k04LATCKBg6zyU3v6/mDho+C zBAKlxAtQEYKnpt+MScVpW8ljUl21C8CpiK45 X-Received: by 2002:a05:6e02:681:b0:36a:3d4d:7149 with SMTP id e9e14a558f8ab-36ccb88f31fmr12244885ab.8.1715809209884; Wed, 15 May 2024 14:40:09 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240515211045.377080-1-leo.yan@arm.com> In-Reply-To: <20240515211045.377080-1-leo.yan@arm.com> From: Ian Rogers Date: Wed, 15 May 2024 14:39:58 -0700 Message-ID: Subject: Re: [PATCH v2 0/2] perf maps: Improve the kcore maps merging To: Leo Yan Cc: Arnaldo Carvalho de Melo , Adrian Hunter , James Clark , Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Athira Rajeev , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 15, 2024 at 2:11=E2=80=AFPM Leo Yan wrote: > > 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-840c= ab478ee5@arm.com/T/#m7c86a69d43103cd0cb446b0993e47c36df0f40f2 Thanks Leo, testing this change on perf-tools-next with an x86 debian laptop I see: ``` $ perf test 24 -v 24: Object code reading: --- start --- test child forked, pid 3407499 Looking at the vmlinux_path (8 entries long) symsrc__init: build id mismatch for vmlinux. symsrc__init: cannot get elf header. overlapping maps in [kernel.kallsyms] (disable tui for more info) Using /proc/kcore for kernel data Using /proc/kallsyms for symbols Parsing event 'cycles' Using CPUID GenuineIntel-6-8D-1 mmap size 528384B Reading object code for memory address: 0xfffffffface8d64a File is: /proc/kcore On file address is: 0xfffffffface8d64a dso__data_read_offset failed ---- end(-1) ---- 24: Object code reading : FAILE= D! ``` The test passes without the changes. Let me know if you need me to dig deep= er. Thanks, Ian > 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 >