| Date | Wed, 29 Oct 2014 10:03:40 +0100 | From | Jiri Olsa <> | Subject | Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains |
| |
On Thu, Oct 23, 2014 at 01:45:12PM +0300, Adrian Hunter wrote:
SNIP
> + while (i--) { > + if (ts->stack[i].ret_addr == ret_addr) { > + ts->cnt = i; > + return; > + } > + } > + } > +} > + > +void thread_stack__event(struct thread *thread, u32 flags, u64 from_ip, > + u64 to_ip, u16 insn_len, u64 trace_nr) > +{ > + if (!thread) > + return; > + > + if (!thread->ts) { > + thread->ts = thread_stack__new(); > + if (!thread->ts) > + return;
should the function return 'int' then..? So the allocation error gets handled properly.
jirka
|