lkml.org 
[lkml]   [2009]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:perfcounters/core] perf_counter tools: Introduce stricter C code checking

* Paul Mackerras <paulus@samba.org> wrote:

> tip-bot for Ingo Molnar writes:
>
> > perf_counter tools: Introduce stricter C code checking
> >
> > Tighten up our C code requirements:
> >
> > - disallow warnings
>
> This causes failures when I compile it as a 64-bit executable on
> powerpc:
>
> CC builtin-record.o
> builtin-record.c: In function 'pid_synthesize_mmap_events':
> builtin-record.c:241: warning: format '%llx' expects type 'long long unsigned int *', but argument 3 has type '__u64 *'
> builtin-record.c:241: warning: format '%llx' expects type 'long long unsigned int *', but argument 4 has type '__u64 *'
> builtin-record.c:241: warning: format '%llx' expects type 'long long unsigned int *', but argument 9 has type '__u64 *'
>
> This is because u64 is an unsigned long in userspace for a 64-bit
> build, not unsigned long long. I'm not sure how best to solve
> this problem.

We could perhaps use __u64 consistently? (can we?)

> If I compile it as a 32-bit executable, it doesn't generate warnings,
> but when I try to run "perf top" (this is on a 64-bit kernel, of
> course, since 32-bit powerpc kernels don't currently support
> perf_counters), I get:
>
> # perf top
> left: 0000000000000000
> ip: 00000000000891a4
> right: 00000000ffffffff
> KernelTop refresh period: 2 seconds
> perf: builtin-top.c:453: record_ip: Assertion `left <= ip && ip <= right' failed.
> Aborted

mind trying a 'git bisect run' session - which commit broke things
for you? Or is this related to the type problems?

Ingo


\
 
 \ /
  Last update: 2009-05-28 10:39    [W:0.048 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site