All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Michael Petlan <mpetlan@redhat.com>
Subject: Re: [PATCH 06/13] perf tools: Add compression id into struct kmod_path
Date: Fri, 17 Aug 2018 15:56:41 -0300	[thread overview]
Message-ID: <20180817185641.GF22443@kernel.org> (raw)
In-Reply-To: <20180817182849.GE22443@kernel.org>

Em Fri, Aug 17, 2018 at 03:28:49PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Aug 17, 2018 at 03:23:15PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Aug 17, 2018 at 11:48:06AM +0200, Jiri Olsa escreveu:
> > >  static const struct {
> > >  	const char *fmt;
> > >  	int (*decompress)(const char *input, int output);
> > >  } compressions[] = {
> > > +	[COMP_ID__NONE] = { 0 },
> > 
> > 
> > This broke the build in many places, problems of this kind:
> > 
> >   CC       /tmp/build/perf/util/dso.o
> >   LD       /tmp/build/perf/scripts/python/Perf-Trace-Util/libperf-in.o
> >   LD       /tmp/build/perf/scripts/libperf-in.o
> >   CC       /tmp/build/perf/trace/beauty/clone.o
> >   CC       /tmp/build/perf/util/symbol.o
> > util/dso.c:201:24: error: missing field 'decompress' initializer [-Werror,-Wmissing-field-initializers]
> >         [COMP_ID__NONE] = { 0 },
> >                               ^
> > 1 error generated.
> >   CC       /tmp/build/perf/trace/beauty/fcntl.o
> > mv: cannot stat '/tmp/build/perf/util/.dso.o.tmp': No such file or directory
> > /git/linux/tools/build/Makefile.build:96: recipe for target '/tmp/build/perf/util/dso.o' failed
> > 
> > If we look just at those that failed, its several gcc versions:
> > 
> >   11     9.91 centos:5                      : FAIL gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
> >   12    14.34 centos:6                      : FAIL gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
> >   16    47.50 debian:9                      : FAIL gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
> >   28    53.92 fedora:25                     : FAIL gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
> >   29    60.75 fedora:26                     : FAIL gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
> >   30    90.76 fedora:27                     : FAIL gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6)
> >   41    12.78 oraclelinux:6                 : FAIL gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23.0.1)
> >   43    12.85 ubuntu:12.04.5                : FAIL gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
> >   46    45.56 ubuntu:16.04                  : FAIL gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
> >   54    49.60 ubuntu:17.10                  : FAIL gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
> 
> Sorry, gcc eats this with gusto, its just clang that is not taking it,
> for instance, this is the one in fedora:27:
> 
> clang version 5.0.2 (tags/RELEASE_502/final)

Nah, this cures it, and its not just clang, as we don't have it in the older
images like centos:5.

Patch below seems to cure in all cases, I'll do what is usual, use
designated initializers everywhere...

- Arnaldo

diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 8ce3de665993..bbed90e5d9bb 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -198,7 +198,7 @@ static const struct {
 	int (*decompress)(const char *input, int output);
 	bool (*is_compressed)(const char *input);
 } compressions[] = {
-	[COMP_ID__NONE] = { 0 },
+	[COMP_ID__NONE] = { .fmt = NULL, },
 #ifdef HAVE_ZLIB_SUPPORT
 	{ "gz", gzip_decompress_to_file, gzip_is_compressed },
 #endif

  reply	other threads:[~2018-08-17 18:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17  9:48 [PATCH 00/13] perf tools: Use plain debug files for compressed objects Jiri Olsa
2018-08-17  9:48 ` [PATCH 01/13] perf tools: Get rid of dso__needs_decompress call in read_object_code Jiri Olsa
2018-08-23  8:39   ` [tip:perf/urgent] perf tools: Get rid of dso__needs_decompress() call in read_object_code() tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 02/13] perf tools: Get rid of dso__needs_decompress call in symbol__disassemble Jiri Olsa
2018-08-23  8:39   ` [tip:perf/urgent] perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble() tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 03/13] perf tools: Get rid of dso__needs_decompress call in __open_dso Jiri Olsa
2018-08-23  8:40   ` [tip:perf/urgent] perf tools: Get rid of dso__needs_decompress() call in __open_dso() tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 04/13] perf tools: Make decompress_to_file function static Jiri Olsa
2018-08-23  8:40   ` [tip:perf/urgent] perf tools: Make decompress_to_file() " tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 05/13] perf tools: Make is_supported_compression " Jiri Olsa
2018-08-23  8:41   ` [tip:perf/urgent] perf tools: Make is_supported_compression() static tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 06/13] perf tools: Add compression id into struct kmod_path Jiri Olsa
2018-08-17 18:23   ` Arnaldo Carvalho de Melo
2018-08-17 18:28     ` Arnaldo Carvalho de Melo
2018-08-17 18:56       ` Arnaldo Carvalho de Melo [this message]
2018-08-17 20:01         ` Jiri Olsa
2018-08-23  8:41   ` [tip:perf/urgent] perf tools: Add compression id into 'struct kmod_path' tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 07/13] perf tools: Store compression id into struct dso Jiri Olsa
2018-08-23  8:42   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 08/13] perf tools: Use compression id in decompress_kmodule function Jiri Olsa
2018-08-23  8:42   ` [tip:perf/urgent] perf tools: Use compression id in decompress_kmodule() tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 09/13] perf tools: Move the temp file processing into decompress_kmodule Jiri Olsa
2018-08-23  8:43   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 10/13] perf tools: Add is_compressed callback to compressions array Jiri Olsa
2018-08-23  8:43   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 11/13] perf tools: Add lzma_is_compressed function Jiri Olsa
2018-08-23  8:44   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 12/13] perf tools: Add gzip_is_compressed function Jiri Olsa
2018-08-23  8:44   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-08-17  9:48 ` [PATCH 13/13] perf tools: Remove ext from struct kmod_path Jiri Olsa
2018-08-23  8:45   ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2018-08-17 14:52 ` [PATCH 00/13] perf tools: Use plain debug files for compressed objects Arnaldo Carvalho de Melo

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=20180817185641.GF22443@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.