Received: by 2002:ab2:72c5:0:b0:1f7:f6a4:354b with SMTP id r5csp41725lqm; Tue, 7 May 2024 08:12:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUyItmy/09DnrCBNr9vZBglfuZx7RE5UbXrN+99N3LbPoB7azK7qOIEhF05rOg+UVDCYCARQHE9y7Rb3+2sMydjgTWylmwFUFvBgfMnFA== X-Google-Smtp-Source: AGHT+IEqRk95BqqT0IiuT3mbsN9R4bbhJG2BigmO0NthaNSMqkHDCrBOP17stsv7MC+vm47g59hT X-Received: by 2002:a17:902:7c8b:b0:1ec:4adc:4153 with SMTP id y11-20020a1709027c8b00b001ec4adc4153mr12754006pll.24.1715094744512; Tue, 07 May 2024 08:12:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715094744; cv=pass; d=google.com; s=arc-20160816; b=AWLt+Lu479whFYxguWzLfSFrciPMvPQmSCMI/NW+M4LRDH1VQXHFuWlGmaxplx6Gnd ix+UA9NQq1Bg4JmoSTOLqTJspzQBCeZ7gU4GzcDehycA1nl9Rxqar/7dqmcxPA47lGR3 Yc2/Gd39rwOvm78tVCIVXcpI6F9CMqQBT8rYJ9B/b316iTh3R1nd+gYgF6nKDWREO5hk GXiNuIT2RLQlxSs+fp1Q2CqLzsYn/J1+vVQ7sBTql+u3DH/bK8vo2TNkDHxQJ7oLBfTk nNyDx4i4wFoxkH9cwdH5lprk5XbKVTi87VMAFKoQdtuAj1MhGNjSHfC/xXNomsFsIzky L6Pw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4KlYy24jwQwGT5KyZ9Yc4brYCJt2wfG5hx8RmPAigKo=; fh=ZGi+OzHaW+P7yUkDkd4uTOiyzGF5DpoBM5UmpX15Znw=; b=EzUkPpKnreo1HdWGmaTscY9APauZJmw2JMOVJkj6o7fjJhJbq4sm4deOQQY6N9/zed 3ivzgzaHF3nw93Q0i1IoH8dDR3E1Nk2Tq61iMqnG0NHaf0OBRsrO95cv8LvdaQTA0qX0 DO8dgImwXWuh0K6f3/YZVYmsc15nn1GANtWAFFb1ACapFqLs8zL7QX3DZVWbo7y11EKE R2NkvQ8doL7fcv6w+fp1ji20SCQ9qCQqNNdJu2JEHuJUVaXSEiCZQPWiiYalglWZvfBZ sUR4ODvfHsTnkXGcRYXJ1EZQ+VsGhBW7u1/GjY0hlIm7egzQY5NySp1YCMvEAzgzOvpt i2QA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lj4SEG4r; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171665-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 i17-20020a17090332d100b001ebac60667bsi11160886plr.54.2024.05.07.08.12.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 08:12:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171665-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=lj4SEG4r; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171665-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 D942A282252 for ; Tue, 7 May 2024 15:11:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9958160862; Tue, 7 May 2024 15:11:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lj4SEG4r" 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 08A8B15F414; Tue, 7 May 2024 15:11:42 +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=1715094703; cv=none; b=iaz33BEsPU4weCq1uDbmQ5v8ho1seIPUcWmCwAynOghRH7uOZ+43gX6rBgo40ESAK/7i13vpmo2hVlm9vsk0brG6/a9JKQbxAJsZMMtbmvoSowkVerCH3jJYtJ6JpiE+2pxFuIzPRJ9Rm2xptaKSt4fMGna73hLARgj2n/iRm6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715094703; c=relaxed/simple; bh=OvO4hU6FbxLQCI8dRSSkC2frlsAefmth7VKNn4rLX64=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AGQaK/fMQUlBz2rL+5gA6GTGWtOf5tNC9lPCUG0V3V6uyEuDCGQtk6IcIP9adVLqWohZFaCjGbLWQ80axAC9HTM86XuI9Utdzp73iaGVXjWVPNJSiDfnZu0ukOxEEJRktvqV8ta+FoAc7lgoOvfn2co/BmGs8R2vT9GUlCD184s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lj4SEG4r; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32D18C2BBFC; Tue, 7 May 2024 15:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715094702; bh=OvO4hU6FbxLQCI8dRSSkC2frlsAefmth7VKNn4rLX64=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lj4SEG4rG+swNVVMfblGTHrNIo4JZzl+85zJxvVzDJrZJxa/Z3TShmbUfSC45mMdX KILwU50T6yaQICNzl6xecSDCxqjy1zSRUNlnjyf/IrpXEzvtQ5ycmpzZUyj5GcPEmU 3SVIoHULSWTBxQXhrsijMurDMc//uCbf6WNbdGgDoYN+nliihaWiAm5a5dX5/O7i0D NZO5spHtmEO1VZh3FBgETZh4KEbv/V2flKrwK00Y0/MrtBYPno9OLA3/7HUE8y6mEe SrDRRpSwK9yEn3r6snqcd3urQuyM6maZcDnFYyPj7QKWEMAf2IDLIeVm/3x1RKGaWq fdMcGl9xTbPsw== Date: Tue, 7 May 2024 12:11:39 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: linux-perf-users@vger.kernel.org, atrajeev@linux.vnet.ibm.com, irogers@google.com, Peter Zijlstra , Ingo Molnar , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] perf maps/symbols: Various assert fixes Message-ID: References: <20240507141210.195939-1-james.clark@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240507141210.195939-1-james.clark@arm.com> On Tue, May 07, 2024 at 03:12:04PM +0100, James Clark wrote: > A few different asserts are hit when running perf report on minimal > Arm systems when kcore is used, or the .debug/ info can't be loaded or > /boot isn't mounted etc. > > These result in some less common paths being hit for resolving symbols > and things are done in an order that breaks some assumptions. I'm not > sure if we could do something to make the tests pick this up, but maybe > not easily if it would involve mocking the filesystem or even a specific > kernel. I tried a few different variations of --kcore and --vmlinux > arguments but ultimately I could only reproduce these issues by running > on specific kernels and root filesystems. Please consider adding Fixes tags so that we can help the work of backporters/stable? - Arnaldo > James Clark (4): > perf symbols: Remove map from list before updating addresses > perf maps: Re-use __maps__free_maps_by_name() > perf symbols: Update kcore map before merging in remaining symbols > perf symbols: Fix ownership of string in dso__load_vmlinux() > > tools/perf/util/maps.c | 14 ++++++------ > tools/perf/util/symbol.c | 49 ++++++++++++++++++++++++---------------- > 2 files changed, 36 insertions(+), 27 deletions(-) > > -- > 2.34.1