helper: improve windows gdb pipe performance
Reducing the select and MsgWaitForMultipleObjects timeouts to 1ms makes a 2-300+% increase in the step time of gdb when using pipes under windows OS. Change-Id: Id7e52cfb2b206347a9caea61672885a3e2b186de Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1050 Tested-by: jenkins
This commit is contained in:
parent
0466ee7e4a
commit
95025349fa
|
@ -206,10 +206,11 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time
|
||||||
aexcept = sock_except;
|
aexcept = sock_except;
|
||||||
|
|
||||||
tvslice.tv_sec = 0;
|
tvslice.tv_sec = 0;
|
||||||
tvslice.tv_usec = 100000;
|
tvslice.tv_usec = 1000;
|
||||||
|
|
||||||
retcode = select(sock_max_fd + 1, &aread, &awrite, &aexcept, &tvslice);
|
retcode = select(sock_max_fd + 1, &aread, &awrite, &aexcept, &tvslice);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n_handles > 0) {
|
if (n_handles > 0) {
|
||||||
/* check handles */
|
/* check handles */
|
||||||
DWORD wret;
|
DWORD wret;
|
||||||
|
@ -217,7 +218,7 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time
|
||||||
wret = MsgWaitForMultipleObjects(n_handles,
|
wret = MsgWaitForMultipleObjects(n_handles,
|
||||||
handles,
|
handles,
|
||||||
FALSE,
|
FALSE,
|
||||||
retcode > 0 ? 0 : 100,
|
retcode > 0 ? 0 : 1,
|
||||||
QS_ALLEVENTS);
|
QS_ALLEVENTS);
|
||||||
|
|
||||||
if (wret == WAIT_TIMEOUT) {
|
if (wret == WAIT_TIMEOUT) {
|
||||||
|
|
Loading…
Reference in New Issue