-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profiler for blocked IpcReceiver::recv() #20132
Conversation
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @metajack (or someone else) soon. |
Heads up! This PR modifies the following files:
|
Yes, replacing all the users would be really useful! |
89b183d
to
1c16ec2
Compare
@jdm - I've gone ahead and replaced calls to |
Ping @jdm |
From my point of view, the more we use this API, the more confident we can be that we're actually noticing the biggest offenders. That being said, if you would prefer to merge the changes that you've made so far, we can also continue changing other channels in followup PRs. |
@jdm - if you have suggestions or guidelines for components that I should check for, I can go in and change those. Otherwise, for now, I'd prefer to merge this. |
@nakul02 What if we used |
Also, I bet we could write a test for this functionality in https://github.com/servo/servo/blob/master/tests/unit/profile/time.rs. Something like:
|
@jdm - I've added a test, but can't figure out why its failing for the life of me. This is the output from its failure:
In this PR, there is a new enum type in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look great!
tests/unit/profile/time.rs
Outdated
assert_eq!(val_profile_receiver, 43); | ||
|
||
let (sender, receiver) = ipc::channel().unwrap(); | ||
thread::spawn(move || { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to create a new thread here.
Hmm. Unfortunately, this is probably hitting a know bug in ipc-channel that we haven't been able to track down yet. Is there any change if you clone the channel before passing it as an argument? |
Ping @jdm |
There are many more updates to Cargo.lock than this change requires. Did you run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the Cargo.lock changes, this looks great!
☔ The latest upstream changes (presumably #20228) made this pull request unmergeable. Please resolve the merge conflicts. |
Thanks @jdm! |
@bors-servo r+ |
📌 Commit ac40d61 has been approved by |
Profiler for blocked IpcReceiver::recv() <!-- Please describe your changes on the following line: --> Implements feature #19223 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #19223 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> WIP. @jdm - this is the new profiler : "Blocked at IPC Receive" Should I dig through all the calls to `ipc::channel` and replace them with this profiled `IpcReceiver`? ![screenshot from 2018-02-27 01-35-37](https://user-images.githubusercontent.com/5394361/36721061-b46edea4-1b5e-11e8-91d6-7faba742f237.png) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20132) <!-- Reviewable:end -->
@bors-servo r+ |
📌 Commit 7d4e2b1 has been approved by |
@jdm - is there a way to just cause |
Profiler for blocked IpcReceiver::recv() <!-- Please describe your changes on the following line: --> Implements feature #19223 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #19223 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> WIP. @jdm - this is the new profiler : "Blocked at IPC Receive" Should I dig through all the calls to `ipc::channel` and replace them with this profiled `IpcReceiver`? ![screenshot from 2018-02-27 01-35-37](https://user-images.githubusercontent.com/5394361/36721061-b46edea4-1b5e-11e8-91d6-7faba742f237.png) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20132) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
Implements feature #19223
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsWIP.
@jdm - this is the new profiler : "Blocked at IPC Receive"
Should I dig through all the calls to
ipc::channel
and replace them with this profiledIpcReceiver
?This change is