aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/ChangeLog
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-10-27 16:05:06 +0100
committerYao Qi <yao.qi@linaro.org>2016-10-27 16:05:06 +0100
commit89342618773b64db3e67701c0cd9dd89cdbbc18a (patch)
treee7a7b8dd281ece32061593580d7c8b6cf382cfa5 /gdb/gdbserver/ChangeLog
parente3652c8460a6247f50e24deaca1c1c1c0e2a2573 (diff)
downloadgdb-89342618773b64db3e67701c0cd9dd89cdbbc18a.zip
gdb-89342618773b64db3e67701c0cd9dd89cdbbc18a.tar.gz
gdb-89342618773b64db3e67701c0cd9dd89cdbbc18a.tar.bz2
Get pending events in random
Nowadays, we select events to be reported to GDB in random, however that is not enough when many GDBserver internal events (not reported to GDB) are generated. GDBserver pulls all events out of kernel via waitpid, and leave them pending. When goes through threads which have pending events, GDBserver uses find_inferior to find the first thread which has pending event, and consumes it. Note that find_inferior always iterate threads in a fixed order. If multiple threads keep hitting GDBserver breakpoints, range stepping with single-step breakpoint for example, threads in the head of the thread list are more likely to be processed and threads in the tail are starved. This causes some timeout fails in gdb.threads/non-stop-fair-events.exp when range stepping is enabled on arm-linux. This patch fixes this issue by randomly selecting pending events. It adds a new function find_inferior_in_random, which iterates threads which have pending events randomly. gdb/gdbserver: 2016-10-27 Yao Qi <yao.qi@linaro.org> * inferiors.c (find_inferior_in_random): New function. * inferiors.h (find_inferior_in_random): Declare. * linux-low.c (linux_wait_for_event_filtered): Call find_inferior_in_random instead of find_inferior.
Diffstat (limited to 'gdb/gdbserver/ChangeLog')
-rw-r--r--gdb/gdbserver/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index d43a96a..c6bc016 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,12 @@
2016-10-27 Yao Qi <yao.qi@linaro.org>
+ * inferiors.c (find_inferior_in_random): New function.
+ * inferiors.h (find_inferior_in_random): Declare.
+ * linux-low.c (linux_wait_for_event_filtered): Call
+ find_inferior_in_random instead of find_inferior.
+
+2016-10-27 Yao Qi <yao.qi@linaro.org>
+
* linux-low.c (linux_wait_1): If single-step breakpoints are
inserted, remove them.