lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1509013496-12486-1-git-send-email-yuzhoujian@didichuxing.com>
Date:   Thu, 26 Oct 2017 18:24:56 +0800
From:   yuzhoujian <ufo19890607@...il.com>
To:     peterz@...radead.org, mingo@...hat.com,
        alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
        dsahern@...il.com, namhyung@...nel.org, milian.wolff@...b.com,
        arnaldo.melo@...il.com, yuzhoujian@...ichuxing.com,
        adrian.hunter@...el.com, wangnan0@...wei.com
Cc:     linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        acme@...hat.com
Subject: lost some call trace for sleep function

Hi, all.
I find a strange problem. Perf cannot record call stack which contains sleep functions.
The last function of the call trace is always "__GI___libc_nanosleep" for each sample.
one of the sample for perf script is below:

test_sleep 12275 185233.961287:          1 cycles:ppp: 
        ffffffff8100add0 intel_bts_enable_local ([kernel.kallsyms])
        ffffffff81008f20 intel_pmu_enable_all ([kernel.kallsyms])
        ffffffff810057ec x86_pmu_enable ([kernel.kallsyms])
        ffffffff81173e57 perf_pmu_enable ([kernel.kallsyms])
        ffffffff81175404 __perf_event_task_sched_in ([kernel.kallsyms])
        ffffffff810c1aa8 finish_task_switch ([kernel.kallsyms])
        ffffffff81690e00 __schedule ([kernel.kallsyms])
        ffffffff81691409 schedule ([kernel.kallsyms])
        ffffffff816902d6 do_nanosleep ([kernel.kallsyms])
        ffffffff810b747b hrtimer_nanosleep ([kernel.kallsyms])
        ffffffff810b75be sys_nanosleep ([kernel.kallsyms])
        ffffffff8169c749 system_call_fastpath ([kernel.kallsyms])
		   bf190 __GI___libc_nanosleep (/usr/lib64/libc-2.17.so)

Below is the source code of test_sleep:

void f2()
{
        sleep(1);
}
void f1()
{
        f2();
}
int main()
{
  	while(1)
     		f1();
   	return 0;
}

I think the right call stack should contain the __sleep function in glibc, just as follow

test_sleep 12275 185233.961287:          1 cycles:ppp: 
        ffffffff8100add0 intel_bts_enable_local ([kernel.kallsyms])
        ffffffff81008f20 intel_pmu_enable_all ([kernel.kallsyms])
        ffffffff810057ec x86_pmu_enable ([kernel.kallsyms])
        ffffffff81173e57 perf_pmu_enable ([kernel.kallsyms])
        ffffffff81175404 __perf_event_task_sched_in ([kernel.kallsyms])
        ffffffff810c1aa8 finish_task_switch ([kernel.kallsyms])
        ffffffff81690e00 __schedule ([kernel.kallsyms])
        ffffffff81691409 schedule ([kernel.kallsyms])
        ffffffff816902d6 do_nanosleep ([kernel.kallsyms])
        ffffffff810b747b hrtimer_nanosleep ([kernel.kallsyms])
        ffffffff810b75be sys_nanosleep ([kernel.kallsyms])
        ffffffff8169c749 system_call_fastpath ([kernel.kallsyms])
		   bf190 __GI___libc_nanosleep (/usr/lib64/libc-2.17.so)
		   bef70 __sleep (/usr/lib64/libc-2.17.so)
        	   5a1 f2 (/home/test_sleep)
        	   5c1 f1 (/home/test_sleep)
        	   5d1 main (/home/test_sleep)
        	   21c05 __libc_start_main (/usr/lib64/libc-2.17.so)

Is it a bug for perf record ??

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ