Date: Mon, 20 Apr 2015 09:36:19 -0700 From: Justin Hibbits <jhibbits@freebsd.org> To: Bruce Evans <brde@optusnet.com.au> Cc: John Baldwin <jhb@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r281721 - head/sys/sys Message-ID: <CAHSQbTAFHsOp%2BK=SfAfvHPQ2D1%2BRBu5WTkH88GdoG9wtdppVcg@mail.gmail.com> In-Reply-To: <20150421020808.D10623@besplex.bde.org> References: <201504190033.t3J0XMDX041769@svn.freebsd.org> <476583045.Qcb6O2DFtY@ralph.baldwin.cx> <20150421020808.D10623@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 20, 2015 at 9:19 AM, Bruce Evans <brde@optusnet.com.au> wrote: > On Mon, 20 Apr 2015, John Baldwin wrote: > >> On Sunday, April 19, 2015 12:33:22 AM Justin Hibbits wrote: >>> >>> Log: >>> Fix the build. Commit the last part of e500 PMC. >>> ... >>> @@ -136,6 +138,7 @@ enum pmc_cputype { >>> __PMC_CLASS(MIPS74K) /* MIPS 74K */ \ >>> __PMC_CLASS(PPC7450) /* Motorola MPC7450 class */ \ >>> __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ >>> + __PMC_CLASS(E500) /* Freescale e500 class */ \ >>> __PMC_CLASS(SOFT) /* Software events */ >> >> >> Note that each time a PMC_CLASS is added, the ABI for pmccontrol -L >> breaks since the enum value of the "SOFT" class changes. We should >> perhaps fix the value of SOFT to make this less painful (just as we >> fix the values for PMC_CPU so that those don't change). > > > Enums should never be used in ABIs, since their size can be anything > large enough. > > They also cause namespace problems. The whole enum declaration must > be exposed in any header that uses an enum type. > > Bruce Any change breaks ABI for any architecture listed after anyway (Adrian's MIPS74K broke all PowerPC). Could we not take the same IDs as in pmc_events.h to generate the PM_CLASS IDs? - Justin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHSQbTAFHsOp%2BK=SfAfvHPQ2D1%2BRBu5WTkH88GdoG9wtdppVcg>