All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 00/14] tools lib traceevent: Get rid of *die() calls from parse-filter.c
@ 2013-12-09  5:33 Namhyung Kim
  2013-12-09  5:33 ` [PATCH 01/14] tools lib traceevent: Get rid of malloc_or_die() in show_error() Namhyung Kim
                   ` (15 more replies)
  0 siblings, 16 replies; 54+ messages in thread
From: Namhyung Kim @ 2013-12-09  5:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Steven Rostedt
  Cc: Frederic Weisbecker, Ingo Molnar, Jiri Olsa, LKML, Namhyung Kim

Hello,

This patchset tries to remove all die() calls in event filter parsing
code.  The only remaining bits are in trace-seq.c which implement
print functions and I want to hear what's the best way we can handle
the error case during the print.

I also put this patches on libtraceevent/die-removal-v1 branch in my tree

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git


Any comments are welcome, thanks
Namhyung


Namhyung Kim (14):
  tools lib traceevent: Get rid of malloc_or_die() in show_error()
  tools lib traceevent: Get rid of die in add_filter_type()
  tools lib traceevent: Get rid of malloc_or_die() in
    pevent_filter_alloc()
  tools lib traceevent: Get rid of malloc_or_die() allocate_arg()
  tools lib traceevent: Get rid of malloc_or_die() in read_token()
  tools lib traceevent: Get rid of malloc_or_die() in find_event()
  tools lib traceevent: Get rid of malloc_or_die() in add_event()
  tools lib traceevent: Get rid of die() in create_arg_item()
  tools lib traceevent: Get rid of die() in add_right()
  tools lib traceevent: Get rid of die() in reparent_op_arg()
  tools lib traceevent: Get rid of malloc_or_die() in
    pevent_filter_add_filter_str()
  tools lib traceevent: Get rid of die() in
    pevent_filter_clear_trivial()
  tools lib traceevent: Refactor test_filter() to get rid of die()
  tools lib traceevent: Get rid of die() in some string conversion
    funcitons

 tools/lib/traceevent/event-parse.h  |   3 +-
 tools/lib/traceevent/parse-filter.c | 432 +++++++++++++++++++++++++-----------
 2 files changed, 303 insertions(+), 132 deletions(-)

-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 54+ messages in thread
* [PATCHSET 00/14] tools lib traceevent: Get rid of *die() calls from parse-filter.c (v2)
@ 2013-12-12  7:36 Namhyung Kim
  2013-12-12  7:36 ` [PATCH 02/14] tools lib traceevent: Get rid of die in add_filter_type() Namhyung Kim
  0 siblings, 1 reply; 54+ messages in thread
From: Namhyung Kim @ 2013-12-12  7:36 UTC (permalink / raw)
  To: Steven Rostedt, Arnaldo Carvalho de Melo
  Cc: Frederic Weisbecker, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
	LKML, Jiri Olsa

Hello,

This patchset tries to remove all die() calls in event filter parsing
code.  I changed two main functions of pevent_filter_add_filter_str()
and pevent_filter_match() to return a proper error code (pevent_errno).

The actual error message might be saved in a static buffer in pevent_
filter and it can be accessed by new pevent_filter_strerror() function.
The old pevent_strerror() still works for them too.

The only remaining bits are in trace-seq.c which implement print
functions and I want to hear what's the best way we can handle the
error case during the print.

I also put this patches on libtraceevent/die-removal-v2 branch in my tree

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git


Any comments are welcome, thanks
Namhyung


Namhyung Kim (14):
  tools lib traceevent: Get rid of malloc_or_die() in show_error()
  tools lib traceevent: Get rid of die in add_filter_type()
  tools lib traceevent: Get rid of malloc_or_die() allocate_arg()
  tools lib traceevent: Get rid of malloc_or_die() in read_token()
  tools lib traceevent: Get rid of malloc_or_die() in find_event()
  tools lib traceevent: Get rid of die() in add_right()
  tools lib traceevent: Make add_left() return pevent_errno
  tools lib traceevent: Get rid of die() in reparent_op_arg()
  tools lib traceevent: Refactor create_arg_item()
  tools lib traceevent: Refactor process_filter()
  tools lib traceevent: Make pevent_filter_add_filter_str() return
    pevent_errno
  tools lib traceevent: Refactor pevent_filter_match() to get rid of
    die()
  tools lib traceevent: Get rid of die() in some string conversion
    funcitons
  tools lib traceevent: Introduce pevent_filter_strerror()

 tools/lib/traceevent/event-parse.c  |  17 +-
 tools/lib/traceevent/event-parse.h  |  48 ++-
 tools/lib/traceevent/parse-filter.c | 615 ++++++++++++++++++++++--------------
 3 files changed, 417 insertions(+), 263 deletions(-)

-- 
1.7.11.7


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

end of thread, other threads:[~2013-12-12  7:36 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-09  5:33 [PATCHSET 00/14] tools lib traceevent: Get rid of *die() calls from parse-filter.c Namhyung Kim
2013-12-09  5:33 ` [PATCH 01/14] tools lib traceevent: Get rid of malloc_or_die() in show_error() Namhyung Kim
2013-12-09 18:30   ` Arnaldo Carvalho de Melo
2013-12-09 19:03     ` Steven Rostedt
2013-12-09 19:14       ` Arnaldo Carvalho de Melo
2013-12-09 19:23         ` Steven Rostedt
2013-12-10  2:03           ` Namhyung Kim
2013-12-10  2:14             ` Steven Rostedt
2013-12-10  5:01               ` Namhyung Kim
2013-12-10  5:30                 ` Namhyung Kim
2013-12-11  0:40                   ` Namhyung Kim
2013-12-11  1:55                     ` Steven Rostedt
2013-12-11  2:29                       ` Namhyung Kim
2013-12-12  1:10                         ` Steven Rostedt
2013-12-09  5:33 ` [PATCH 02/14] tools lib traceevent: Get rid of die in add_filter_type() Namhyung Kim
2013-12-09 10:44   ` Jiri Olsa
2013-12-10  0:32     ` Namhyung Kim
2013-12-09  5:34 ` [PATCH 03/14] tools lib traceevent: Get rid of malloc_or_die() in pevent_filter_alloc() Namhyung Kim
2013-12-11 11:05   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-12-09  5:34 ` [PATCH 04/14] tools lib traceevent: Get rid of malloc_or_die() allocate_arg() Namhyung Kim
2013-12-09 16:05   ` Steven Rostedt
2013-12-10  1:21     ` Namhyung Kim
2013-12-10  2:08       ` Steven Rostedt
2013-12-09  5:34 ` [PATCH 05/14] tools lib traceevent: Get rid of malloc_or_die() in read_token() Namhyung Kim
2013-12-09  5:34 ` [PATCH 06/14] tools lib traceevent: Get rid of malloc_or_die() in find_event() Namhyung Kim
2013-12-09 11:03   ` Jiri Olsa
2013-12-09 16:27     ` Steven Rostedt
2013-12-10  0:48     ` Namhyung Kim
2013-12-09  5:34 ` [PATCH 07/14] tools lib traceevent: Get rid of malloc_or_die() in add_event() Namhyung Kim
2013-12-11 11:06   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-12-09  5:34 ` [PATCH 08/14] tools lib traceevent: Get rid of die() in create_arg_item() Namhyung Kim
2013-12-11 11:06   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-12-09  5:34 ` [PATCH 09/14] tools lib traceevent: Get rid of die() in add_right() Namhyung Kim
2013-12-09  6:28   ` Ilia Mirkin
2013-12-09  6:59     ` Namhyung Kim
2013-12-09 16:32       ` Steven Rostedt
2013-12-09 23:47         ` Namhyung Kim
2013-12-09  5:34 ` [PATCH 10/14] tools lib traceevent: Get rid of die() in reparent_op_arg() Namhyung Kim
2013-12-09  5:34 ` [PATCH 11/14] tools lib traceevent: Get rid of malloc_or_die() in pevent_filter_add_filter_str() Namhyung Kim
2013-12-11 11:06   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-12-09  5:34 ` [PATCH 12/14] tools lib traceevent: Get rid of die() in pevent_filter_clear_trivial() Namhyung Kim
2013-12-11 11:06   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-12-09  5:34 ` [PATCH 13/14] tools lib traceevent: Refactor test_filter() to get rid of die() Namhyung Kim
2013-12-09 16:19   ` Steven Rostedt
2013-12-10  1:48     ` Namhyung Kim
2013-12-09  5:34 ` [PATCH 14/14] tools lib traceevent: Get rid of die() in some string conversion funcitons Namhyung Kim
2013-12-09 16:24   ` Steven Rostedt
2013-12-10  1:50     ` Namhyung Kim
2013-12-09 10:47 ` [PATCHSET 00/14] tools lib traceevent: Get rid of *die() calls from parse-filter.c Jiri Olsa
2013-12-09 16:40   ` Steven Rostedt
2013-12-09 16:24 ` Steven Rostedt
2013-12-09 18:41   ` Arnaldo Carvalho de Melo
2013-12-10  0:34     ` Namhyung Kim
2013-12-12  7:36 [PATCHSET 00/14] tools lib traceevent: Get rid of *die() calls from parse-filter.c (v2) Namhyung Kim
2013-12-12  7:36 ` [PATCH 02/14] tools lib traceevent: Get rid of die in add_filter_type() Namhyung Kim

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.