Re: [PATCH] tools lib traceevent: Handle alloc_arg failure

2012-09-19 Thread Namhyung Kim
Hi Steve, 2012-09-19 (수), 08:41 -0400, Steven Rostedt: > On Wed, 2012-09-19 at 21:26 +0900, Namhyung Kim wrote: > > Yeah, I agree. But I wanted to add a bit more helpful (to developers) > > info - function name and line number - rather than just "not enough > > memory" message. Maybe we could ch

Re: [PATCH] tools lib traceevent: Handle alloc_arg failure

2012-09-19 Thread Steven Rostedt
On Wed, 2012-09-19 at 21:26 +0900, Namhyung Kim wrote: > Hi Ingo, > > Yeah, I agree. But I wanted to add a bit more helpful (to developers) > info - function name and line number - rather than just "not enough > memory" message. Maybe we could change do_warning to emit such info > automatically

Re: [PATCH] tools lib traceevent: Handle alloc_arg failure

2012-09-19 Thread Namhyung Kim
Hi Ingo, 2012-09-19 (수), 13:42 +0200, Ingo Molnar: > * Namhyung Kim wrote: > > > + if (!left) { > > + do_warning("%s(%d): not enough memory!", __func__, > > __LINE__); > > + goto out_free; > > > + if (!right) { > > + do_

Re: [PATCH] tools lib traceevent: Handle alloc_arg failure

2012-09-19 Thread Ingo Molnar
* Namhyung Kim wrote: > + if (!left) { > + do_warning("%s(%d): not enough memory!", __func__, > __LINE__); > + goto out_free; > + if (!right) { > + do_warning("%s(%d): not enough memory!", __func__, > __LINE__

[PATCH] tools lib traceevent: Handle alloc_arg failure

2012-09-18 Thread Namhyung Kim
From: Namhyung Kim Now alloc_arg returns NULL if memory allocation failed, it should be handled on callsites properly. Signed-off-by: Namhyung Kim --- tools/lib/traceevent/event-parse.c | 98 ++ 1 file changed, 98 insertions(+) diff --git a/tools/lib/tracee