linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org,
	namhyung@kernel.org, eranian@google.com, ak@linux.intel.com,
	mark.rutland@arm.com, will@kernel.org, mpe@ellerman.id.au
Subject: Re: [PATCH 00/12] Add the page size in the perf record (user tools)
Date: Mon, 30 Nov 2020 08:58:56 -0500	[thread overview]
Message-ID: <f9937ddf-f323-6f44-930b-0b08876e38c5@linux.intel.com> (raw)
In-Reply-To: <20201127202234.GA2790163@krava>



On 11/27/2020 3:22 PM, Jiri Olsa wrote:
> hi,
> I can't compile this on Fedora 32, check the log below
> 

The patch set was compiled with GCC 9. I will install a GCC 10 and fix 
all the warnings.

Thanks,
Kan

> jirka
> 
> 
> ---
> $ make JOBS=1
>    BUILD:   Doing 'make -j1' parallel build
> Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h'
> diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h
>    CC       util/parse-events.o
>    CC       util/session.o
> util/session.c: In function ‘machines__deliver_event’:
> util/session.c:1278:37: error: ‘%lu’ directive output may be truncated writing between 1 and 20 bytes into a region of size 10 [-Werror=format-truncation=]
>   1278 |  snprintf(str, PAGE_SIZE_NAME_LEN, "%lu%c", size, suffixes[i]);
>        |                                     ^~~
> util/session.c:1278:36: note: directive argument in the range [1, 18446744073709551615]
>   1278 |  snprintf(str, PAGE_SIZE_NAME_LEN, "%lu%c", size, suffixes[i]);
>        |                                    ^~~~~~~
> In file included from /usr/include/stdio.h:867,
>                   from /home/jolsa/kernel/linux-perf/tools/lib/perf/include/perf/cpumap.h:6,
>                   from util/session.c:13:
> /usr/include/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 3 and 22 bytes into a destination of size 10
>     67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
>        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     68 |        __bos (__s), __fmt, __va_arg_pack ());
>        |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> util/session.c:1278:37: error: ‘%lu’ directive output may be truncated writing between 1 and 20 bytes into a region of size 10 [-Werror=format-truncation=]
>   1278 |  snprintf(str, PAGE_SIZE_NAME_LEN, "%lu%c", size, suffixes[i]);
>        |                                     ^~~
> util/session.c:1278:36: note: directive argument in the range [1, 18446744073709551615]
>   1278 |  snprintf(str, PAGE_SIZE_NAME_LEN, "%lu%c", size, suffixes[i]);
>        |                                    ^~~~~~~
> In file included from /usr/include/stdio.h:867,
>                   from /home/jolsa/kernel/linux-perf/tools/lib/perf/include/perf/cpumap.h:6,
>                   from util/session.c:13:
> /usr/include/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 3 and 22 bytes into a destination of size 10
>     67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
>        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     68 |        __bos (__s), __fmt, __va_arg_pack ());
>        |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> util/session.c: In function ‘get_page_size_name’:
> util/session.c:1278:37: error: ‘%lu’ directive output may be truncated writing between 1 and 20 bytes into a region of size 10 [-Werror=format-truncation=]
>   1278 |  snprintf(str, PAGE_SIZE_NAME_LEN, "%lu%c", size, suffixes[i]);
>        |                                     ^~~
> util/session.c:1278:36: note: directive argument in the range [1, 18446744073709551615]
>   1278 |  snprintf(str, PAGE_SIZE_NAME_LEN, "%lu%c", size, suffixes[i]);
>        |                                    ^~~~~~~
> In file included from /usr/include/stdio.h:867,
>                   from /home/jolsa/kernel/linux-perf/tools/lib/perf/include/perf/cpumap.h:6,
>                   from util/session.c:13:
> /usr/include/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 3 and 22 bytes into a destination of size 10
>     67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
>        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     68 |        __bos (__s), __fmt, __va_arg_pack ());
>        |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[4]: *** [/home/jolsa/kernel/linux-perf/tools/build/Makefile.build:97: util/session.o] Error 1
> make[3]: *** [/home/jolsa/kernel/linux-perf/tools/build/Makefile.build:139: util] Error 2
> make[2]: *** [Makefile.perf:647: perf-in.o] Error 2
> make[1]: *** [Makefile.perf:233: sub-make] Error 2
> make: *** [Makefile:70: all] Error 2

      reply	other threads:[~2020-11-30 14:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 19:56 [PATCH 00/12] Add the page size in the perf record (user tools) kan.liang
2020-11-17 19:56 ` [PATCH 01/12] tools headers UAPI: Update tools's copy of linux/perf_event.h kan.liang
2020-11-17 19:56 ` [PATCH 02/12] perf record: Support new sample type for data page size kan.liang
2020-11-17 19:56 ` [PATCH 03/12] perf script: Support " kan.liang
2020-11-17 19:56 ` [PATCH 04/12] perf sort: Add sort option for " kan.liang
2020-11-17 19:56 ` [PATCH 05/12] perf mem: Factor out a function to generate sort order kan.liang
2020-11-17 19:56 ` [PATCH 06/12] perf mem: Clean up output format kan.liang
2020-11-17 19:56 ` [PATCH 07/12] perf mem: Support data page size kan.liang
2020-11-17 19:56 ` [PATCH 08/12] perf test: Add test case for PERF_SAMPLE_DATA_PAGE_SIZE kan.liang
2020-11-17 19:56 ` [PATCH 09/12] perf tools: Add support for PERF_SAMPLE_CODE_PAGE_SIZE kan.liang
2020-11-17 19:56 ` [PATCH 10/12] perf script: " kan.liang
2020-11-17 19:56 ` [PATCH 11/12] perf report: " kan.liang
2020-11-17 19:56 ` [PATCH 12/12] perf test: Add test case " kan.liang
2020-11-24  6:47 ` [PATCH 00/12] Add the page size in the perf record (user tools) Namhyung Kim
2020-11-27 20:22 ` Jiri Olsa
2020-11-30 13:58   ` Liang, Kan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9937ddf-f323-6f44-930b-0b08876e38c5@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=namhyung@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).