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 upMove script profiling to profile/profile_traits crates #7514
Comments
|
The original motivation of the script profiling was to get a sense of where script tasks in particular are spending their time during periods of slow script responsiveness. This also allows us quite a bit of granularity, so I have vague concerns about merging that in with the higher level profiling for all the rest of the code. Am I needlessly worried? |
|
Are you concerned about performance overhead or just separation of granularities? Some of the categories currently in the profiler seem pretty fine-grained, e.g. If we think a better structure and separation of categories is needed, that's OK, but I think they should still be centrally located. This supports better consistency in profiling behavior and less code maintenance. Also, having a single place to look for profiling data should make life easier for those of us interested in analyzing it. |
|
It's the separation of granularities that matters to me. |
Combine script profiling with profile crates. Fixes #7514. The script crate had its own built-in profiling which was basically doing the same thing as the profile crate. This wraps the internal profiling around the main profile functionality. Script-related tasks are now added to the ProfilerCategory enum. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7547) <!-- Reviewable:end -->
Combine script profiling with profile crates. Fixes #7514. The script crate had its own built-in profiling which was basically doing the same thing as the profile crate. This wraps the internal profiling around the main profile functionality. Script-related tasks are now added to the ProfilerCategory enum. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7547) <!-- Reviewable:end -->
Profiling was recently added for
scripttasks. To better understand how servo is behaving on the whole, this should probably be centralized with other profiling capabilities in theprofile/profile_traitscrates.The
profile_eventfunction itself can probably be dropped as well and just use theprofilefunction inprofile_traits. If you need to access total time for an event (as it does now), enabling heartbeats for the category will track this.@benschulz