]> git.baikalelectronics.ru Git - kernel.git/commit
perf top: Fix SIGBUS on sparc64
authorDavid Ahern <david.ahern@oracle.com>
Thu, 19 Feb 2015 00:03:18 +0000 (19:03 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 25 Feb 2015 20:37:44 +0000 (17:37 -0300)
commitd5e186c650aeca07405badb7bb4b3b921992ec1f
treeeb7880b3e0905850f4ae4db208c8f3f12d0b043d
parent47913027a92790b59d4d000374dd9981b129a727
perf top: Fix SIGBUS on sparc64

perf-top is terminating due to SIGBUS on sparc64. git bisect points to:

    commit 75377674037029c34d8fbdd37d0b83bc70233aa3
    Author: Arnaldo Carvalho de Melo <acme@redhat.com>
    Date:   Mon Sep 8 13:26:35 2014 -0300

        perf evlist: Refcount mmaps

        We need to know how many fds are using a perf mmap via
        PERF_EVENT_IOC_SET_OUTPUT, so that we can know when to ditch an mmap,
        refcount it.

This commit added 'int refcnt' to struct perf_mmap and the addition makes the
event_copy element no longer 8-byte aligned.

Fix by adding __attribute__((aligned(8))) to the event_copy struct
member.

Signed-off-by: David Ahern <david.ahern@oracle.com>
Link: http://lkml.kernel.org/r/1424304198-92028-1-git-send-email-david.ahern@oracle.com
[ Switched from 'int pad;' to using __attribute__, David tested/acked that ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evlist.h