From 6cf49e57ad7a61e1fffd5b1dfae9179c3ca5703d Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 5 Mar 2015 13:08:45 -0800 Subject: ART: Add option to abort dex2oat on hard failure Add an option that aborts dex2oat when a hard verifier failure occurs. Bug: 19606409 Change-Id: I53195284e22fe6207274101e85745af763c06271 --- dex2oat/dex2oat.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dex2oat/dex2oat.cc') diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index c080453..8572f4d 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -492,6 +492,7 @@ class Dex2Oat FINAL { bool include_debug_symbols = kIsDebugBuild; bool watch_dog_enabled = true; bool generate_gdb_information = kIsDebugBuild; + bool abort_on_hard_verifier_error = false; PassManagerOptions pass_manager_options; @@ -732,6 +733,8 @@ class Dex2Oat FINAL { if (swap_fd_ < 0) { Usage("--swap-fd passed a negative value %d", swap_fd_); } + } else if (option == "--abort-on-hard-verifier-error") { + abort_on_hard_verifier_error = true; } else { Usage("Unknown argument %s", option.data()); } @@ -941,7 +944,8 @@ class Dex2Oat FINAL { nullptr : &verbose_methods_, new PassManagerOptions(pass_manager_options), - init_failure_output_.get())); + init_failure_output_.get(), + abort_on_hard_verifier_error)); // Done with usage checks, enable watchdog if requested if (watch_dog_enabled) { -- cgit v1.1