From 866c03125a3fcd74c9fff04da87865f5eb1767d9 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Tue, 13 Jan 2015 21:21:31 +0000 Subject: ART: dex2oat flag for HGraphVisualizer dump file This patch adds a new '--dump-cfg=' flag to dex2oat which specifies the file that HGraphVisualizer will store its output into. Until now the graph was dumped to 'art.cfg' in the current working directory. To make Checker work with run-test, the output directory needs to be customizable. Change-Id: I4a940f7708b88deea5a0e51d13aed13e52199349 --- compiler/optimizing/optimizing_compiler.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 692d452f54..eaecbb04ae 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -149,11 +149,12 @@ void OptimizingCompiler::Init() { // Enable C1visualizer output. Must be done in Init() because the compiler // driver is not fully initialized when passed to the compiler's constructor. CompilerDriver* driver = GetCompilerDriver(); - if (driver->GetDumpPasses()) { + const std::string cfg_file_name = driver->GetDumpCfgFileName(); + if (!cfg_file_name.empty()) { 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("art.cfg")); + visualizer_output_.reset(new std::ofstream(cfg_file_name)); } } -- cgit v1.2.3-59-g8ed1b