Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-29 Thread Jiri Olsa
On Thu, Oct 23, 2014 at 01:45:12PM +0300, Adrian Hunter wrote: SNIP > }; > > +enum { > + PERF_FLAG_BRANCH= 1ULL << 0, > + PERF_FLAG_CALL = 1ULL << 1, > + PERF_FLAG_RETURN= 1ULL << 2, > + PERF_FLAG_CONDITIONAL = 1ULL <<

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-29 Thread Jiri Olsa
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; > + } > + } > +

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-29 Thread Jiri Olsa
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; + } + } + } +}

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-29 Thread Jiri Olsa
On Thu, Oct 23, 2014 at 01:45:12PM +0300, Adrian Hunter wrote: SNIP }; +enum { + PERF_FLAG_BRANCH= 1ULL 0, + PERF_FLAG_CALL = 1ULL 1, + PERF_FLAG_RETURN= 1ULL 2, + PERF_FLAG_CONDITIONAL = 1ULL 3, +

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-24 Thread Adrian Hunter
On 23/10/14 23:51, Arnaldo Carvalho de Melo wrote: > Em Thu, Oct 23, 2014 at 01:45:12PM +0300, Adrian Hunter escreveu: >> Add a thread stack for synthesizing call chains from call >> and return events. >> >> Signed-off-by: Adrian Hunter >> --- >> tools/perf/Makefile.perf | 2 + >>

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-24 Thread Adrian Hunter
On 23/10/14 23:51, Arnaldo Carvalho de Melo wrote: Em Thu, Oct 23, 2014 at 01:45:12PM +0300, Adrian Hunter escreveu: Add a thread stack for synthesizing call chains from call and return events. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- tools/perf/Makefile.perf | 2 +

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-23 Thread Namhyung Kim
On Thu, 23 Oct 2014 13:45:12 +0300, Adrian Hunter wrote: > +static void thread_stack__pop(struct thread_stack *ts, u64 ret_addr) > +{ > + if (!ts->cnt) > + return; > + > + if (ts->stack[ts->cnt - 1].ret_addr == ret_addr) { > + ts->cnt -= 1; > + } else { > +

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-23 Thread Arnaldo Carvalho de Melo
Em Thu, Oct 23, 2014 at 01:45:12PM +0300, Adrian Hunter escreveu: > Add a thread stack for synthesizing call chains from call > and return events. > > Signed-off-by: Adrian Hunter > --- > tools/perf/Makefile.perf | 2 + > tools/perf/util/event.h| 26 +++ >

[PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-23 Thread Adrian Hunter
Add a thread stack for synthesizing call chains from call and return events. Signed-off-by: Adrian Hunter --- tools/perf/Makefile.perf | 2 + tools/perf/util/event.h| 26 +++ tools/perf/util/thread-stack.c | 151 +

[PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-23 Thread Adrian Hunter
Add a thread stack for synthesizing call chains from call and return events. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- tools/perf/Makefile.perf | 2 + tools/perf/util/event.h| 26 +++ tools/perf/util/thread-stack.c | 151

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-23 Thread Arnaldo Carvalho de Melo
Em Thu, Oct 23, 2014 at 01:45:12PM +0300, Adrian Hunter escreveu: Add a thread stack for synthesizing call chains from call and return events. Signed-off-by: Adrian Hunter adrian.hun...@intel.com --- tools/perf/Makefile.perf | 2 + tools/perf/util/event.h| 26 +++

Re: [PATCH 04/16] perf tools: Add a thread stack for synthesizing call chains

2014-10-23 Thread Namhyung Kim
On Thu, 23 Oct 2014 13:45:12 +0300, Adrian Hunter wrote: +static void thread_stack__pop(struct thread_stack *ts, u64 ret_addr) +{ + if (!ts-cnt) + return; + + if (ts-stack[ts-cnt - 1].ret_addr == ret_addr) { + ts-cnt -= 1; + } else { +