From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Colin Walters <walters@verbum.org>,
Namhyung Kim <namhyung@gmail.com>,
Namhyung Kim <namhyung.kim@lge.com>,
Paul Mackerras <paulus@samba.org>,
Pekka Enberg <penberg@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [GIT PULL 0/3] perf/core fixes and improvements
Date: Mon, 19 Mar 2012 18:17:33 -0300 [thread overview]
Message-ID: <20120319211733.GA24118@infradead.org> (raw)
In-Reply-To: <20120319194725.GA31940@gmail.com>
Em Mon, Mar 19, 2012 at 08:47:25PM +0100, Ingo Molnar escreveu:
> Pulled, thanks Arnaldo!
>
> I noticed that there's no help text for GTK support - how will a
> user find that 'perf report --gtk' will do something nice?
>
> Another detail is that if GTK support is not compiled in:
>
> Makefile:515: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
>
> then the --gtk output is not very informative:
>
> earth5:~/tip/tools/perf> perf report --gtk
> earth5:~/tip/tools/perf>
>
> :-)
>
> A third detail, I do have gtk2-devel installed:
>
> Package gtk2-devel-2.24.10-1.fc17.x86_64 already installed and latest version
Yeah, as you said, the ball is rolling! ;-)
> yet I got the above message.
>
> It is not easy to figure out *why* a feature test failed,
> unfortunately. It would be nice if V=1 or something like that
> would output the failure.
Yeah, I also was frustrated by V=1 not affecting the feature tests, and
did what you did, just didn't got around to fix it properly.
> I applied the hack below and ran the gtk testcase, which gave:
>
> earth5:~/tip/tools/perf> . ./test.4273.sh
> In file included from /usr/lib64/glib-2.0/include/glibconfig.h:9:0,
> from /usr/include/glib-2.0/glib/gtypes.h:34,
> from /usr/include/glib-2.0/glib/galloca.h:34,
> from /usr/include/glib-2.0/glib.h:32,
> from /usr/include/glib-2.0/gobject/gbinding.h:30,
> from /usr/include/glib-2.0/glib-object.h:25,
> from /usr/include/glib-2.0/gio/gioenums.h:30,
> from /usr/include/glib-2.0/gio/giotypes.h:30,
> from /usr/include/glib-2.0/gio/gio.h:28,
> from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
> from /usr/include/gtk-2.0/gdk/gdk.h:32,
> from /usr/include/gtk-2.0/gtk/gtk.h:32,
> from test.4273.c:2:
> /usr/include/glib-2.0/glib/gmacros.h:346:7: error: "_MSC_VER" is not defined [-Werror=undef]
> cc1: all warnings being treated as errors
>
> Which allowed me to fix the feature test and the gtk.h include
> file wrapper via the second patch below.
>
> And then I was greeted by the GTK report window on 'perf report
> --gtk' ;-)
>
> Thanks,
>
> Ingo
>
> diff --git a/tools/perf/config/utilities.mak b/tools/perf/config/utilities.mak
> index 8046182..68cf795 100644
> --- a/tools/perf/config/utilities.mak
> +++ b/tools/perf/config/utilities.mak
> @@ -183,6 +183,8 @@ _gea_err = $(if $(1),$(error Please set '$(1)' appropriately))
> # Usage: option = $(call try-cc, source-to-build, cc-options)
> try-cc = $(shell sh -c \
> 'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
> + echo "$(1)" > test.$$$$.c; \
> + echo $(CC) -x c test.$$$$.c $(2) -o "$$TMP" > test.$$$$.sh; \
> echo "$(1)" | \
> $(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \
> rm -f "$$TMP"')
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
>
> diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
> index d9084e0..ae8b471 100644
> --- a/tools/perf/config/feature-tests.mak
> +++ b/tools/perf/config/feature-tests.mak
> @@ -68,7 +68,9 @@ endif
> ifndef NO_GTK2
> define SOURCE_GTK2
> #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
> +#pragma GCC diagnostic ignored \"-Wundef\"
> #include <gtk/gtk.h>
> +#pragma GCC diagnostic error \"-Wundef\"
> #pragma GCC diagnostic error \"-Wstrict-prototypes\"
>
> int main(int argc, char *argv[])
> diff --git a/tools/perf/util/gtk/gtk.h b/tools/perf/util/gtk/gtk.h
> index 75177ee..c7a941f 100644
> --- a/tools/perf/util/gtk/gtk.h
> +++ b/tools/perf/util/gtk/gtk.h
> @@ -2,7 +2,9 @@
> #define _PERF_GTK_H_ 1
>
> #pragma GCC diagnostic ignored "-Wstrict-prototypes"
> +#pragma GCC diagnostic ignored "-Wundef"
> #include <gtk/gtk.h>
> +#pragma GCC diagnostic error "-Wundef"
> #pragma GCC diagnostic error "-Wstrict-prototypes"
>
> #endif /* _PERF_GTK_H_ */
next prev parent reply other threads:[~2012-03-19 21:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 19:12 [GIT PULL 0/3] perf/core fixes and improvements Arnaldo Carvalho de Melo
2012-03-19 19:12 ` [PATCH 1/3] perf ui browser: Clean lines inside of the input window Arnaldo Carvalho de Melo
2012-03-19 19:12 ` [PATCH 2/3] perf report: Document --symbol-filter option Arnaldo Carvalho de Melo
2012-03-19 19:12 ` [PATCH 3/3] perf report: Add a simple GTK2-based 'perf report' browser Arnaldo Carvalho de Melo
2012-03-19 19:47 ` [GIT PULL 0/3] perf/core fixes and improvements Ingo Molnar
2012-03-19 19:56 ` Ingo Molnar
2012-03-19 20:20 ` Ingo Molnar
2012-03-19 21:17 ` Arnaldo Carvalho de Melo [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-21 17:35 Arnaldo Carvalho de Melo
2012-02-22 10:12 ` Ingo Molnar
2011-12-12 13:26 Arnaldo Carvalho de Melo
2011-12-12 17:24 ` Ingo Molnar
2011-10-29 17:25 Arnaldo Carvalho de Melo
2011-10-30 11:04 ` Ingo Molnar
2011-03-23 22:52 Arnaldo Carvalho de Melo
2011-03-24 8:17 ` Ingo Molnar
2010-12-22 22:36 Arnaldo Carvalho de Melo
2010-12-23 13:20 ` Ingo Molnar
2010-08-12 20:45 Arnaldo Carvalho de Melo
2010-08-04 21:26 Arnaldo Carvalho de Melo
2010-08-05 6:46 ` Ingo Molnar
2010-08-03 2:09 Arnaldo Carvalho de Melo
2010-08-03 5:44 ` Ingo Molnar
2010-07-16 18:09 Arnaldo Carvalho de Melo
2010-07-17 9:35 ` Ingo Molnar
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=20120319211733.GA24118@infradead.org \
--to=acme@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@gmail.com \
--cc=paulus@samba.org \
--cc=penberg@kernel.org \
--cc=walters@verbum.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.