linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve MacLean <Steve.MacLean@microsoft.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Changbin Du <changbin.du@intel.com>,
	Eric Saint-Etienne <eric.saint.etienne@oracle.com>,
	John Keeping <john@metanate.com>, Andi Kleen <ak@linux.intel.com>,
	Song Liu <songliubraving@fb.com>,
	Davidlohr Bueso <dave@stgolabs.net>, Leo Yan <leo.yan@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Brian Robbins <brianrob@microsoft.com>,
	Tom McDonald <Thomas.McDonald@microsoft.com>,
	John Salem <josalem@microsoft.com>
Subject: RE: [PATCH] perf map: fix overlapped map handling
Date: Sat, 28 Sep 2019 01:32:18 +0000	[thread overview]
Message-ID: <BN8PR21MB13625A503C82F5135AB1706CF7800@BN8PR21MB1362.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20190927153540.GB20644@kernel.org>

>> 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.

      reply	other threads:[~2019-09-28  1:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 19:20 [PATCH] perf map: fix overlapped map handling Steve MacLean
2019-09-20 19:38 ` Arnaldo Carvalho de Melo
2019-09-20 21:46   ` Steve MacLean
2019-09-27 15:35     ` Arnaldo Carvalho de Melo
2019-09-28  1:32       ` Steve MacLean [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN8PR21MB13625A503C82F5135AB1706CF7800@BN8PR21MB1362.namprd21.prod.outlook.com \
    --to=steve.maclean@microsoft.com \
    --cc=Thomas.McDonald@microsoft.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=brianrob@microsoft.com \
    --cc=changbin.du@intel.com \
    --cc=dave@stgolabs.net \
    --cc=eric.saint.etienne@oracle.com \
    --cc=john@metanate.com \
    --cc=jolsa@redhat.com \
    --cc=josalem@microsoft.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).