Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1272034

Re: [PATCH 2/3] perf tools: Add callchain order support for libunwind DWARF unwinder

From Namhyung Kim <namhyung@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] perf tools: Add callchain order support for libunwind DWARF unwinder
Date 2015-11-18 10:30 +0100
Message-ID <qw7dT-10j-17@gated-at.bofh.it> (permalink)
References <qvQ3o-6Fs-9@gated-at.bofh.it> <qvQ3o-6Fs-7@gated-at.bofh.it> <qw2nU-6d6-13@gated-at.bofh.it> <qw3N0-74f-7@gated-at.bofh.it> <qw6hQ-nn-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On November 18, 2015 5:25:25 PM GMT+09:00, Jiri Olsa <jolsa@redhat.com> wrote:
>On Wed, Nov 18, 2015 at 02:41:14PM +0900, Namhyung Kim wrote:
>
>SNIP
>
>> > I'm not sure whether we can regard this behavior changing as a
>bugfix? I
>> > think
>> > there may be some reason the original code explicitly avoid
>creating an '0'
>> > entry.
>> 
>> I think callchain value being 0 is an error or marker for the end of
>> callchain.  So it'd be better avoiding 0 entry.
>> 
>> But unfortunately, we have many 0 entries (and broken callchain after
>> them) with fp recording on optimized binaries.  I think we should
>omit
>> those callchains.
>> 
>> Maybe something like this?
>> 
>> 
>> 
>> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
>> index 5ef90be2a249..22642c5719ab 100644
>> --- a/tools/perf/util/machine.c
>> +++ b/tools/perf/util/machine.c
>> @@ -1850,6 +1850,15 @@ static int
>thread__resolve_callchain_sample(struct thread *thread,
>>  #endif
>>  		ip = chain->ips[j];
>>  
>> +		/* callchain value inside zero page means it's broken, stop */
>> +		if (ip < 4096) {
>> +			if (callchain_param.order == ORDER_CALLER) {
>> +				callchain_cursor_reset(&callchain_cursor);
>
>hum, do we want to throw away whatever we have till now?

For caller order, yes.  

For callee order, everything after 0 value is garbage.  So we need to discard any chains before the 0 for caller IMHO.

Thanks
Namhyung


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] perf tools: Add callchain order support for libunwind DWARF unwinder Jiri Olsa <jolsa@kernel.org> - 2015-11-17 16:10 +0100
  Re: [PATCH 2/3] perf tools: Add callchain order support for libunwind  DWARF unwinder "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 05:20 +0100
    Re: [PATCH 2/3] perf tools: Add callchain order support for  libunwind DWARF unwinder Namhyung Kim <namhyung@kernel.org> - 2015-11-18 06:50 +0100
      Re: [PATCH 2/3] perf tools: Add callchain order support for libunwind  DWARF unwinder "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 08:40 +0100
        Re: [PATCH 2/3] perf tools: Add callchain order support for  libunwind DWARF unwinder Namhyung Kim <namhyung@kernel.org> - 2015-11-22 16:30 +0100
      Re: [PATCH 2/3] perf tools: Add callchain order support for  libunwind DWARF unwinder Jiri Olsa <jolsa@redhat.com> - 2015-11-18 09:30 +0100
      Re: [PATCH 2/3] perf tools: Add callchain order support for  libunwind DWARF unwinder Jiri Olsa <jolsa@redhat.com> - 2015-11-18 09:30 +0100
        Re: [PATCH 2/3] perf tools: Add callchain order support for libunwind DWARF unwinder Namhyung Kim <namhyung@gmail.com> - 2015-11-18 10:30 +0100
    Re: [PATCH 2/3] perf tools: Add callchain order support for  libunwind DWARF unwinder Jiri Olsa <jolsa@redhat.com> - 2015-11-18 09:00 +0100
      Re: [PATCH 2/3] perf tools: Add callchain order support for libunwind  DWARF unwinder "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 09:10 +0100
      Re: [PATCH 2/3] perf tools: Add callchain order support for  libunwind DWARF unwinder Jiri Olsa <jolsa@redhat.com> - 2015-11-18 09:20 +0100
    [PATCHv2 2/3] perf tools: Add callchain order support for libunwind  DWARF unwinder Jiri Olsa <jolsa@redhat.com> - 2015-11-18 09:00 +0100
      Re: [PATCHv2 2/3] perf tools: Add callchain order support for libunwind  DWARF unwinder "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 10:50 +0100
      [tip:perf/core] perf callchain:   Add order support for libunwind DWARF unwinder tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-11-26 09:20 +0100

csiph-web