Allow emitting Gecko profiler labels and stack categories from Rust code (All Rust threads currently marked as non-idle)
Categories
(Core :: Gecko Profiler, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: mstange, Assigned: canova)
References
(Blocks 2 open bugs)
Details
Attachments
(11 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
At the moment, Rust threads such as the RenderBackend thread look entirely gray in the activity graph: https://share.firefox.dev/2Ookimx
That's because we currently don't have a way to instrument Rust code with Gecko Profiler labels and categories. We should add a way to do that.
Does https://searchfox.org/mozilla-central/source/servo/components/style/gecko/profiler.rs do most of the work already? We'd need a way to import the list of categories into Rust.
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Bindgen will be needed for gecko_profiler::is_active gecko_profiler_label API
in this patch, as well as the marker API that will land after this.
Assignee | ||
Comment 3•3 years ago
|
||
This is both an API on its own and a prerequisite for profiling label frame
API.
Depends on D120789
Assignee | ||
Comment 4•3 years ago
|
||
Previously ProfilingCategoryList.h was a central place for profiling
categories. But with this patch, profiling_categories.yaml becomes the
canonical place for it and the macro header file is being generated
automatically. This is needed to make the profiling categories in sync with
Rust and C++.
Depends on D120790
Assignee | ||
Comment 5•3 years ago
|
||
Generate the user friendly Rust enums and their impls for profiling categories.
Depends on D120791
Assignee | ||
Comment 6•3 years ago
|
||
Depends on D120792
Assignee | ||
Comment 7•3 years ago
|
||
This is a syntactic sugar for gecko_profiler_label
API. When you use this
macro on top of a function, it will automatically expand the function content
with gecko_profiler_label
macro call.
Depends on D120793
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D120794
Assignee | ||
Comment 9•3 years ago
|
||
This was being used when we had special code for gecko profiler in the servo
codebase but we just removed the last one. This is safe to remove now. The
"enabled" feature in the gecko-profiler crate is being controlled by
gkrust-shared directly now.
Depends on D120795
Assignee | ||
Comment 10•3 years ago
|
||
Depends on D120796
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Pushed by canaltinova@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c076bfb09873 Add bindgen build step to gecko-profiler API crate r=emilio https://hg.mozilla.org/integration/autoland/rev/02f1242c8d1c Add gecko_profiler::is_active API for Rust r=emilio,gerald https://hg.mozilla.org/integration/autoland/rev/1b2cf2dc3696 Autogenerate ProfilingCategoryList.h with profiling_categories.yaml r=emilio,gerald https://hg.mozilla.org/integration/autoland/rev/771f07bccfc3 Autogenerate profiling_categories.rs with profiling_categories.yaml r=gerald,emilio https://hg.mozilla.org/integration/autoland/rev/74250675f2f6 Add gecko_profiler_label API for adding label frames from Rust code r=emilio,gerald https://hg.mozilla.org/integration/autoland/rev/7f764bd9b66c Add gecko_profiler_fn_label proc-macro API as an alternative r=emilio https://hg.mozilla.org/integration/autoland/rev/83d89dc9f835 Remove the old profiler label frames code in the servo codebase and replace it with the new API r=emilio https://hg.mozilla.org/integration/autoland/rev/99031ce526ea Remove the unused "gecko_profiler" feature from servo r=emilio https://hg.mozilla.org/integration/autoland/rev/775e8b8e89d0 Add the gecko-profiler crate to rust clippy lint task r=emilio
Comment 12•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c076bfb09873
https://hg.mozilla.org/mozilla-central/rev/02f1242c8d1c
https://hg.mozilla.org/mozilla-central/rev/1b2cf2dc3696
https://hg.mozilla.org/mozilla-central/rev/771f07bccfc3
https://hg.mozilla.org/mozilla-central/rev/74250675f2f6
https://hg.mozilla.org/mozilla-central/rev/7f764bd9b66c
https://hg.mozilla.org/mozilla-central/rev/83d89dc9f835
https://hg.mozilla.org/mozilla-central/rev/99031ce526ea
https://hg.mozilla.org/mozilla-central/rev/775e8b8e89d0
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/01a6d80e5357 Remove unused function. r=canaltinova
Comment 15•3 years ago
|
||
bugherder |
Comment 16•3 years ago
|
||
Comment 17•3 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3f915b657ad9 Also remove some unused imports.
Comment 18•3 years ago
|
||
This makes build specifying
mk_add_options MOZ_MAKE_FLAGS="-j3"
fail!
Comment 19•3 years ago
|
||
OOps i meant
mk_add_options MOZ_MAKE_FLAGS="-j1"
Comment 20•3 years ago
|
||
bugherder |
Description
•