From dbfe254f5ca96f6c5b2284478597d6140c01a394 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 25 Nov 2014 22:21:42 -0800 Subject: ART: Print initialization failures to file Add the ability to print boot image initialization failures to a file. Add a tool to convert said file into a Graphviz file. Change-Id: Iedcc337bdf05654c154aa553236f20bdd15572ee --- compiler/driver/compiler_driver.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 2e9f8355f2..57f38abf5b 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -1820,6 +1820,12 @@ static void InitializeClass(const ParallelCompilationManager* manager, size_t cl mirror::Throwable* exception = soa.Self()->GetException(&throw_location); VLOG(compiler) << "Initialization of " << descriptor << " aborted because of " << exception->Dump(); + std::ostream* file_log = manager->GetCompiler()-> + GetCompilerOptions().GetInitFailureOutput(); + if (file_log != nullptr) { + *file_log << descriptor << "\n"; + *file_log << exception->Dump() << "\n"; + } soa.Self()->ClearException(); transaction.Abort(); CHECK_EQ(old_status, klass->GetStatus()) << "Previous class status not restored"; -- cgit v1.2.3-59-g8ed1b