mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Auto merge of #10329 - Manishearth:skip-backtrace, r=asajeffrey
Skip printing the backtrace for RecvError/SendError We currently get tons of useless backtraces clogging up the output when we have a panic cascade. This adds a handler that outputs a single line when a thread panics due to a sender or receiver hanging up, since this is almost always due to a panic cascade. We could add a commandline arg that gets us back the old behavior, though I'm not sure if this is necessary. r? @asajeffrey <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10329) <!-- Reviewable:end -->
This commit is contained in:
commit
05a4dcdc3b
3 changed files with 47 additions and 1 deletions
|
@ -198,6 +198,9 @@ pub struct Opts {
|
|||
|
||||
// Which rendering API to use.
|
||||
pub render_api: RenderApi,
|
||||
|
||||
// don't skip any backtraces on panic
|
||||
pub full_backtraces: bool,
|
||||
}
|
||||
|
||||
fn print_usage(app: &str, opts: &Options) {
|
||||
|
@ -285,6 +288,9 @@ pub struct DebugOptions {
|
|||
/// Use multisample antialiasing in WebRender.
|
||||
pub use_msaa: bool,
|
||||
|
||||
// don't skip any backtraces on panic
|
||||
pub full_backtraces: bool,
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -319,6 +325,7 @@ impl DebugOptions {
|
|||
"disable-vsync" => debug_options.disable_vsync = true,
|
||||
"wr-stats" => debug_options.webrender_stats = true,
|
||||
"msaa" => debug_options.use_msaa = true,
|
||||
"full-backtraces" => debug_options.full_backtraces = true,
|
||||
"" => {},
|
||||
_ => return Err(option)
|
||||
};
|
||||
|
@ -365,6 +372,7 @@ pub fn print_debug_usage(app: &str) -> ! {
|
|||
"Disable vsync mode in the compositor to allow profiling at more than monitor refresh rate");
|
||||
print_option("wr-stats", "Show WebRender profiler on screen.");
|
||||
print_option("msaa", "Use multisample antialiasing in WebRender.");
|
||||
print_option("full-backtraces", "Print full backtraces for all errors");
|
||||
|
||||
println!("");
|
||||
|
||||
|
@ -506,6 +514,7 @@ pub fn default_opts() -> Opts {
|
|||
use_msaa: false,
|
||||
render_api: DEFAULT_RENDER_API,
|
||||
profile_dir: None,
|
||||
full_backtraces: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -791,6 +800,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
|||
webrender_stats: debug_options.webrender_stats,
|
||||
use_msaa: debug_options.use_msaa,
|
||||
profile_dir: opt_match.opt_str("profile-dir"),
|
||||
full_backtraces: debug_options.full_backtraces,
|
||||
};
|
||||
|
||||
set_defaults(opts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue