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
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 4c1408a..8d41595 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -345,8 +345,9 @@
std::unordered_set<std::string>* compiled_classes,
std::unordered_set<std::string>* compiled_methods,
size_t thread_count, bool dump_stats, bool dump_passes,
- const std::string& dump_cfg_file_name, CumulativeLogger* timer,
- int swap_fd, const std::string& profile_file)
+ const std::string& dump_cfg_file_name, bool dump_cfg_append,
+ CumulativeLogger* timer, int swap_fd,
+ const std::string& profile_file)
: swap_space_(swap_fd == -1 ? nullptr : new SwapSpace(swap_fd, 10 * MB)),
swap_space_allocator_(new SwapAllocator<void>(swap_space_.get())),
profile_present_(false), compiler_options_(compiler_options),
@@ -372,6 +373,7 @@
dump_stats_(dump_stats),
dump_passes_(dump_passes),
dump_cfg_file_name_(dump_cfg_file_name),
+ dump_cfg_append_(dump_cfg_append),
timings_logger_(timer),
compiler_context_(nullptr),
support_boot_image_fixup_(instruction_set != kMips && instruction_set != kMips64),
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
index b229184..11e782f 100644
--- a/compiler/driver/compiler_driver.h
+++ b/compiler/driver/compiler_driver.h
@@ -99,7 +99,7 @@
std::unordered_set<std::string>* compiled_classes,
std::unordered_set<std::string>* compiled_methods,
size_t thread_count, bool dump_stats, bool dump_passes,
- const std::string& dump_cfg_file_name,
+ const std::string& dump_cfg_file_name, bool dump_cfg_append,
CumulativeLogger* timer, int swap_fd,
const std::string& profile_file);
@@ -426,6 +426,10 @@
return dump_cfg_file_name_;
}
+ bool GetDumpCfgAppend() const {
+ return dump_cfg_append_;
+ }
+
CumulativeLogger* GetTimingsLogger() const {
return timings_logger_;
}
@@ -667,6 +671,7 @@
bool dump_stats_;
const bool dump_passes_;
const std::string dump_cfg_file_name_;
+ const bool dump_cfg_append_;
CumulativeLogger* const timings_logger_;