From 87000a948524cba7538ccc5438f6a9ecbd4e347e Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Mon, 24 Aug 2015 15:34:44 +0100 Subject: Add option to append to the cfg dump. This makes life easier when verifying tests with unresolved classes (which call dex2oat at rutime). Change-Id: I7985b2b7c0f343462e03a26b8395297c810b1d95 --- compiler/optimizing/optimizing_compiler.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 44214606c0..4d1a1adf92 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -333,7 +333,9 @@ void OptimizingCompiler::Init() { CHECK_EQ(driver->GetThreadCount(), 1U) << "Graph visualizer requires the compiler to run single-threaded. " << "Invoke the compiler with '-j1'."; - visualizer_output_.reset(new std::ofstream(cfg_file_name)); + std::ios_base::openmode cfg_file_mode = + driver->GetDumpCfgAppend() ? std::ofstream::app : std::ofstream::out; + visualizer_output_.reset(new std::ofstream(cfg_file_name, cfg_file_mode)); } if (driver->GetDumpStats()) { compilation_stats_.reset(new OptimizingCompilerStats()); -- cgit v1.2.3-59-g8ed1b