lkml.org 
[lkml]   [2018]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] perf unwind: Do not look at globals
On Tue, Jan 16, 2018 at 12:36:21PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 16, 2018 at 04:19:15PM +0100, Jiri Olsa escreveu:
> > On Tue, Jan 16, 2018 at 11:24:35AM -0300, Arnaldo Carvalho de Melo wrote:
> >
> > SNIP
> >
> > > Cc: Adrian Hunter <adrian.hunter@intel.com>
> > > Cc: David Ahern <dsahern@gmail.com>
> > > Cc: Hendrick Brueckner <brueckner@linux.vnet.ibm.com>
> > > Cc: Jiri Olsa <jolsa@kernel.org>
> > > Cc: Namhyung Kim <namhyung@kernel.org>
> > > Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
> > > Cc: Wang Nan <wangnan0@huawei.com>
> > > Link: https://lkml.kernel.org/n/tip-skbth8ufepbtw8xar7gdsb6l@git.kernel.org
> > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > ---
> > > tools/perf/util/unwind-libunwind-local.c | 9 ---------
> > > 1 file changed, 9 deletions(-)
> > >
> > > diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
> > > index 7a42f703e858..02dc5a9d8f72 100644
> > > --- a/tools/perf/util/unwind-libunwind-local.c
> > > +++ b/tools/perf/util/unwind-libunwind-local.c
> > > @@ -631,9 +631,6 @@ static unw_accessors_t accessors = {
> > >
> > > static int _unwind__prepare_access(struct thread *thread)
> > > {
> > > - if (callchain_param.record_mode != CALLCHAIN_DWARF)
> > > - return 0;
> > > -
> >
> > this would create thread->addr_space also for data without
> > dwarf callchains data, so I think we need to keep it
> >
> > it should get set in apply_config_terms which calls parse_callchain_record
>
> No, it should not set the global parameter, as this is just for a
> specific event, i.e. we can have something like:
>
> perf record -e cycles/call-graph=dwarf/ \
> -e instructions/call-graph=lbr/
> -e cache-misses/call-graph=fp
>
> And then get these samples for the same thread.
>
> If you want to avoid creating thread->addr_space, and we do want that,
> sure, a followup patch should address that, we need to postpone
> allocating it till we get a DWARF callchain in a sample for that
> specific thread, when we then should allocate thread->addr_space.

yea that could be fixed.. however current code prevents
to create that for data without DWARF data, and your change
forces it

I guess that's addressed in your next email.. going to read it ;-)

jirka

\
 
 \ /
  Last update: 2018-01-16 20:31    [W:0.063 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site