Closed Bug 1505908 Opened 2 years ago Closed 2 years ago
Give stylo rust code the ability to push and pop profiler label frames
47 bytes, text/x-phabricator-request
|Details | Review|
Bug 1500692 is adding subcategory support for profiler label frames, but those currently can't be used from rust code, which is unfortunate, see https://phabricator.services.mozilla.com/D11341#inline-48093 : > Adding separate labels for property cascading / selector matching / style > invalidation would be useful, though those are on the rust side, so not sure > how easy to add they are. Is there any plan to add profiler support to rust > code? This bug is about adding this capability. I'm not sure how it should be done. Should we expose the full category enum to rust? How should we set up the bindings to do the actual pushing and popping of the profiler labels? Should those be callback functions which are registered dynamically by Gecko during Stylo initialization?
Bindgen already understands enums and such for a lot of Gecko code, and runs after the export phase, so getting the enums there may not be the biggest issue... If adding some FFI functions for the profiler to push and pop is not too hard, I'm happy to take a look and hook the bindings up.
(In reply to Emilio Cobos Álvarez (:emilio) from comment #1) > If adding some FFI functions for the profiler to push and pop is not too > hard, I'm happy to take a look and hook the bindings up. Here's what Gecko's RAII object for profiler labels does: https://searchfox.org/mozilla-central/rev/17f55aee76b7c4610a974cffd3453454e0c8de7b/tools/profiler/public/GeckoProfiler.h#795-807,822-855 Should be simple enough to wrap in binding functions.
Over to the queue :)
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/23396874909f Add Gecko profiler labels for when the style threads are doing work. r=emilio
Assignee: nobody → cam
You need to log in before you can comment on or make changes to this bug.