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 upWebgl profiling #22130
Webgl profiling #22130
Conversation
highfive
commented
Nov 6, 2018
|
Heads up! This PR modifies the following files:
|
highfive
commented
Nov 6, 2018
|
|
0f0bd72
to
0898440
|
r? @nox |
|
|
|
Is there really no way to avoid all those new categories? |
| @@ -1703,3 +1711,147 @@ fn map_dot_separated<F: Fn(&str, &mut String)>(s: &str, f: F) -> String { | |||
| } | |||
| mapped | |||
| } | |||
|
|
|||
| fn profiler_category(webgl_command: &WebGLCommand) -> ProfilerCategory { | |||
This comment has been minimized.
This comment has been minimized.
nox
Nov 21, 2018
Member
This could be generated with a macro wrapping this function and the definition of WebGLCommand.
|
There’s no good way to avoid adding new categories since we have to strip away any associated data from the WebGLCommand. I suppose we could use a macro to generate a new enum that is the same as WebGLCommand but without any associated data |
2336380
to
8cf7313
2168060
to
142256b
|
Sorry had some git issues... |
| @@ -157,6 +157,145 @@ impl Formattable for ProfilerCategory { | |||
| ProfilerCategory::IpcReceiver => "Blocked at IPC Receive", | |||
| ProfilerCategory::IpcBytesReceiver => "Blocked at IPC Bytes Receive", | |||
| ProfilerCategory::ApplicationHeartbeat => "Application Heartbeat", | |||
| ProfilerCategory::WebGlGetContextAttributes => "WebGlGetContextAttributes", | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cbrewster
Feb 15, 2019
Author
Member
We could just do a Derive(Debug) here, but we would lose the + and | + formatting for subcategories. Although we could just derive debug, and then just manually add the prefix to the few categories that need them. The output would be like IpcReceiver rather than Blocked at IPC Receive though.
| use syn::{Data, DeriveInput, Fields, Ident, Lit, Meta, MetaNameValue}; | ||
|
|
||
| #[proc_macro_derive(ToProfile, attributes(profile_prefix))] | ||
| pub fn derive_to_profile(item: proc_macro::TokenStream) -> proc_macro::TokenStream { |
This comment has been minimized.
This comment has been minimized.
Manishearth
Feb 11, 2019
Member
please add some comments explaining the transformation being made here
|
|
Remove mozjs dep from malloc_size_of. This makes making local changes to mozjs_sys much more frustrating than it should be, and blocks merging #22130. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23299) <!-- Reviewable:end -->
Remove mozjs dep from malloc_size_of. This makes making local changes to mozjs_sys much more frustrating than it should be, and blocks merging #22130. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23299) <!-- Reviewable:end -->
|
I don't have the time at the moment to fix this up, sorry for blocking this so long |
cbrewster commentedNov 6, 2018
•
edited by SimonSapin
This adds additional profiling for WebGL commands and some WebGL DOM APIs using the existing profiling infrastructure.
I don't really like adding a ton of new profiling category variants, but it seemed like the simplest approach given how signpost works with
repr[u32]and using a bitwise shift for the event category and how characterize.py works../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is