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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110406175217.GC4987@ghostprotocols.net>
Date:	Wed, 6 Apr 2011 14:52:17 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Tim Blechmann <tim@...ngt.org>
Cc:	David Ahern <dsahern@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [2.6.39-rc2] perf top fails to mmap

Em Wed, Apr 06, 2011 at 09:20:53AM -0600, David Ahern escreveu:
> 
> 
> On 04/06/11 04:51, Tim Blechmann wrote:
> > hi all,
> > 
> > when trying to profile a process with `perf top -p $PID', perf exits with:
> > Failed to mmap with 22 (Invalid argument)
> 
> Works fine for me with latest kernel tree (this morning). Short lived
> process?
> 
> David
> 
> > 
> > this happens when running perf as the same process as the process and when 
> > running perf as root.

yep, works for me as well:

[acme@...lia ~]$ cat vsyscall.c 
#include <time.h>

int main(void)
{
        struct timespec t;
        //int i;
        //for(i = 0; i < 10000000; i++)
        while (1) {
                clock_gettime(CLOCK_MONOTONIC, &t);
		usleep(10);
	}
        return 0;
}
[acme@...lia ~]$ cc -lrt vsyscall.c -o vsyscall
[acme@...lia ~]$ ./vsyscall &
[acme@...lia linux]$ perf top -p `pidof vsyscall` -F 10000
PerfTop:  230 irqs/sec  kernel:88.3%  exact:  0.0% [10000Hz cycles],  (target_pid: 2728)
----------------------------------------------------------------------------------------

             samples  pcnt function             DSO
             _______ _____ ____________________ ____________________

               21.00 44.7% __nanosleep_nocancel /lib64/libc-2.12.so 
               13.00 27.7% usleep               /lib64/libc-2.12.so 
                6.00 12.8% __GI_clock_gettime   /lib64/librt-2.12.so
                6.00 12.8% main                 /home/acme/vsyscall
^C
[acme@...lia linux]$ su -
Password: 
[root@...lia ~]# perf top -p `pidof vsyscall` -F 10000 --hide_kernel_symbols
PerfTop:     428 irqs/sec  kernel:90.2%  exact:  0.0% [10000Hz cycles],  (target_pid: 2728)
-------------------------------------------------------------------------------------------

             samples  pcnt function             DSO
             _______ _____ ____________________ ____________________

               15.00 29.4% __nanosleep_nocancel /lib64/libc-2.12.so 
               14.00 27.5% usleep               /lib64/libc-2.12.so 
                9.00 17.6% __GI_clock_gettime   /lib64/librt-2.12.so
                8.00 15.7% main                 /home/acme/vsyscall 
^C
[root@...lia ~]#

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ