From: Peter Zijlstra Date: Fri, 26 Feb 2010 09:33:41 +0000 (+0100) Subject: perf_events: Report the MMAP pgoff value in bytes X-Git-Tag: v2.6.34-rc1~262^2~9 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=3a0304e90aa5a2c0c308a05d28f7d109a48d8539;p=linux-2.6-block.git perf_events: Report the MMAP pgoff value in bytes DaveM reported that currently perf interprets the pgoff value reported by the MMAP events as a byte range, but the kernel reports it as a page offset. Since its broken (and unusable) anyway, change the kernel behaviour (ABI) to report bytes indeed, avoiding the need for userspace to deal with PAGE_SIZE things. Reported-by: David Miller Signed-off-by: Peter Zijlstra LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 087025fe3ba1..5a69abb05ac3 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -3749,7 +3749,7 @@ void __perf_event_mmap(struct vm_area_struct *vma) /* .tid */ .start = vma->vm_start, .len = vma->vm_end - vma->vm_start, - .pgoff = vma->vm_pgoff, + .pgoff = (u64)vma->vm_pgoff << PAGE_SHIFT, }, };