[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BN8PR21MB13625A503C82F5135AB1706CF7800@BN8PR21MB1362.namprd21.prod.outlook.com>
Date: Sat, 28 Sep 2019 01:32:18 +0000
From: Steve MacLean <Steve.MacLean@...rosoft.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
CC: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Changbin Du <changbin.du@...el.com>,
Eric Saint-Etienne <eric.saint.etienne@...cle.com>,
John Keeping <john@...anate.com>,
Andi Kleen <ak@...ux.intel.com>,
Song Liu <songliubraving@...com>,
Davidlohr Bueso <dave@...olabs.net>,
Leo Yan <leo.yan@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Brian Robbins <brianrob@...rosoft.com>,
Tom McDonald <Thomas.McDonald@...rosoft.com>,
John Salem <josalem@...rosoft.com>
Subject: RE: [PATCH] perf map: fix overlapped map handling
>> An earlier version of this patch used:
>> after->start = map->end;
>> + after->pgoff += map->end - pos->start;
>>
>> Instead of the newer Functionally equivalent:
>> after->start = map->end;
>> + after->pgoff = pos->map_ip(pos, map->end);
>>
>> I preferred the latter form as it made more sense with the assertion that the mapping of map->end should match in pos and after.
>
> So, if they are equivalent then I think its better to use code that ressembles the kernel as much as possible, so that when in doubt we can compare the tools/perf calcs with how the kernel does it, filtering out things like the PAGE_SHIFT, can we go that way?
>
> Also do you have some reproducer, if you have one then we can try and have this as a 'perf test' entry, bolting some more checks into tools/perf/tests/perf-record.c or using it as a start for a test that stresses this code.
>
> This is not a prerequisite for having your fix on, but would help checking that perf doesn't regresses in this area.
>
> - Arnaldo
I have updated the patch to use the earlier version, which more closely matches the kernel.
I have updated the commit message to include the repro info.
I am including a few other patches I have generated while adding support for perf jitdump to coreclr.
Powered by blists - more mailing lists