Message ID | 20240206130458.8867-1-adrian.hunter@intel.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-54987-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1522714dyb; Tue, 6 Feb 2024 05:05:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyXrBAinRUjFXGYezlrP/QiNX+FlIKkBAysXr1XXf/Voxh+DfYJzzc27z3sNpWMYkHa1Qk X-Received: by 2002:a05:6402:1a24:b0:560:58f:7148 with SMTP id be4-20020a0564021a2400b00560058f7148mr1902747edb.34.1707224734486; Tue, 06 Feb 2024 05:05:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707224734; cv=pass; d=google.com; s=arc-20160816; b=CqCPQMnVcJdgTr2FDBTHlvFfq7KXTEe02fLaV+Ezc+PBtgvQziyS4TukVLj+Wqoam6 dkGtWFzqflxPskjCZvbLFUv1DIY+UXzTbpoefjl1GdKMPDZtMDN9crbwhzEhCgODNPey n/uaBoCpIvdEgmYcd6zyAZJcD/BjzGgaw3Sv8AYZqLCMNPk6/GrfeJJJ6oWQYAdCfhrF abKiatApzK/wI7iIZzmUwjsm0qNsAT6wjiiQE671s8ZQ1Ga++F0597u0cmzzm8EfgqQN EaxGMmj1Pt3iRwuovzoXUXMZVGLmgL0d1QiB2y9/EN3/avZgbzRkzTx+n5r0A4jugYeq 8Jog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=MGtc6dBb6PNm3fwmBB7dBHWTIdK8AZAndPL8MG5OyXM=; fh=jjcWk2z9vwN5Qrc5asWw3Ugcns2ZTD7VhLeGrIc55eU=; b=fDSDxCKvSfsXK8vhdrPkcR4WpvFN9eKSERd6uZty2f8ZJrbSSvU0ADwT0ycDnt8dTq FDEN7ldQUrSyOo47EOmPvktw+K9scvbhEZ6MKwAMTdGCnTGvHx2z4jMZ2ETI9AAFDLfu W8aj4NJkl+E9FK4w3Ob2JSWHCEmb3LBimKFJiYYZGx94YdHiww4MztL/eKtp/5chJ9/h k71iW7sy33uxpRTB0nwayiWkQR27IYGMiT7xH7w9KHtaUIUXd0aRPviGoWtYnNfLg3w+ XSxwzTdL2u4PzbXSEf1ogjH7TyMSUzrfVKJW4q0y8SW2M6IxXGJKXwCh+9qVaA2VHoJG fNtA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZB58BqL3; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-54987-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54987-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCVJyqKmQDk1emyDUxu4LLXHxcRSPitAcVIgo6l2GK+xrrS6PNrmqI/JM0h6J9GKII5Sbv/bcnjppPF3xJWxcfutechPCQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ck10-20020a0564021c0a00b00560a5f94229si820234edb.223.2024.02.06.05.05.34 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 05:05:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54987-ouuuleilei=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=@intel.com header.s=Intel header.b=ZB58BqL3; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-54987-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54987-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 1BFC71F26BE8 for <ouuuleilei@gmail.com>; Tue, 6 Feb 2024 13:05:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39A27130E32; Tue, 6 Feb 2024 13:05:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZB58BqL3" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) (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 847471DA3F; Tue, 6 Feb 2024 13:05:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=134.134.136.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707224715; cv=none; b=DJG/49QKaQnPtkN4nNqdSV3SgIjKdeTQTRJuixG6kfFCp8tqCby2ws2xSo49wJnQIgwyY7bAHVGb7Ft6nTafalzQL0u97WCuYVeOwxXDlUyVljwqIkVDyfD38S3T5kJa4KjjB8d3psF+DjxmhqfCz564iGK/zbVgrW0frzRo7B0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707224715; c=relaxed/simple; bh=wVw9qf7WnHE9ADCIENN6XtG8+XAbmJBfpkrWnYewZjw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=tvHGCL8FXFE7bzHbIqrE6BAjZX6/gXL/mtIP4OWDshGdm7ZBycklIjLNgy4v177hVpzYCWw3+kaLuNcPKxegsSsb9Lsh5TYxNOSdWpmSquMoVMEymE9H6nKe7Y40AJcGCA9xBOWvDVRtpF+6GGR3mqW2YRop8NiBNfzKd9+TZFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZB58BqL3; arc=none smtp.client-ip=134.134.136.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707224713; x=1738760713; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wVw9qf7WnHE9ADCIENN6XtG8+XAbmJBfpkrWnYewZjw=; b=ZB58BqL3cLb4nSbj4OR27TQpNqXDVRRN0yN/A8ceBhTvgO352vO2nap1 WKgl4KrokU3gYOEx0Q6LHHxLl7R7EeowUJdqZ4FNIpgZi0jGBYCpWPPDU +69jIwCTZ+wuH1LOZvXIe7GzqkMyg03pQIdiEiXq5su0bFcz5i7+nADuR KmAv6WA2ZN5oZg/g+edr6ARcjRcu/ej328rHP//nZJ2DJtPqigIpVNspi XaQqdC9cXr2SgFZztCrq4N4zLYf60y048jbsAfIkvA8OZCq4v4FyVZDN6 LqHs1eVBTlEyDnzmQ8HUMwv5cJcVSqYVgBKOzZYCXWiFl5uXuGsd7Ojsa g==; X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="395161860" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="395161860" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 05:05:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="999413" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.42.101]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 05:05:10 -0800 From: Adrian Hunter <adrian.hunter@intel.com> To: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Ian Rogers <irogers@google.com>, Like Xu <like.xu.linux@gmail.com>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH V2 0/2] perf symbols: Slightly improve module file executable section mappings Date: Tue, 6 Feb 2024 15:04:56 +0200 Message-Id: <20240206130458.8867-1-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790154883233053967 X-GMAIL-MSGID: 1790154883233053967 |
Series |
perf symbols: Slightly improve module file executable section mappings
|
|
Message
Adrian Hunter
Feb. 6, 2024, 1:04 p.m. UTC
Hi Currently perf does not record module section addresses except for the .text section. In general that means perf cannot get module section mappings correct (except for .text) when loading symbols from a kernel module file. (Note using --kcore does not have this issue) Here are a couple of patches to help shed light upon and slightly improve the situation. Changes in V2: perf tools: Make it possible to see perf's kernel and module memory mappings - add dump to perf report (if no browser) as well as perf script - add 'perf --debug kmaps' option also to dump kmaps Adrian Hunter (2): perf tools: Make it possible to see perf's kernel and module memory mappings perf symbols: Slightly improve module file executable section mappings tools/perf/Documentation/perf.txt | 2 ++ tools/perf/builtin-report.c | 2 ++ tools/perf/builtin-script.c | 3 ++ tools/perf/util/debug.c | 3 ++ tools/perf/util/debug.h | 1 + tools/perf/util/python.c | 1 + tools/perf/util/session.c | 11 ++++++ tools/perf/util/session.h | 2 ++ tools/perf/util/symbol-elf.c | 75 +++++++++++++++++++++++++++++++++++++-- 9 files changed, 98 insertions(+), 2 deletions(-) Regards Adrian
Comments
Hi Adrian, On Tue, Feb 6, 2024 at 5:05 AM Adrian Hunter <adrian.hunter@intel.com> wrote: > > Hi > > Currently perf does not record module section addresses except for > the .text section. In general that means perf cannot get module section > mappings correct (except for .text) when loading symbols from a kernel > module file. (Note using --kcore does not have this issue) > > Here are a couple of patches to help shed light upon and slightly improve > the situation. > > > Changes in V2: > > perf tools: Make it possible to see perf's kernel and module memory mappings > - add dump to perf report (if no browser) as well as perf script > - add 'perf --debug kmaps' option also to dump kmaps > > > Adrian Hunter (2): > perf tools: Make it possible to see perf's kernel and module memory mappings > perf symbols: Slightly improve module file executable section mappings Acked-by: Namhyung Kim <namhyung@kernel.org> Thanks, Namhyung > > tools/perf/Documentation/perf.txt | 2 ++ > tools/perf/builtin-report.c | 2 ++ > tools/perf/builtin-script.c | 3 ++ > tools/perf/util/debug.c | 3 ++ > tools/perf/util/debug.h | 1 + > tools/perf/util/python.c | 1 + > tools/perf/util/session.c | 11 ++++++ > tools/perf/util/session.h | 2 ++ > tools/perf/util/symbol-elf.c | 75 +++++++++++++++++++++++++++++++++++++-- > 9 files changed, 98 insertions(+), 2 deletions(-) > > > Regards > Adrian
On Wed, Feb 7, 2024 at 9:26 PM Namhyung Kim <namhyung@kernel.org> wrote: > > Hi Adrian, > > On Tue, Feb 6, 2024 at 5:05 AM Adrian Hunter <adrian.hunter@intelcom> wrote: > > > > Hi > > > > Currently perf does not record module section addresses except for > > the .text section. In general that means perf cannot get module section > > mappings correct (except for .text) when loading symbols from a kernel > > module file. (Note using --kcore does not have this issue) > > > > Here are a couple of patches to help shed light upon and slightly improve > > the situation. > > > > > > Changes in V2: > > > > perf tools: Make it possible to see perf's kernel and module memory mappings > > - add dump to perf report (if no browser) as well as perf script > > - add 'perf --debug kmaps' option also to dump kmaps > > > > > > Adrian Hunter (2): > > perf tools: Make it possible to see perf's kernel and module memory mappings > > perf symbols: Slightly improve module file executable section mappings > > Acked-by: Namhyung Kim <namhyung@kernel.org> Hmm.. this is not applied cleanly. Can you please rebase onto the current perf-tools-next? Thanks, Namhyung