Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp492736rdb; Thu, 8 Feb 2024 11:40:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWHWbXsX1aQEap9MxtIsrMfjTlNY7UGMaByc/3eWZAaKRUOE4VAoDK3Wh0a4RZbrvyofzWToT1N6PFH06+n989KvvF9ZnxLHg+HyR3/Vw== X-Google-Smtp-Source: AGHT+IFZiVbT9WOAOq1RXa3WlWdohz2jJrkbmw6KNr1MZq98DavIw9vdvAcvMtcdc5+ezDBnvcN7 X-Received: by 2002:a05:6358:5915:b0:179:24b4:4203 with SMTP id g21-20020a056358591500b0017924b44203mr222505rwf.0.1707421212311; Thu, 08 Feb 2024 11:40:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707421212; cv=pass; d=google.com; s=arc-20160816; b=LnZ3o1MuxeB44V1RSR3QPfI++8sdkORaIWAgSTtfWGhU1jw8JtRm/GR5YZJcv5QQeh XktmGtvzrQ/+++WOEpC5x5QKYrsEVaCp/Afw7Jkku7WWSMur8bzvg+sCo+OB77Kdz520 B6IwQHtAPJPrVBpphjn4HR4gQWKdRAPTeYFrl4+CSwt26xwyDRzfcvuw1RlvVXg0JmOJ Lagx0Fff4SCalXDPuZaYYJwb9BZfxzxfiDynBoOVYuHvaiGTJGwr9xLjsE/dHzgiIuc3 eSirBc1NpK96vKicucT4j58tKB/vwFbrRFrR3LTxelJr1mggv6wiMYzQiFzPfrWeStLp hfTQ== 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=mrxOhQ/ARY8SrJo55CV9XW0H/rdCG59KRg9NZgRGlBc=; fh=BFXhBYBtvu8R76vA6YvCaGzWbkPJ3B64tZUoNJPgA08=; b=umQwSRiCeyPP/JFtxGAtUIyUxAJRPx5J0FsuQzHlzKXDMiaGiPj++A4iI4XZfnETjB IqIJZx1e2WBG7M57KA+ttjpfu1hB9siSgz61BHCBz4bSce6WjxDmGTog1rWhRixRN39M C+oEhMgOwwfW6sXl4+Xe6Xqf5d0YfzfTOe85NRb4OgDtYQn7Ds7Z7bIMYzfbqRiZQAMN 0f+oKlMYyTXLlRIkO8Ro/0kgpDN5juDiDyX9ucknQ7oQvvrzErFsdpMHhdpCAld7Opm6 FZFBE5gJ7sMi3nPEPDsOZApOED+xd76/+iskzD2cSlgRXVqYnjHseZsXsN1RJUNM1c28 vkdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FdmB5ITf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-58622-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58622-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; AJvYcCVDj7NPJogQv8F734RQqNq+sEpWXCL8//XXgoMlyuqZWMGmjx4k3VDVT3xG/5eKtM3fs3YmNmmbtp/m+aBVos9MeaT/OPMsxwPjL0Ov3Q== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o25-20020a637e59000000b005d81875c4cfsi297024pgn.882.2024.02.08.11.40.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 11:40:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58622-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FdmB5ITf; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-58622-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58622-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 3B0F228A108 for ; Thu, 8 Feb 2024 19:30:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16D3F37711; Thu, 8 Feb 2024 19:30:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FdmB5ITf" 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 3AD72149DFF; Thu, 8 Feb 2024 19:30:01 +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=1707420602; cv=none; b=SWUK+vyapKypuqJkrziJlaH843mW/II1Mybm5PTNB0m7BL5prFPH88PuAkJ9hg2lRyDP55hyImgHXMCVTe6laxkLoFEK1bVmffUqQ032yoW8wFfNbYZG7xMlAb8fas0J/RSZXYlorGdYzwQkdFGjxMEnqFDBosa6CZZZYfPAEdA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707420602; c=relaxed/simple; bh=qDuY1sZc8FECI71ZxaRlmE/Z2fjxukMPw+3Pk8ldjF4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FB8mwUE/zzKAtU3zqvIUW2pi+ZPP8KrJhNKjFBugmwWJd823sJDCSIIv7MsluKOy105YozxtrjF4aMYFLS+hEBgb4H6rDsn0H6LFkkIYZ+578/w8fMOcyUVfZPh50PCzAhJD4p/8tGyK1AtP6W2IcDP8ZzfqQ7eA4MhCI0AQgAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FdmB5ITf; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3423AC433F1; Thu, 8 Feb 2024 19:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707420601; bh=qDuY1sZc8FECI71ZxaRlmE/Z2fjxukMPw+3Pk8ldjF4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FdmB5ITfUKL9YuHuneEFiXbDqF0ncKkuZfoKEbe04ZmtOnPA7+lYwJrmNdvY6hkTM sd000YRvl2/3zRa9WGWwvydHvLIys+xVCMMj0EmP62rs6ami50HJqsoFGA79p59qBl c+jFuMswzmbP3FllHL7EH4oFvO6Us+0Qo3nxzNWs2B5kM2VLIHJcE/3d/MHsrpy72K tefzh6hZ7oLAZN+O8bbI165GFDQ7jQg9+DjH6k6FQvcOk8eYi8ltv0RbTtFq00gtlS 7t/vNbNRG0SrXuHTdE7HO1SwOKDnijpCYJENruXbcARfrkCT0qp/ZaLeLNxg1RCMOt QnwxW02HcAF+A== Date: Thu, 8 Feb 2024 16:29:58 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: Re: [PATCH] perf tools: Remove misleading comments on map functions Message-ID: References: <20240208181025.1329645-1-namhyung@kernel.org> 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: <20240208181025.1329645-1-namhyung@kernel.org> On Thu, Feb 08, 2024 at 10:10:25AM -0800, Namhyung Kim wrote: > 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. Acked-by: Arnaldo Carvalho de Melo - Arnaldo > 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