* [Qemu-devel] gdbstub chews cpu due to nonblocking socket mode
@ 2011-01-24 8:09 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2011-01-24 8:09 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-24 8:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-24 8:09 [Qemu-devel] gdbstub chews cpu due to nonblocking socket mode Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).