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 upIntegrate with simple Heartbeats #7179
Conversation
highfive
commented
Aug 12, 2015
|
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 |
|
|
|
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+ |
|
|
|
@bors-servo: r=larsbergstrom |
|
|
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 -->
connorimes commentedAug 12, 2015
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
heartbeatsmodule in theprofilecrate 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_traitscrate to pass both the start and end time in aProfilerMsginstead of just the elapsed time. Later we will add energy readings as well.