-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Create a new DiagnosticsLogging struct as part of Opts #40863
Copy link
Copy link
Closed
Description
Instead of the somewhat fuzzily-defined DebugOpts, let's create a first-class ServoDiagnostics struct for Opts (components/config/opts.rs). This structure would only be responsible for enabling optional log statements in order to help diagnose problems with Servo. It would be controllable via environment variables, like env_logger.
Steps:
- Move
DebugOpts::disable_share_style_cachetoPrefs::layout_style_sharing_cache_enabledand ensure it is enabled by default and the one use of this variable is inverted. The reasoning here is that this is the one member ofDebugOptsthat isn't about turning on optional print statements. - Rename
DebugOptstoDiagnosticsLogging. - Add an environment variable parser that activates as part of the
Defaultimplementation forDiagnosticsLogging, but disabled for production builds. This should read an equivalent configuration fromSERVO_DIAGNOSTICSconfiguration variable. Whenhelpis in the string, it should print the help and exit the program. - Expose the parser via a helper function and use it to parse the
-Zcommand-line argument. - Add good documentation for each variable and rename them all to make sense together probably getting rid of the
dumpterminology. - Consider removing
profile_script_eventsfor our own trace profiling on the methods inScriptThread. This is already configurable via Servo logging AFAIK.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels