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


Groups > linux.kernel > #1271915

Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling taken at 'callq' instruction

From "Wangnan (F)" <wangnan0@huawei.com>
Newsgroups linux.kernel
Subject Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling taken at 'callq' instruction
Date 2015-11-18 09:20 +0100
Message-ID <qw68a-jO-27@gated-at.bofh.it> (permalink)
References <qw5lL-8cX-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 2015/11/18 15:20, Wangnan (F) wrote:
> Hi all,
>
> When analysising Jiri's patchset [1] I found a dwarf unwind problem.
> On x86 platform, when sample is at a 'callq' instruction, dwarf based
> stack unwind always fail.
>
> I compile a small C source file with debug information, turn off
> frame pointer and disable optimization:
>
> $ gcc -g -O0 -fomit-frame-pointer ./test_dwarf_unwind.c -o 
> ./test_dwarf_unwind

For whom want to test it: here is the test code I used.

#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>

static volatile int x = 0;

int funcc(void)
{
     struct timeval tv1, tv2;
     unsigned long us1, us2;

     gettimeofday(&tv1, NULL);

     us1 = tv1.tv_sec * 1000000 + tv1.tv_usec;

     while(1) {
         x = x + 100;
         gettimeofday(&tv2, NULL);
         us2 = tv2.tv_sec * 1000000 + tv2.tv_usec;
         if (us2 - us1 >= 3000000)
             break;
     }
     return x;
}
int funcb(void) { return funcc();}
int funca(void) { return funcb();}
int main() { funca(); return 0;}



--
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

[BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 08:30 +0100
  Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 09:20 +0100
    Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction Ingo Molnar <mingo@kernel.org> - 2015-11-18 09:30 +0100
      Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 10:00 +0100
        Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction Ingo Molnar <mingo@kernel.org> - 2015-11-19 07:40 +0100
          Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-19 07:50 +0100
            Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction Ingo Molnar <mingo@kernel.org> - 2015-11-19 11:30 +0100
              Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-19 11:50 +0100
                Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction Peter Zijlstra <peterz@infradead.org> - 2015-11-19 12:30 +0100
              Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction Peter Zijlstra <peterz@infradead.org> - 2015-11-19 12:30 +0100
                Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction Ingo Molnar <mingo@kernel.org> - 2015-11-27 09:40 +0100
                Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction Peter Zijlstra <peterz@infradead.org> - 2015-11-30 10:30 +0100
      Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 10:10 +0100
  Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction Jiri Olsa <jolsa@redhat.com> - 2015-11-18 09:50 +0100
    Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling  taken at 'callq' instruction "Wangnan (F)" <wangnan0@huawei.com> - 2015-11-18 10:20 +0100

csiph-web