• Dave Martin's avatar
    perf events: Fix mmap offset determination · b5a63254
    Dave Martin authored
    Fix buggy-looking code which unnecessarily adjusts the file offset
    fields read from /proc/*/maps.
    
    This may have gone unnoticed since the offset is usually 0 (and the
    logic in util/symbol.c may work incorrectly for other offset values).
    
    Commiter note:
    
    This fixes a bug introduced in 4af8b35d, there is no need to shift pgoff
    twice, the show_map_vma routine in fs/proc/task_mmu.c already converts
    it from the number of pages to the size in bytes, and that is what
    appears in /proc/PID/map.
    
    Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
    Cc: Will Deacon <Will.Deacon@arm.com>
    LKML-Reference: <1280836116-6654-2-git-send-email-dave.martin@linaro.org>
    Signed-off-by: default avatarDave Martin <dave.martin@linaro.org>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    b5a63254
event.c 20.1 KB