lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120319194725.GA31940@gmail.com>
Date:	Mon, 19 Mar 2012 20:47:25 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...radead.org>
Cc:	linux-kernel@...r.kernel.org, Colin Walters <walters@...bum.org>,
	Namhyung Kim <namhyung@...il.com>,
	Namhyung Kim <namhyung.kim@....com>,
	Paul Mackerras <paulus@...ba.org>,
	Pekka Enberg <penberg@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	arnaldo.melo@...il.com, Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [GIT PULL 0/3] perf/core fixes and improvements


* Arnaldo Carvalho de Melo <acme@...radead.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@...hat.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@...e.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_ */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ