Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upprofile: Make the time and memory profilers run over IPC. #6629
Conversation
hoppipolla-critic-bot
commented
Jul 15, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/5552 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
What follows is me trying to understand all this... Let's call the memory profiler thread "M". Old scheme: each thread, T, that does memory reporting has a Sender that New scheme: each thread, T, that does memory reporting has an auxiliary In both schemes we require a thread-specific intermediary to convert the generic Is there any way to use the type system to instead share the generic event That's probably not possible, but it seems a shame to have an extra reporting Reviewed 14 of 14 files at r1. components/layout/layout_task.rs, line 311 [r1] (raw file): components/profile_traits/mem.rs, line 53 [r1] (raw file): components/profile_traits/mem.rs, line 68 [r1] (raw file): Comments from the review on Reviewable.io |
|
The reason for the threads right now is that it's impossible to select over in-process channels and IPC channels simultaneously. That means that we always need at least one thread to watch for IPC messages and route them to the proper place, much like Gecko has an IPC thread. |
|
I should compose a better response to your comment after I've fully digested it, @nnethercote, but note that in the future we may be able to This may not help very much, though, as most tasks have to select over a combination of in-process and IPC channels. |
|
I wonder if a workable solution might be to have a generic, per-process IPC-channel-to-sender router that |
|
Where does the 64 channel limitation come from? select() has the ability to handle thousands of fds, though it is limited. |
|
WFMO has a limitation of 64 on W |
|
WFMO has a limitation of 64 on Windows. You can't use select over named pipes there. |
|
The future is now. I've upgraded r? @nnethercote |
|
or r? @jdm, either one |
|
This looks good except you haven't addressed my three small comments from my previous review. |
|
|
99ef514
to
7493dfa
|
Rebased and updated per comments. |
|
Reviewed 6 of 6 files at r2. components/profile_traits/mem.rs, line 59 [r3] (raw file): Comments from the review on Reviewable.io |
|
r=me |
|
@bors-servo: r=nnethercote |
|
|
profile: Make the time and memory profilers run over IPC. Uses a couple of extra threads to work around the lack of cross-process boxed trait objects. r? @nnethercote <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6629) <!-- Reviewable:end -->
|
|
|
|
? |
|
@bors-servo: r=jdm |
|
|
profile: Make the time and memory profilers run over IPC. Uses a couple of extra threads to work around the lack of cross-process boxed trait objects. r? @nnethercote <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6629) <!-- Reviewable:end -->
|
|
|
We have two WPT failures here. One is the image onload stuff and another is a timeout that turned into a crash. My theory for the latter is that it is a case of e10s perturbing the timing causing a preexisting crash to manifest sooner. I will try to verify that locally. For the former, we know that these tests never really worked right to begin with and depending on the timing of image vs document onload will succeed or fail. I will first try to adjust the expectations and if that continues to fail I will ignore the tests. OK, @jdm? |
|
Oh, and if my theory for the former is correct, then I will adjust the test expectations and/or ignore as appropriate. |
|
@bors-servo retry |
|
|
|
|
Uses the `Router` abstraction inside `ipc-channel` to avoid spawning new threads.
|
@bors-servo: r=jdm |
|
|
profile: Make the time and memory profilers run over IPC. Uses a couple of extra threads to work around the lack of cross-process boxed trait objects. r? @nnethercote <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6629) <!-- Reviewable:end -->
pcwalton commentedJul 15, 2015
Uses a couple of extra threads to work around the lack of cross-process
boxed trait objects.
r? @nnethercote