Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp5936057ybn; Sun, 29 Sep 2019 08:48:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYTkFijRSuyQ2sv/oPu49dyDstvuOclr8sxYnyZneteXaWldX4sk3yDnw7kr/T7pbQ6EKb X-Received: by 2002:a50:8b61:: with SMTP id l88mr15384700edl.244.1569772110803; Sun, 29 Sep 2019 08:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569772110; cv=none; d=google.com; s=arc-20160816; b=wCD+DFHXRJ0uSezObcoqTCCBzxalx8Fsid+KlD8new8MSOfJZf6WDtEJEFGdoFKzzh ahp5cjSO8rLAzNmrM8sqPN24Xpnp/2Dfx2KMpVYuYNVH+6bW/bivglDF8uukk7e+VdeD k+JACF/1kEXaE43sGdDUo5aGbOn9DiYQwJTs1qkf3ykThhR499CAP+Ma37Q8YF97Y057 1YwjcgMmfznnsVK0POmmNRCu04rNYUBBHz3E/q2Q1fGDgcGpEagss3pFHIr/bfZplyQB O4WF9nU+UaOGmh6Zv3oP+jEoz44XGFGci/QpTZou5CYbFJ7jLeW5WeFJ0hVPNnDeya/m vizQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VNMIop0GohKY8c5v7iPe9cngJv1KbmWdTqud5klmanQ=; b=YkOwbseK16SQDySybc1CZJX05L0s1yn7ep1NeTo/R5ZzFSoegFj0TZMO1f5tQiuDRQ D3JMA3qDAhqnl2Em6dpeBEI7F9PpKxPOwK/HQxp4BLfGkJq8ZTOxBdiVeN5ae1c9XDk+ Qp4GeAEUn1nLVoFxmMdanJkX4mpiB2GQ3WQuWvqWDWHA+LKkpu43ByD0t9hILugcObgs B3F6ckWaR3or3arpzcfc/1bdhboaByhSgruxqJeZoo+d/XlVKJe35ZtXdijqG9atwbfb sxuh1YLs8AQEJAwSFpSpsZMspBUUoPimr/mZpChoGb8MglWnnlMq6OPLaDNFXj2flvgF UEWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si5191758edx.302.2019.09.29.08.47.53; Sun, 29 Sep 2019 08:48:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728576AbfI2Po3 (ORCPT + 99 others); Sun, 29 Sep 2019 11:44:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42084 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfI2Po3 (ORCPT ); Sun, 29 Sep 2019 11:44:29 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CB7E10DCC8A; Sun, 29 Sep 2019 15:44:28 +0000 (UTC) Received: from krava (ovpn-204-45.brq.redhat.com [10.40.204.45]) by smtp.corp.redhat.com (Postfix) with SMTP id 970685D9C3; Sun, 29 Sep 2019 15:44:22 +0000 (UTC) Date: Sun, 29 Sep 2019 17:44:21 +0200 From: Jiri Olsa To: Steve MacLean Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , Eric Saint-Etienne , John Keeping , Andi Kleen , Song Liu , Davidlohr Bueso , Leo Yan , "linux-kernel@vger.kernel.org" , Brian Robbins , Tom McDonald , John Salem , Stephane Eranian Subject: Re: [PATCH 1/4] perf map: fix overlapped map handling Message-ID: <20190929154421.GA602@krava> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Sun, 29 Sep 2019 15:44:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 28, 2019 at 01:39:00AM +0000, Steve MacLean wrote: SNIP > Before: > > perf script --show-mmap-events 2>&1 | grep -e MMAP -e unknown |\ > grep libcoreclr.so | head -n 4 > dotnet 1907 373352.698780: PERF_RECORD_MMAP2 1907/1907: \ > [0x7fe615726000(0x768000) @ 0 08:02 5510620 765057155]: \ > r-xp .../3.0.0-preview9-19423-09/libcoreclr.so > dotnet 1907 373352.701091: PERF_RECORD_MMAP2 1907/1907: \ > [0x7fe615974000(0x1000) @ 0x24e000 08:02 5510620 765057155]: \ > rwxp .../3.0.0-preview9-19423-09/libcoreclr.so > dotnet 1907 373352.701241: PERF_RECORD_MMAP2 1907/1907: \ > [0x7fe615c42000(0x1000) @ 0x51c000 08:02 5510620 765057155]: \ > rwxp .../3.0.0-preview9-19423-09/libcoreclr.so > dotnet 1907 373352.705249: 250000 cpu-clock: \ > 7fe6159a1f99 [unknown] \ > (.../3.0.0-preview9-19423-09/libcoreclr.so) > > After: > > perf script --show-mmap-events 2>&1 | grep -e MMAP -e unknown |\ > grep libcoreclr.so | head -n 4 > dotnet 1907 373352.698780: PERF_RECORD_MMAP2 1907/1907: \ > [0x7fe615726000(0x768000) @ 0 08:02 5510620 765057155]: \ > r-xp .../3.0.0-preview9-19423-09/libcoreclr.so > dotnet 1907 373352.701091: PERF_RECORD_MMAP2 1907/1907: \ > [0x7fe615974000(0x1000) @ 0x24e000 08:02 5510620 765057155]: \ > rwxp .../3.0.0-preview9-19423-09/libcoreclr.so > dotnet 1907 373352.701241: PERF_RECORD_MMAP2 1907/1907: \ > [0x7fe615c42000(0x1000) @ 0x51c000 08:02 5510620 765057155]: \ > rwxp .../3.0.0-preview9-19423-09/libcoreclr.so > > All the [unknown] symbols were resolved. > > Tested-by: Brian Robbins > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Arnaldo Carvalho de Melo > Cc: Mark Rutland > Cc: Alexander Shishkin > Cc: Jiri Olsa > Cc: Namhyung Kim > Cc: Stephane Eranian > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Steve MacLean Acked-by: Jiri Olsa thanks, jirka > --- > tools/perf/util/map.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c > index 5b83ed1..eec9b28 100644 > --- a/tools/perf/util/map.c > +++ b/tools/perf/util/map.c > @@ -1,5 +1,6 @@ > // SPDX-License-Identifier: GPL-2.0 > #include "symbol.h" > +#include > #include > #include > #include > @@ -850,6 +851,8 @@ static int maps__fixup_overlappings(struct maps *maps, struct map *map, FILE *fp > } > > after->start = map->end; > + after->pgoff += map->end - pos->start; > + assert(pos->map_ip(pos, map->end) == after->map_ip(after, map->end)); > __map_groups__insert(pos->groups, after); > if (verbose >= 2 && !use_browser) > map__fprintf(after, fp); > -- > 2.7.4