Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit dc7366c4 authored by Alexander Shishkin's avatar Alexander Shishkin Committed by Yabin Cui
Browse files

UPSTREAM: perf, pt, coresight: Fix address filters for vmas with non-zero offset



Currently, the address range calculation for file-based filters works as
long as the vma that maps the matching part of the object file starts
from offset zero into the file (vm_pgoff==0). Otherwise, the resulting
filter range would be off by vm_pgoff pages. Another related problem is
that in case of a partially matching vma, that is, a vma that matches
part of a filter region, the filter range size wouldn't be adjusted.

Fix the arithmetics around address filter range calculations, taking
into account vma offset, so that the entire calculation is done before
the filter configuration is passed to the PMU drivers instead of having
those drivers do the final bit of arithmetics.

Based on the patch by Adrian Hunter <adrian.hunter.intel.com>.

Reported-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Tested-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Fixes: 375637bc ("perf/core: Introduce address range filtering")
Link: http://lkml.kernel.org/r/20190215115655.63469-3-alexander.shishkin@linux.intel.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>

(Upstream commit c60f83b813e5b25ccd5de7e8c8925c31b3aebcc1).

Bug: 140266694
Change-Id: If1c57d0aa69d89280d2d751acf4f6755cf4ae609
Signed-off-by: default avatarYabin Cui <yabinc@google.com>
parent 21561f0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment