[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] gcov: add new interface and 3.4 and 4.7 format support
On Thu, Oct 13, 2016 at 03:15:09AM -0600, Jan Beulich wrote: > >>> On 13.10.16 at 10:49, <wei.liu2@xxxxxxxxxx> wrote: > > On Thu, Oct 13, 2016 at 02:29:08AM -0600, Jan Beulich wrote: > > [...] > >> >> >> ... this structure's trailing fields actually getting used by the > >> >> >> code > >> >> >> won't work well when changing compiler versions without cleaning > >> >> >> the tree. I think instead you need thin gcc_5.c and gcc_4_9.c > >> >> >> #define-ing their GCOV_COUNTERS and then #include-ing this > >> >> >> shared source file. Plus btw, I don't think gcc 5.0.x (the > >> >> >> development variant of 5.x) would use anything different from > >> >> >> 5.1.x or 5.2.x; in fact use of __GNUC_MINOR__ should not > >> >> >> normally be necessary anymore with gcc 5+. > >> >> >> > >> >> > > >> >> > I think you misread here: __GNUC_MINOR__ is the "x" part of 5.x.y, the > >> >> > "y" part is __GNUC_PATCHLEVEL__. > >> >> > >> >> No, I didn't. From 5.x onwards the information previously carried in > >> >> __GNUC_PATCHLEVEL__ is now in __GNUC_MINOR__. And as much > >> >> as previously you would not normally need to look at the former, > >> >> with newer gcc you shouldn't need to look at the latter. > >> >> > >> > > >> > I can't find relevant information in GCC cpp manual. > >> > > >> > Specifically, I look at 4.9.4 and 5.4.0 doc: > >> > > >> > > > https://gcc.gnu.org/onlinedocs/gcc-4.9.4/cpp/Common-Predefined-Macros.html#Comm > > > > > >> > on-Predefined-Macros > >> > > > https://gcc.gnu.org/onlinedocs/gcc-5.4.0/cpp/Common-Predefined-Macros.html#Comm > > > > > >> > on-Predefined-Macros > >> > > >> > The sections about __GNUC_* macros are identical, their semantics stay > >> > the same. > >> > > >> > What did I miss? > >> > >> Their change in how version numbers get used. I'm sure you've noticed > >> there never was a released 5.0.0 or 6.0.0, and that the stable updates > >> following 5.1.0 were 5.2.0, 5.3.0, etc. > >> > > > > OK. I found the bits at https://gcc.gnu.org/develop.html. I see what you > > meant previously. > > > > It doesn't seem to be a problem to me to compare to 5.1 though -- that's > > the first release of gcc 5, which should be what people use anyway. > > But your check should cover the introduction point of the feature, > which is 5.0.0 imo. > > > If it is the complexity of the macro that concerns you, now it has been > > changed to use GCC_VERSION macro in gcov.h, which is a lot simpler to > > reason about. Are you happy with such arrangement? > > If you mean this to be an adjustment newer than v3, then I think > I'd be fine with that, provided you cover the full range (as indicated > above), i.e. starting at 5.0.0. > OK. The check is now like: #if GCC_VERSION < 50000 #error "Wrong version of GCC used to compile gcov" #endif GCC_VERSION is a convenient marco that you can find in this patch. Then all reference to gcc 5.1 will be changed to gcc 5. Wei. > Jan > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |