lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] perf map: fix overlapped map handling
Date
>> 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.

\
 
 \ /
  Last update: 2019-09-28 03:32    [W:0.054 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site