Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp461097rdb; Thu, 8 Feb 2024 10:39:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUFdDC2nOr6l7Ng4ywkEw5HeY+Xq2PRf4lSVT55lnc+OSO/vXZH0j1CxzW34bIPQR+DHJMfXYBCi81fJo22NqRtKCfSqAGqm0DUAMG18A== X-Google-Smtp-Source: AGHT+IFbuqPRW4Jy5j1lGGUGEMnkqy8MJx4at/VY7B0QzOrbay23ZLQNLx+6HNRt+n9lhALlDlFs X-Received: by 2002:a05:6a20:7488:b0:19e:9c34:f369 with SMTP id p8-20020a056a20748800b0019e9c34f369mr579305pzd.16.1707417581053; Thu, 08 Feb 2024 10:39:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707417581; cv=pass; d=google.com; s=arc-20160816; b=l14DQkPYv7HISIZp0JZMgRie8voynVQnCB7Kh+IpZDKQrFTBcPJHGTlvW/7qmH9Q// MhmvkmfHwcDQkjG+k64F9wCUvcLBeskQpBF+zbi8NLiCiZpKdO/8AiKLHfUMXwLg+BCq A9+4AKgapKwhOEfpW0Zcibc9oBjzrFkCXDzFNA2YTW+QDxdiywjJH7+BA29fNuEhWsez VuZDla3XPwfApInPhaYvyDIHfPu8R1AkZdecgW39+m7Hef5ZBhbtpkpiplrou2fFCdrS g8HJil4BDX3FCA13/CIim66Hexc/Dm/clrAg+uL8a2zKL1Vh2QUQJBeJpTp/6ifruojh xYOg== 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:dkim-signature; bh=CFVFZUSRc32IwvlGkcCJ1XDfFZApViMMmwX9aVaUPwk=; fh=S4YD6FFQV6zwKyZSFgGeBIo96QGYCaqHaacu5dB6e+4=; b=qynMF4O4kWUQjz6plURx176h83LpFs9Hhp1599Iu0wh5F7wIatKYMKmawpVDbaeBUw r22HZ+CQ0wiPI1K04Hicg/x4+w1gR33FASlJ+u59Ok/Kfb8CH+vcFCUN6khBCuDqUOwo KPJKQg4m2AyHlcbgXY8mq0sPUg0a+bGi5B7cc6igk0RHt1VqB//FVXnTZORbbaU7fchl js+mx7/ZE1s0dIxUr6TW9KLrN7dkg09JsCcShhVUK7QO2OEpTrxUE5VDtmwXNTDVD3/y sminFbNuR4UUDwDs9sX0yK4AeCn0BPiH/IqXWCDfJKu8BprkRXTWk8Ove6Jy3GsREhxC Wl0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tzYbapY4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-58516-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUQsua6hPHGc2FrvlIs5MKkPcULs82nZ9audkZ7J2dw7WlWZHNSYnWbKibMK3c2njeDPZGRcvrHBlMw4yO0dbufCE83d2A6vcw16EhnnA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id n2-20020a170902d2c200b001d9b281c1a6si141671plc.311.2024.02.08.10.39.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 10:39:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58516-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tzYbapY4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-58516-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58516-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 424B1B29D08 for ; Thu, 8 Feb 2024 18:10:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D506784FAD; Thu, 8 Feb 2024 18:10:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tzYbapY4" 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 0978E82874; Thu, 8 Feb 2024 18:10:27 +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=1707415828; cv=none; b=uIAGhnSTx/qMNGD8q2TKanq/fWwyst2m+D8H3eFsTB7s/FzD4TVUnpOWeIeYYZIncKdDUeZ5iiTv+FlP7JtucxpZP+YzzWNl2hZvtr9N04DXQA78BzkfZmY8IB/Mzif6qZPuFUrweQYF+haE1Y1KW3c2tADuGS5mTwUmydQo06c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707415828; c=relaxed/simple; bh=eQyIxKVP5DgJx/KOhgg4TQvfeRw6XlPrn08qg5cmN/E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XGeOyzfRN0OsLUJkqcDyWNuIpZJyv4GQUohJUB2KrnXt61Cm8gP26zhGHbpv0gYkeq0EJV9uJrEmEVJGOyfBYIO+n+s7e8clvqDKIsDCOMDoqA0STwLl5gtN9f87YNz5y89lROLMepcV47es4KOYMO3z4xR1y1Qy9zLI8CXqLjs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tzYbapY4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30CD0C433C7; Thu, 8 Feb 2024 18:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707415827; bh=eQyIxKVP5DgJx/KOhgg4TQvfeRw6XlPrn08qg5cmN/E=; h=From:To:Cc:Subject:Date:From; b=tzYbapY4lgYyq276P4mqyg/VNN1w6rbElCtcA7rX6GpTnepoSY5QwH9o4Hoc9dgj/ QRr4u+4Tc8x9CvPn5yWfhr5Nf7qsyMcUNHXs/JroNiglLzLT7T7kVhAn6JWrlkUezh 0+C9NYtEobgL/BTB0NuDHVF/ebVvTyQyA25xPqvSM00IvdJqvOHBB6LwsOsGyrrnxN j5N+WLT5ojxCdw9LHFOvuwuVeaNxLh8j+jAjPK28pWjXF+CttoXb1A/OyL0ZpPkwwA Cp9Os+2/QNIZx45P7LvavxwkImg3UXZR8ZV0JSC3dtPFNowTAhLSRebMGqCl4XTu35 5w4O1rUda/aEg== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCH] perf tools: Remove misleading comments on map functions Date: Thu, 8 Feb 2024 10:10:25 -0800 Message-ID: <20240208181025.1329645-1-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When it converts sample IP to or from objdump-capable one, there's a comment saying that kernel modules have DSO_SPACE__USER. But commit 02213cec64bb ("perf maps: Mark module DSOs with kernel type") changed it and makes the comment confusing. Let's get rid of it. Signed-off-by: Namhyung Kim --- tools/perf/util/map.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index cf5a15db3a1f..14a5ea70d81e 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -553,10 +553,6 @@ u64 map__rip_2objdump(struct map *map, u64 rip) if (dso->rel) return rip - map__pgoff(map); - /* - * kernel modules also have DSO_TYPE_USER in dso->kernel, - * but all kernel modules are ET_REL, so won't get here. - */ if (dso->kernel == DSO_SPACE__USER) return rip + dso->text_offset; @@ -585,10 +581,6 @@ u64 map__objdump_2mem(struct map *map, u64 ip) if (dso->rel) return map__unmap_ip(map, ip + map__pgoff(map)); - /* - * kernel modules also have DSO_TYPE_USER in dso->kernel, - * but all kernel modules are ET_REL, so won't get here. - */ if (dso->kernel == DSO_SPACE__USER) return map__unmap_ip(map, ip - dso->text_offset); -- 2.43.0.687.g38aa6559b0-goog