[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] gdbstub chews cpu due to nonblocking socket mode
From: |
Mike Frysinger |
Subject: |
[Qemu-devel] gdbstub chews cpu due to nonblocking socket mode |
Date: |
Mon, 24 Jan 2011 03:09:32 -0500 |
i'm not sure if someone has brought this up before (i cant find
anything in the archives), but using the gdbstub with qemu seems to
cause quite a bit of useless cpu chewing.
in gdbstub.c:gdb_accept(), after the connection has been established, we see:
fcntl(fd, F_SETFL, O_NONBLOCK);
then, when the gdb connection is idle (the process is stopped, and gdb
is waiting for input from the user), the main polling loop in
gdb_handlesig() will call read() over and over again as fast as
possible and thus eat a cpu.
is there any need for this to be nonblocking ? ive commented out that
one line and have yet to notice a problem during my development (using
singlestep, breakpoints, continue, etc...).
-mike
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] gdbstub chews cpu due to nonblocking socket mode,
Mike Frysinger <=