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
Integrate with simple Heartbeats #7179
Conversation
I expect this review to be an iterative process, so I will continue with bug fixes and improvements until you ask for a code freeze, at which point I'll squash. |
Does this work on other platforms? I'm especially concerned about 32-bit Android. There are instructions to build at: https://github.com/servo/servo/wiki/Building-for-Android Reviewed 7 of 8 files at r1, 1 of 1 files at r2, 6 of 6 files at r3. components/profile/heartbeats.rs, line 16 [r1] (raw file): Comments from the review on Reviewable.io |
☔ The latest upstream changes (presumably #7243) made this pull request unmergeable. Please resolve the merge conflicts. |
d764dba
to
595a9d7
Compare
Review status: 3 of 8 files reviewed at latest revision, all discussions resolved, all commit checks successful. components/profile/heartbeats.rs, line 16 [r1] (raw file): Comments from the review on Reviewable.io |
I've tested this locally with an android toolchain and it compiles. I haven't tried to run it in an emulator though. |
Reviewed 5 of 5 files at r4. Comments from the review on Reviewable.io |
@bors-servo r+ |
📌 Commit 595a9d7 has been approved by |
595a9d7
to
4a6cdf0
Compare
4a6cdf0
to
054cbf2
Compare
@bors-servo: r=larsbergstrom |
📌 Commit 054cbf2 has been approved by |
Integrate with simple Heartbeats This PR adds Heartbeats capability to servo. Heartbeats are used for detailed performance and power/energy profiling. We will add the power/energy readings in the future. New dependencies are introduced which need in-depth reviews. I'm the only one who has had eyes on any of this, and I have limited resources for testing cross-platform compatibility. * https://github.com/libheartbeats/heartbeats-simple - provides native C libraries from a shared code base: * hbs[-static] - performance monitoring * hbs-acc[-static] - performance with accuracy monitoring * hbs-pow[-static] - performance with power/energy monitoring (the one we're using) * hbs-acc-pow[-static] - performance with accuracy and power/energy monitoring * https://github.com/connorimes/heartbeats-simple-sys provides rust wrappers for the native C libraries above - one crate for each + a common crate. These link with the *-static versions of the heartbeats libraries. * https://github.com/connorimes/heartbeats-simple-rust provides rust abstractions over the -sys crates above - one crate for each. The new `heartbeats` module in the `profile` crate looks for environment variables telling it to use heartbeats for each ProfilerCategory and where to put log files. (Of course, if somebody knows how to iterate over the enum instead of hardcoding each one, that would be fantastic.) If the environment variables aren't set for particular categories, heartbeats aren't created or used. An interface change is made in the `profile_traits` crate to pass both the start and end time in a `ProfilerMsg` instead of just the elapsed time. Later we will add energy readings as well. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7179) <!-- Reviewable:end -->
This PR adds Heartbeats capability to servo. Heartbeats are used for detailed performance and power/energy profiling. We will add the power/energy readings in the future.
New dependencies are introduced which need in-depth reviews. I'm the only one who has had eyes on any of this, and I have limited resources for testing cross-platform compatibility.
The new
heartbeats
module in theprofile
crate looks for environment variables telling it to use heartbeats for each ProfilerCategory and where to put log files. (Of course, if somebody knows how to iterate over the enum instead of hardcoding each one, that would be fantastic.) If the environment variables aren't set for particular categories, heartbeats aren't created or used.An interface change is made in the
profile_traits
crate to pass both the start and end time in aProfilerMsg
instead of just the elapsed time. Later we will add energy readings as well.