This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/17683] New: 'record full' is unusably slow


https://sourceware.org/bugzilla/show_bug.cgi?id=17683

            Bug ID: 17683
           Summary: 'record full' is unusably slow
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: ajax at redhat dot com

Consider the following testcase, which uses X's -pogo option to initialize a
server as far as the main loop and then immediately exit:

------
dmt:~/git/xserver% cat cmds
break main
commands
record full        
cont
end
set record full stop-at-limit off
run -ac -pogo -screen 0 1024x768x24 :77
quit
dmt:~/git/xserver% time gdb -x cmds ./hw/vfb/Xvfb
Reading symbols from ./hw/vfb/Xvfb...done.
Breakpoint 1 at 0x421610: file stubmain.c, line 34.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, main (argc=7, argv=0x7fffffffe0e8, envp=0x7fffffffe128)
    at stubmain.c:34
34        return dix_main(argc, argv, envp);

[New Thread 0x7ffff4f9a700 (LWP 18172)]
[New Thread 0x7ffff4799700 (LWP 18282)]
[New Thread 0x7ffff3f98700 (LWP 18283)]
[New Thread 0x7ffff3797700 (LWP 18284)]

Process record does not support instruction 0xc5 at address 0x3ddf738fef.
Process record: failed to record execution log.

[Thread 0x7ffff7fca9c0 (LWP 16748)] #1 stopped.
__strcasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:153
153        movdqa    LABEL(belowupper)(%rip), %xmm4
A debugging session is active.

    Inferior 1 [process 16748] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
gdb -q -x cmds ./hw/vfb/Xvfb  887.99s user 1570.16s system 106% cpu 38:20.05
total
------

For comparison, running that without gdb:

dmt:~/git/xserver% time ./hw/vfb/Xvfb -ac -pogo -screen 0 1024x768x24 :78
./hw/vfb/Xvfb -ac -pogo -screen 0 1024x768x24 :78  0.04s user 0.01s system 97%
cpu 0.045 total

So we've gone from 50 milliseconds to 38 minutes, an overhead factor of at
least 46000 (since the avx crash there means we didn't actually run all the way
to the end of main()).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]