From 53cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3c Mon Sep 17 00:00:00 2001 From: Alex Light Date: Thu, 12 Jun 2014 11:26:29 -0700 Subject: Add patchoat tool to Art. Add a new executable called patchoat to art. This tool takes already compiled images and oat files and changes their base address, acting as a cheap form of relocation. Add a --include-patch-information flag to dex2oat and code to add required patch information to oat files created with the quick compiler. Bug: 15358152 Change-Id: Ie0c580db45bb14ec180deb84930def6c3628d97d --- compiler/driver/compiler_options.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'compiler/driver/compiler_options.h') diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index fb3341ba71..92b2feeb7f 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -43,6 +43,7 @@ class CompilerOptions { static const size_t kDefaultNumDexMethodsThreshold = 900; static constexpr double kDefaultTopKProfileThreshold = 90.0; static const bool kDefaultIncludeDebugSymbols = kIsDebugBuild; + static const bool kDefaultIncludePatchInformation = false; CompilerOptions() : compiler_filter_(kDefaultCompilerFilter), @@ -52,6 +53,7 @@ class CompilerOptions { tiny_method_threshold_(kDefaultTinyMethodThreshold), num_dex_methods_threshold_(kDefaultNumDexMethodsThreshold), generate_gdb_information_(false), + include_patch_information_(kDefaultIncludePatchInformation), top_k_profile_threshold_(kDefaultTopKProfileThreshold), include_debug_symbols_(kDefaultIncludeDebugSymbols), explicit_null_checks_(true), @@ -69,6 +71,7 @@ class CompilerOptions { size_t tiny_method_threshold, size_t num_dex_methods_threshold, bool generate_gdb_information, + bool include_patch_information, double top_k_profile_threshold, bool include_debug_symbols, bool explicit_null_checks, @@ -85,6 +88,7 @@ class CompilerOptions { tiny_method_threshold_(tiny_method_threshold), num_dex_methods_threshold_(num_dex_methods_threshold), generate_gdb_information_(generate_gdb_information), + include_patch_information_(include_patch_information), top_k_profile_threshold_(top_k_profile_threshold), include_debug_symbols_(include_debug_symbols), explicit_null_checks_(explicit_null_checks), @@ -188,6 +192,10 @@ class CompilerOptions { return generate_gdb_information_; } + bool GetIncludePatchInformation() const { + return include_patch_information_; + } + private: CompilerFilter compiler_filter_; size_t huge_method_threshold_; @@ -196,6 +204,7 @@ class CompilerOptions { size_t tiny_method_threshold_; size_t num_dex_methods_threshold_; bool generate_gdb_information_; + bool include_patch_information_; // When using a profile file only the top K% of the profiled samples will be compiled. double top_k_profile_threshold_; bool include_debug_symbols_; -- cgit v1.2.3-59-g8ed1b