Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4910046pxb; Sun, 7 Nov 2021 01:58:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzes9EK7iWO12l2wJOWwY004o/LFVQZnFAvwr8IKqQy5fsr5CpppQZE/Y+bOdf3yV+uJHPj X-Received: by 2002:a02:cab6:: with SMTP id e22mr6383096jap.73.1636275509257; Sun, 07 Nov 2021 01:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636275509; cv=none; d=google.com; s=arc-20160816; b=JebiTsExQjHBsWbeBBxC6Us3Lj8RKVt9/TwlwtUQnXvBRSqib+imsldd6Hyim/D9YQ yTdYofdUptWWEKbgr5hLIW+UTclNpM+nNAg7BVDa4ydLnjKjfWeRognIl5V6Sm649fVE ZEx965HBYBSHoXgQzmXGu1c4eGYPMqHTwiih++xOGORmUGxglGL+kluCP9uClVw5QARU 2b9C4wMLfbDPqPOzrSedby365uuwzJN4VoI89ug39g7CnQlpYhziq4CqjRK2Qj7DL8l7 VcR+JNAkQuPql1XU1jNemrGzjSqMs5EzxJlhv9xmLZnDWFmKJOuInT9r1mN2eQPf8vsr VeGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NUYF86kr/ptEq6MUG3L6igYhNlLMXVzIkoVUU4zl/Kg=; b=PbGau0tPAz1nQcKl4htsW74VK0rFlS1sZPvDpWJm5Q+H/EV4HfSTK2cT7SBwHBuTW/ 0u4eOvH0CthkdUFeH1YgkFEGHrtTv0384OPKu3chg5aN0x4iWbcXZVRtjtjBHfmQ8Cvw OgVKR9SzpCZ0uC0RAfkVbKCBe24u28LwvXgVMNN/TUYJGlnB8KqETWbazwqfDmc4UXbN 4xTEQMr73DDb++NdueQufO8LBPkyDz4r6olFRoCuFh4Ju8dhIEbgTNtoB1ZLwGYVASyq RjxnLbxXYtXlkkV3/2QgORXmK0UcPdbcfh/NHVinXMIVilVNcYOl2ZOlNwN6sXhzGlNn 1Y6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QU+ZsP3x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p12si16798629ilg.110.2021.11.07.01.57.48; Sun, 07 Nov 2021 01:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QU+ZsP3x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234958AbhKFTut (ORCPT + 99 others); Sat, 6 Nov 2021 15:50:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:51028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbhKFTut (ORCPT ); Sat, 6 Nov 2021 15:50:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6706F6112D; Sat, 6 Nov 2021 19:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636228087; bh=IdVT7GtyCMR4mfmk12mO3uhHDYgE7JCCf6WE6qE97KI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QU+ZsP3x1VWA/TJJOQVHOmLnqzlskhiVnOU5TAvZL2bMiw3zOFSCv4PJQdsP1YTeL CIJw43JESnanhHIlACmIrF4mixxlffx88fjrJ4Fadi6kRlzD909CjyDCGSzUUbTruH sbiOodFllwwQhGm1lxHaOqJ1FGbx71E4SuaDC3Kbg60RYNtwnZipFubUYapqj8/8H7 aEJghCM9MQvcpAlyUoGDA+n6x1bLFl3gplLKO0wHXPfPLBv2af6kCn4Km0BE9RXKFH YACiCyzw9D7DAmQr28q4mMnWDxTm/SQDRnNAc8EYgZRIqlrBFsLTj7GIiTXUeGL3rT diyeoDK4iisoA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 549E4410A1; Sat, 6 Nov 2021 16:48:04 -0300 (-03) Date: Sat, 6 Nov 2021 16:48:04 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: Lexi Shao , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, qiuxi1@huawei.com, nixiaoming@huawei.com, wangbing6@huawei.com Subject: Re: [PATCH] perf symbol: ignore $a/$d symbols for ARM modules Message-ID: References: <20211027095235.123358-1-shaolexi@huawei.com> <0631949b-6cde-dee6-6a77-5b826938ce79@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0631949b-6cde-dee6-6a77-5b826938ce79@arm.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Oct 28, 2021 at 09:44:26AM +0100, James Clark escreveu: > > > On 27/10/2021 10:52, Lexi Shao wrote: > > On ARM machine, kernel symbols from modules can be resolved to $a > > instead of printing the actual symbol name. Ignore symbols starting with > > "$" when building kallsyms rbtree. > > > > A sample stacktrace is shown as follows: > > > > c0f2e39c schedule_hrtimeout+0x14 ([kernel.kallsyms]) > > bf4a66d8 $a+0x78 ([test_module]) > > c0a4f5f4 kthread+0x15c ([kernel.kallsyms]) > > c0a001f8 ret_from_fork+0x14 ([kernel.kallsyms]) > > > > On ARM machine, $a/$d symbols are used by the compiler to mark the > > beginning of code/data part in code section. These symbols are filtered > > out when linking vmlinux(see scripts/kallsyms.c ignored_prefixes), but > > are left on modules. So there are $a symbols in /proc/kallsyms which > > share the same addresses with the actual module symbols and confuses perf > > when resolving symbols. > > > > After this patch, the module symbol name is printed: > > > > c0f2e39c schedule_hrtimeout+0x14 ([kernel.kallsyms]) > > bf4a66d8 test_func+0x78 ([test_module]) > > c0a4f5f4 kthread+0x15c ([kernel.kallsyms]) > > c0a001f8 ret_from_fork+0x14 ([kernel.kallsyms]) > > > > Signed-off-by: Lexi Shao > > Reviewed-by: James Clark Thanks, applied. - Arnaldo