lkml.org 
[lkml]   [2018]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/12] perf script: Add support to display lost events
Em Sun, Jan 07, 2018 at 05:03:53PM +0100, Jiri Olsa escreveu:
> +++ b/tools/perf/util/event.c
> +static size_t perf_event__fprintf_lost(union perf_event *event, FILE *fp)
> +{
> + return fprintf(fp, " lost %lu\n", event->lost.lost);
> +}

Had to make this:

return fprintf(fp, " lost %" PRIu64 "\n", event->lost.lost);

To fix this:

CC /tmp/build/perf/util/event.o
util/event.c: In function 'perf_event__fprintf_lost':
util/event.c:1440:21: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'u64 {aka long long unsigned int}' [-Werror=format=]
return fprintf(fp, " lost %lu\n", event->lost.lost);
^
CC /tmp/build/perf/builtin-script.o
CC /tmp/build/perf/builtin-kmem.o
cc1: all warnings being treated as errors

on these systems:

17 debian:experimental-x-mips : FAIL mips-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
19 debian:experimental-x-mipsel: FAIL mipsel-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
25 fedora:24-x-ARC-uClibc : FAIL arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
43 ubuntu:16.04-x-arm : FAIL arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
45 ubuntu:16.04-x-powerpc : FAIL powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

- Arnaldo

\
 
 \ /
  Last update: 2018-01-14 23:21    [W:0.207 / U:1.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site