helper: improve windows gdb pipe performance 50/1050/2
authorSpencer Oliver <spen@spen-soft.co.uk>
Wed, 12 Dec 2012 15:42:01 +0000 (15:42 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 24 Dec 2012 11:01:03 +0000 (11:01 +0000)
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
src/helper/replacements.c

index 583e6162a862bc606104cf433e72da68310e029c..0ba98a488e6ea43bb4fcabed1cdc8101ec8a9112 100644 (file)
@@ -206,10 +206,11 @@ int win_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct time
                        aexcept = sock_except;
 
                        tvslice.tv_sec = 0;
-                       tvslice.tv_usec = 100000;
+                       tvslice.tv_usec = 1000;
 
                        retcode = select(sock_max_fd + 1, &aread, &awrite, &aexcept, &tvslice);
                }
+
                if (n_handles > 0) {
                        /* check handles */
                        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,
                                        handles,
                                        FALSE,
-                                       retcode > 0 ? 0 : 100,
+                                       retcode > 0 ? 0 : 1,
                                        QS_ALLEVENTS);
 
                        if (wret == WAIT_TIMEOUT) {

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)