* [PATCH] perf: Fix sigbus with perf-top
@ 2015-02-19 0:03 David Ahern
2015-02-25 19:43 ` Arnaldo Carvalho de Melo
2015-03-01 16:50 ` [tip:perf/urgent] perf top: Fix SIGBUS on sparc64 tip-bot for David Ahern
0 siblings, 2 replies; 3+ messages in thread
From: David Ahern @ 2015-02-19 0:03 UTC (permalink / raw)
To: acme, linux-kernel; +Cc: David Ahern
perf-top is terminating due to SIGBUS on sparc64. git bisect points to:
commit 82396986032915c1572bfb74b224fcc2e4e8ba7c
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 a pad.
Signed-off-by: David Ahern <david.ahern@oracle.com>
---
tools/perf/util/evlist.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index c94a9e03ecf1..7a5a77b2b907 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -28,6 +28,7 @@ struct perf_mmap {
int mask;
int refcnt;
unsigned int prev;
+ int pad;
char event_copy[PERF_SAMPLE_MAX_SIZE];
};
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] perf: Fix sigbus with perf-top
2015-02-19 0:03 [PATCH] perf: Fix sigbus with perf-top David Ahern
@ 2015-02-25 19:43 ` Arnaldo Carvalho de Melo
2015-03-01 16:50 ` [tip:perf/urgent] perf top: Fix SIGBUS on sparc64 tip-bot for David Ahern
1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-02-25 19:43 UTC (permalink / raw)
To: David Ahern; +Cc: linux-kernel
Em Wed, Feb 18, 2015 at 07:03:18PM -0500, David Ahern escreveu:
> perf-top is terminating due to SIGBUS on sparc64. git bisect points to:
>
> commit 82396986032915c1572bfb74b224fcc2e4e8ba7c
> 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 a pad.
I am applying this, but please consider doing like the kernel and using
one of those __aligned_on_foo struct member attributes.
I am adding a comment right after that pad...
- Arnaldo
> Signed-off-by: David Ahern <david.ahern@oracle.com>
> ---
> tools/perf/util/evlist.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
> index c94a9e03ecf1..7a5a77b2b907 100644
> --- a/tools/perf/util/evlist.h
> +++ b/tools/perf/util/evlist.h
> @@ -28,6 +28,7 @@ struct perf_mmap {
> int mask;
> int refcnt;
> unsigned int prev;
> + int pad;
> char event_copy[PERF_SAMPLE_MAX_SIZE];
> };
>
> --
> 1.9.3
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip:perf/urgent] perf top: Fix SIGBUS on sparc64
2015-02-19 0:03 [PATCH] perf: Fix sigbus with perf-top David Ahern
2015-02-25 19:43 ` Arnaldo Carvalho de Melo
@ 2015-03-01 16:50 ` tip-bot for David Ahern
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for David Ahern @ 2015-03-01 16:50 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, david.ahern, acme, mingo, hpa, tglx
Commit-ID: a73b6c199a663d64a38198f547d5c5be42163193
Gitweb: http://git.kernel.org/tip/a73b6c199a663d64a38198f547d5c5be42163193
Author: David Ahern <david.ahern@oracle.com>
AuthorDate: Wed, 18 Feb 2015 19:03:18 -0500
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 25 Feb 2015 17:37:44 -0300
perf top: Fix SIGBUS on sparc64
perf-top is terminating due to SIGBUS on sparc64. git bisect points to:
commit 82396986032915c1572bfb74b224fcc2e4e8ba7c
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index c94a9e0..e99a676 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -28,7 +28,7 @@ struct perf_mmap {
int mask;
int refcnt;
unsigned int prev;
- char event_copy[PERF_SAMPLE_MAX_SIZE];
+ char event_copy[PERF_SAMPLE_MAX_SIZE] __attribute__((aligned(8)));
};
struct perf_evlist {
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-01 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 0:03 [PATCH] perf: Fix sigbus with perf-top David Ahern
2015-02-25 19:43 ` Arnaldo Carvalho de Melo
2015-03-01 16:50 ` [tip:perf/urgent] perf top: Fix SIGBUS on sparc64 tip-bot for David Ahern
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.