From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25551 invoked by alias); 10 Mar 2002 18:48:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25431 invoked from network); 10 Mar 2002 18:48:17 -0000 Received: from unknown (HELO localhost) (66.124.90.82) by sources.redhat.com with SMTP; 10 Mar 2002 18:48:17 -0000 Received: from john by localhost with local (Exim 3.35 #1 (Debian)) id 16k8LZ-0005wj-00 for ; Sun, 10 Mar 2002 10:47:05 -0800 From: John Firebaugh To: gdb@sources.redhat.com Subject: 5.1 extremely slow Date: Sun, 10 Mar 2002 10:48:00 -0000 X-Mailer: KMail [version 1.4] MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_DITRGRX9Y4A8BX5DHFAY" Message-Id: <200203101047.01780.jfirebaugh@kde.org> X-SW-Source: 2002-03/txt/msg00086.txt.bz2 --------------Boundary-00=_DITRGRX9Y4A8BX5DHFAY Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-length: 1004 Hi, I've upgraded to 5.1.1 due to bugs in 4.x, but debugging almost any program is unbearably slow. I've attached some detailed debug output; here is a summary: In the file gdb_commands I put: break main r k q Compare running the command "time strace -c gdb -x gdb_commands src/.libs/gideon" under 4.18 and 5.1.1: 4.18: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 44.44 0.153028 23 6763 ptrace real 0m4.299s user 0m2.550s sys 0m0.810s 5.1.1: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 98.07 26.668416 27 986910 ptrace real 1m9.949s user 0m20.750s sys 0m40.540s Note the nearly 1 million calls to ptrace with 5.1: more than a hundred-fold increase compared to 4.18. If you need more detailed strace output or any other info, let me know. Thanks, John --------------Boundary-00=_DITRGRX9Y4A8BX5DHFAY Content-Type: text/plain; charset="us-ascii"; name="gdb_test" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb_test" Content-length: 6210 The contents of gdb_commands: break main r k q With gdb 4.18: john@localhost:~/src/kde/gideon$ time strace -c gdb -x gdb_commands src/.libs/gideon execve("/usr/bin/gdb", ["gdb", "-x", "gdb_commands", "src/.libs/gideon"], [/* 30 vars */]) = 0 GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-unknown-linux-gnu"...(no debugging symbols found)... Breakpoint 1 at 0x1000b034 (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... Breakpoint 1, 0x1000b034 in main () % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 44.44 0.153028 23 6763 ptrace 43.86 0.151007 214 705 read 4.84 0.016659 9 1911 brk 2.67 0.009180 656 14 write 0.96 0.003321 33 102 15 open 0.87 0.002998 35 85 munmap 0.63 0.002167 4 497 _llseek 0.48 0.001649 13 129 mmap 0.22 0.000752 4 173 fcntl64 0.17 0.000599 599 1 fork 0.17 0.000586 8 77 close 0.17 0.000580 13 43 ioctl 0.14 0.000482 4 122 rt_sigaction 0.14 0.000466 5 87 fstat64 0.11 0.000363 9 41 fstat 0.03 0.000098 25 4 1 stat 0.03 0.000091 4 26 getrusage 0.03 0.000091 9 10 wait4 0.01 0.000041 5 9 kill 0.01 0.000037 12 3 mprotect 0.01 0.000031 10 3 stat64 0.01 0.000030 15 2 getcwd 0.01 0.000019 19 1 uname 0.00 0.000014 4 4 setfsuid 0.00 0.000012 3 4 setfsgid 0.00 0.000008 4 2 getuid 0.00 0.000006 3 2 geteuid 0.00 0.000005 3 2 getgid 0.00 0.000005 3 2 getegid ------ ----------- ----------- --------- --------- ---------------- 100.00 0.344325 10824 16 total real 0m4.299s user 0m2.550s sys 0m0.810s With gdb 5.1.1: john@localhost:~/src/kde/gideon$ time strace -c gdb -x gdb_commands src/.libs/gideon execve("/usr/bin/gdb", ["gdb", "-x", "gdb_commands", "src/.libs/gideon"], [/* 30 vars */]) = 0 GNU gdb 5.1.1 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "powerpc-linux"...(no debugging symbols found)... Breakpoint 1 at 0x1000b034 (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...[New Thread 1024 (LWP 22645)] [Switching to Thread 1024 (LWP 22645)] Breakpoint 1, 0x1000b034 in main () % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 98.07 26.668416 27 986910 ptrace 1.67 0.453464 634 715 read 0.12 0.032433 21 1542 brk 0.03 0.009060 18 504 _llseek 0.03 0.007432 85 87 munmap 0.02 0.005656 354 16 write 0.02 0.004501 40 112 22 open 0.01 0.003132 17 183 rt_sigprocmask 0.01 0.001937 14 137 mmap 0.00 0.001284 51 25 11 wait4 0.00 0.000798 5 175 fcntl64 0.00 0.000737 737 1 fork 0.00 0.000699 16 44 ioctl 0.00 0.000571 7 80 close 0.00 0.000501 4 123 rt_sigaction 0.00 0.000481 5 90 fstat64 0.00 0.000302 8 40 fstat 0.00 0.000096 4 26 getrusage 0.00 0.000069 23 3 1 stat 0.00 0.000066 13 5 mprotect 0.00 0.000061 31 2 getcwd 0.00 0.000052 13 4 rt_sigsuspend 0.00 0.000050 25 2 1 access 0.00 0.000030 10 3 stat64 0.00 0.000019 19 1 uname 0.00 0.000019 19 1 poll 0.00 0.000016 5 3 kill ------ ----------- ----------- --------- --------- ---------------- 100.00 27.191882 990834 35 total real 1m9.949s user 0m20.750s sys 0m40.540s --------------Boundary-00=_DITRGRX9Y4A8BX5DHFAY--