All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Arnaldo Carvalho de Melo <acme@infradead.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>,
	arnaldo.melo@gmail.com,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [GIT PULL 0/3] perf/core fixes and improvements
Date: Mon, 19 Mar 2012 20:47:25 +0100	[thread overview]
Message-ID: <20120319194725.GA31940@gmail.com> (raw)
In-Reply-To: <1332184368-1655-1-git-send-email-acme@infradead.org>


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling, now there are two pull request worth of
> changesets in my perf/core branch,
> 
> - Arnaldo
> 
> The following changes since commit 6db6127c4dad634ab98709b81e2f2770890b0d53:
> 
>   perf report: Treat an argument as a symbol filter (2012-03-16 16:44:36 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to c31a94570552dcaa517c4f7a043ffd28835016be:
> 
>   perf report: Add a simple GTK2-based 'perf report' browser (2012-03-19 15:13:29 -0300)
> 
> ----------------------------------------------------------------
> Fixes for the last batch from Namhyung and the initial GTK report browser
> from Pekka.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Namhyung Kim (2):
>       perf ui browser: Clean lines inside of the input window
>       perf report: Document --symbol-filter option
> 
> Pekka Enberg (1):
>       perf report: Add a simple GTK2-based 'perf report' browser
> 
>  tools/perf/Documentation/perf-report.txt |    5 +
>  tools/perf/Makefile                      |   14 +++
>  tools/perf/builtin-report.c              |   19 ++-
>  tools/perf/config/feature-tests.mak      |   15 +++
>  tools/perf/util/cache.h                  |   12 ++
>  tools/perf/util/gtk/browser.c            |  189 ++++++++++++++++++++++++++++++
>  tools/perf/util/gtk/gtk.h                |    8 ++
>  tools/perf/util/hist.h                   |   17 +++
>  tools/perf/util/ui/util.c                |   10 +-
>  9 files changed, 282 insertions(+), 7 deletions(-)
>  create mode 100644 tools/perf/util/gtk/browser.c
>  create mode 100644 tools/perf/util/gtk/gtk.h

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

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.

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_ */

  parent reply	other threads:[~2012-03-19 19:47 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 ` Ingo Molnar [this message]
2012-03-19 19:56   ` [GIT PULL 0/3] perf/core fixes and improvements Ingo Molnar
2012-03-19 20:20   ` Ingo Molnar
2012-03-19 21:17   ` Arnaldo Carvalho de Melo
  -- 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=20120319194725.GA31940@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=linux-kernel@vger.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.