linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] perf ui: Add basic error handling for GTK2 front-end
@ 2012-04-30  4:55 Namhyung Kim
  2012-04-30  4:55 ` [PATCH 1/7] perf ui: Make setup_browser() generic Namhyung Kim
                   ` (6 more replies)
  0 siblings, 7 replies; 21+ messages in thread
From: Namhyung Kim @ 2012-04-30  4:55 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Namhyung Kim, LKML,
	Pekka Enberg

Hi,

This is a patch set for improving GTK2 support. Patch 1 - 5 are
generalization of setup_browser() to support GTK browser seamlessly.
These are basically resend of previous version that got ack from
Pekka - Only patch 4 was slightly modified to make TUI default as
it does now.

On patch 6, introduce perf_error_ops structure and its helper
perf_error__[un]register_functions to set UI specific error
reporting functions and make TUI use them. To do this, split
TUI specific bits to ui/tui/util.c file. Patch 7 applies it
to GTK also.

Patches are based on current tip/perf/core - 1fa2e84db3f9 ("Merge tag
'perf-annotate-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
into perf/core"). All of these are build-tested for all combinations
of NO_NEWT and NO_GTK2.

Any comments are welcome.

Thanks,
Namhyung


Namhyung Kim (7):
  perf ui: Make setup_browser() generic
  perf ui: Drop arg[cv] arguments from perf_gtk_setup_browser()
  perf ui/gtk: Rename functions for consistency
  perf ui: Add gtk2 support into setup_browser()
  perf ui: Change fallback policy of setup_browser()
  perf ui: Introduce struct perf_error_ops
  perf ui/gtk: Use struct perf_error_ops

 tools/perf/Makefile         |    9 ++
 tools/perf/builtin-report.c |   10 +-
 tools/perf/ui/gtk/browser.c |   37 +++---
 tools/perf/ui/gtk/gtk.h     |    4 +
 tools/perf/ui/gtk/setup.c   |   18 +++
 tools/perf/ui/gtk/util.c    |   67 +++++++++++
 tools/perf/ui/setup.c       |  168 +++++---------------------
 tools/perf/ui/tui/setup.c   |  146 +++++++++++++++++++++++
 tools/perf/ui/tui/util.c    |  243 +++++++++++++++++++++++++++++++++++++
 tools/perf/ui/util.c        |  277 +++++++++----------------------------------
 tools/perf/ui/util.h        |    9 +-
 tools/perf/util/cache.h     |   24 ++--
 tools/perf/util/debug.c     |    2 +-
 tools/perf/util/debug.h     |   23 +++-
 14 files changed, 635 insertions(+), 402 deletions(-)
 create mode 100644 tools/perf/ui/gtk/setup.c
 create mode 100644 tools/perf/ui/gtk/util.c
 create mode 100644 tools/perf/ui/tui/setup.c
 create mode 100644 tools/perf/ui/tui/util.c

-- 
1.7.10


^ permalink raw reply	[flat|nested] 21+ messages in thread
* [PATCH 0/7] perf ui: Add basic error handling for GTK2 front-end (v3)
@ 2012-05-29  4:22 Namhyung Kim
  2012-05-29  4:23 ` [PATCH 7/7] perf ui/gtk: Use struct perf_error_ops Namhyung Kim
  0 siblings, 1 reply; 21+ messages in thread
From: Namhyung Kim @ 2012-05-29  4:22 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar, Pekka Enberg, LKML

Hi,

This patchset implements ui__warning/error() functions for GTK2.
Patch 1 is a resend (which forgot to cc LKML) and independent of
this series. Patch 2 converts invocations of ui__warning followed
by exit (or similar effect) into ui__error.

I chose GtkInfoBar widget to implement ui__warning since it provides
a simple way to do what we want IMHO. In fact, a guy sat next to me
at the Korean GNOME hackfest suggested to use it. The only problem
is it requires 2.18 (or newer) version of GTK+ libraries. So I added
status bar as a fallback when info bar is not supported, and this
can be used to implement helpline functions later.

Changes from v2:
 * Convert critical use of ui__warning to ui__error (by Ingo)
 * Use GtkInfoBar instead of a message dialog (by Pekka)

Any comments are welcome.

Thanks,
Namhyung


Namhyung Kim (7):
  perf ui: Make --stdio default when TUI is not supported
  perf tools: Convert critical messages to ui__error()
  perf ui: Introduce struct perf_error_ops
  perf ui/gtk: Introduce struct perf_gtk_context
  perf ui/gtk: Add GTK statusbar widget to browser window
  perf ui/gtk: Add GTK info_bar widget to browser window
  perf ui/gtk: Use struct perf_error_ops

 tools/perf/Makefile                 |    6 +
 tools/perf/builtin-annotate.c       |    2 +-
 tools/perf/builtin-record.c         |   14 +-
 tools/perf/builtin-report.c         |   14 +-
 tools/perf/builtin-top.c            |   22 +--
 tools/perf/config/feature-tests.mak |   13 ++
 tools/perf/ui/gtk/browser.c         |   67 ++++++++-
 tools/perf/ui/gtk/gtk.h             |   31 ++++
 tools/perf/ui/gtk/setup.c           |    5 +
 tools/perf/ui/gtk/util.c            |  129 ++++++++++++++++
 tools/perf/ui/setup.c               |    1 +
 tools/perf/ui/tui/setup.c           |    6 +
 tools/perf/ui/tui/util.c            |  243 ++++++++++++++++++++++++++++++
 tools/perf/ui/util.c                |  277 +++++++----------------------------
 tools/perf/ui/util.h                |    9 +-
 tools/perf/util/debug.c             |    2 +-
 tools/perf/util/debug.h             |   23 ++-
 17 files changed, 609 insertions(+), 255 deletions(-)
 create mode 100644 tools/perf/ui/gtk/util.c
 create mode 100644 tools/perf/ui/tui/util.c

-- 
1.7.9.2


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-05-29  4:23 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-30  4:55 [PATCH 0/7] perf ui: Add basic error handling for GTK2 front-end Namhyung Kim
2012-04-30  4:55 ` [PATCH 1/7] perf ui: Make setup_browser() generic Namhyung Kim
2012-05-11  6:33   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-04-30  4:55 ` [PATCH 2/7] perf ui: Drop arg[cv] arguments from perf_gtk_setup_browser() Namhyung Kim
2012-05-11  6:34   ` [tip:perf/core] perf ui gtk: " tip-bot for Namhyung Kim
2012-04-30  4:55 ` [PATCH 3/7] perf ui/gtk: Rename functions for consistency Namhyung Kim
2012-05-11  6:35   ` [tip:perf/core] perf ui gtk: " tip-bot for Namhyung Kim
2012-04-30  4:55 ` [PATCH 4/7] perf ui: Add gtk2 support into setup_browser() Namhyung Kim
2012-05-11  6:36   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-04-30  4:55 ` [PATCH 5/7] perf ui: Change fallback policy of setup_browser() Namhyung Kim
2012-05-11  6:37   ` [tip:perf/core] " tip-bot for Namhyung Kim
2012-04-30  4:55 ` [PATCH 6/7] perf ui: Introduce struct perf_error_ops Namhyung Kim
2012-05-02 19:03   ` Arnaldo Carvalho de Melo
2012-05-03 14:35     ` Namhyung Kim
2012-04-30  4:55 ` [PATCH 7/7] perf ui/gtk: Use " Namhyung Kim
2012-04-30  6:31   ` Pekka Enberg
2012-04-30  8:31     ` Namhyung Kim
2012-05-07  8:10       ` Ingo Molnar
2012-05-07  8:26         ` Namhyung Kim
2012-05-07  8:40           ` Ingo Molnar
2012-05-29  4:22 [PATCH 0/7] perf ui: Add basic error handling for GTK2 front-end (v3) Namhyung Kim
2012-05-29  4:23 ` [PATCH 7/7] perf ui/gtk: Use struct perf_error_ops Namhyung Kim

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).