lkml.org 
[lkml]   [2009]   [May]   [27]   [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
    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.

    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

    Paul.


    \
     
     \ /
      Last update: 2009-05-28 05:59    [W:0.041 / U:1.392 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site