Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753332AbbBYTnu (ORCPT ); Wed, 25 Feb 2015 14:43:50 -0500 Received: from mail.kernel.org ([198.145.29.136]:38487 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752907AbbBYTns (ORCPT ); Wed, 25 Feb 2015 14:43:48 -0500 Date: Wed, 25 Feb 2015 16:43:44 -0300 From: Arnaldo Carvalho de Melo To: David Ahern Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf: Fix sigbus with perf-top Message-ID: <20150225194344.GJ18705@kernel.org> References: <1424304198-92028-1-git-send-email-david.ahern@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424304198-92028-1-git-send-email-david.ahern@oracle.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1580 Lines: 47 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 > 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 > --- > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/