[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180806180423.GC2476@hirez.programming.kicks-ass.net>
Date: Mon, 6 Aug 2018 20:04:23 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Fubo Chen <fubo.chen@...il.com>
Cc: jpoimboe@...hat.com, Ingo Molnar <mingo@...nel.org>,
bhole_prashant_q7@....ntt.co.jp,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf/x86/intel: Fix unwind errors from PEBS entries
(mk-II)
On Mon, Aug 06, 2018 at 09:54:23AM -0700, Fubo Chen wrote:
> On Mon, Aug 6, 2018 at 8:42 AM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > On Mon, Aug 06, 2018 at 08:35:07AM -0700, Fubo Chen wrote:
> > > On Thu, Jul 19, 2018 at 2:21 PM Peter Zijlstra <peterz@...radead.org> wrote:
> > > > --- a/include/uapi/linux/perf_event.h
> > > > +++ b/include/uapi/linux/perf_event.h
> > > > @@ -143,6 +143,8 @@ enum perf_event_sample_format {
> > > > PERF_SAMPLE_PHYS_ADDR = 1U << 19,
> > > >
> > > > PERF_SAMPLE_MAX = 1U << 20, /* non-ABI */
> > > > +
> > > > + __PERF_SAMPLE_CALLCHAIN_EARLY = 1UL << 63,
> > > > };
> > >
> > > The above change makes sparse unhappy :-( Sparse reports the following
> > > complaint about __PERF_SAMPLE_CALLCHAIN_EARLY:
> >
> > I thought I changed that to 1ULL before commit.
>
> The sparse complaint was reported for code with the "1ULL << 63".
Ah ok.. and I think I see what you mean. The C standard says that enums
shall be 'int'. However C++ standard says any integer type that fits the
largest value.
I suppose GCC uses the C++ definition and I suspect many other compilers
will too.
Powered by blists - more mailing lists