Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Issue 9332003: Use epoll for the event handler on Linux. (Closed)

Created:
8 years, 10 months ago by Mads Ager (google)
Modified:
8 years, 10 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Use epoll for the event handler on Linux. epoll is faster than poll and we avoid iterating all potential file descriptors all the time. R=sgjesse@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=3980

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -115 lines) Patch
M runtime/bin/eventhandler_linux.h View 1 7 chunks +11 lines, -13 lines 0 comments Download
M runtime/bin/eventhandler_linux.cc View 1 11 chunks +120 lines, -102 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (google)
8 years, 10 months ago (2012-02-06 18:25:58 UTC) #1
Søren Gjesse
lgtm LGTM Nice that the structure is almost exactly the same as before. https://chromiumcodereview.appspot.com/9332003/diff/1/runtime/bin/eventhandler_linux.cc File ...
8 years, 10 months ago (2012-02-07 07:54:12 UTC) #2
Mads Ager (google)
8 years, 10 months ago (2012-02-07 08:09:34 UTC) #3
https://chromiumcodereview.appspot.com/9332003/diff/1/runtime/bin/eventhandle...
File runtime/bin/eventhandler_linux.cc (right):

https://chromiumcodereview.appspot.com/9332003/diff/1/runtime/bin/eventhandle...
runtime/bin/eventhandler_linux.cc:216: // Update epoll instance if needed.
On 2012/02/07 07:54:12, Søren Gjesse wrote:
> Can't this be moved into the else block above and then we can get rid of the
the
> continue? It s only in the else block the event mask is changed as far as I
can
> see.

Closing for read and closing for write also has an effect on the events that we
poll for. The 'continue' is not nice. I have explicitly put the
UpdateEpollInstance calls in the branches where it is needed and removed the
'continue'.

https://chromiumcodereview.appspot.com/9332003/diff/1/runtime/bin/eventhandle...
File runtime/bin/eventhandler_linux.h (right):

https://chromiumcodereview.appspot.com/9332003/diff/1/runtime/bin/eventhandle...
runtime/bin/eventhandler_linux.h:115: int epoll_fd;
On 2012/02/07 07:54:12, Søren Gjesse wrote:
> Missing trailing underscore.

Done.

Powered by Google App Engine
This is Rietveld 408576698