lkml.org 
[lkml]   [2010]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -tip v2 7/8] perf probe: Remove die() from probe-finder code
Em Sat, Apr 10, 2010 at 12:48:10PM -0400, Masami Hiramatsu escreveu:
> Arnaldo Carvalho de Melo wrote:
> > Em Sat, Apr 10, 2010 at 12:20:22AM -0400, Masami Hiramatsu escreveu:
> >> Arnaldo Carvalho de Melo wrote:
> >>> Em Fri, Apr 09, 2010 at 07:18:38PM -0400, Masami Hiramatsu escreveu:
> >>>>> tvar->value = xstrdup(regs);
> >>>>> if (ref) {
> >>>>> tvar->ref = xzalloc(sizeof(struct kprobe_trace_arg_ref));

> >>> We have to kill those xzcalloc, etc, too they are die() in disguise :-)

> >> Hmm, I think that will cost high, because only failing to allocate memory,
> >> which theoretically means we can't continue to operate it. In that case,
> >> we'd better just use backtrace() and die().

> > Consider a situation where we are trying to allocate lots of objects
> > allocated for some big operation (adding probes for all functions in all
> > threads, whatever), we can just say to the user "hey, you don't have
> > memory to do this" but other operations are possible, so calling
> > panic(), oops, die() is not the right thing to do.

> Hmm, OK, so we'd better remove wrapper.c...

Yeah, that came from git, we'll eventually get rid of it, its just that
I wanted to make clear the rationale behind avoiding spreading its use.

- Arnaldo


\
 
 \ /
  Last update: 2010-04-10 20:13    [W:0.052 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site