summaryrefslogtreecommitdiffstats
path: root/compiler/driver/compiler_options.h
diff options
context:
space:
mode:
authorDave Allison <dallison@google.com>2014-02-19 14:05:39 -0800
committerDave Allison <dallison@google.com>2014-04-04 16:07:46 -0700
commit754ddad084ccb610d0cf486f6131bdc69bae5bc6 (patch)
tree18d8314f3f6760b035c2bcda7760782ad4f0e0bf /compiler/driver/compiler_options.h
parent97a332b4476d5a2b4ad0650dacc6bfcff882fc57 (diff)
downloadart-754ddad084ccb610d0cf486f6131bdc69bae5bc6.zip
art-754ddad084ccb610d0cf486f6131bdc69bae5bc6.tar.gz
art-754ddad084ccb610d0cf486f6131bdc69bae5bc6.tar.bz2
Use trampolines for calls to helpers
This is an ARM specific optimization to the compiler that uses trampoline islands to make calls to runtime helper functions. The intention is to reduce the size of the generated code (by 2 bytes per call) without affecting performance. By default this is on when generating an OAT file. It is off when compiling to memory. To switch this off in dex2oat, use the command line option: --no-helper-trampolines Enhances disassembler to print the trampoline entry on the BL instruction like this: 0xb6a850c0: f7ffff9e bl -196 (0xb6a85000) ; pTestSuspend Bug: 12607709 Change-Id: I9202bdb7cf21252ad807bd48701f1f6ce8e3d0fe
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r--compiler/driver/compiler_options.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 20c6bc8..52248a6 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -50,7 +50,8 @@ class CompilerOptions {
small_method_threshold_(kDefaultSmallMethodThreshold),
tiny_method_threshold_(kDefaultTinyMethodThreshold),
num_dex_methods_threshold_(kDefaultNumDexMethodsThreshold),
- generate_gdb_information_(false)
+ generate_gdb_information_(false),
+ generate_helper_trampolines_(false)
#ifdef ART_SEA_IR_MODE
, sea_ir_mode_(false)
#endif
@@ -62,7 +63,8 @@ class CompilerOptions {
size_t small_method_threshold,
size_t tiny_method_threshold,
size_t num_dex_methods_threshold,
- bool generate_gdb_information
+ bool generate_gdb_information,
+ bool generate_helper_trampolines
#ifdef ART_SEA_IR_MODE
, bool sea_ir_mode
#endif
@@ -73,7 +75,8 @@ class CompilerOptions {
small_method_threshold_(small_method_threshold),
tiny_method_threshold_(tiny_method_threshold),
num_dex_methods_threshold_(num_dex_methods_threshold),
- generate_gdb_information_(generate_gdb_information)
+ generate_gdb_information_(generate_gdb_information),
+ generate_helper_trampolines_(generate_helper_trampolines)
#ifdef ART_SEA_IR_MODE
, sea_ir_mode_(sea_ir_mode)
#endif
@@ -140,6 +143,10 @@ class CompilerOptions {
return generate_gdb_information_;
}
+ bool GenerateHelperTrampolines() const {
+ return generate_helper_trampolines_;
+ }
+
private:
CompilerFilter compiler_filter_;
size_t huge_method_threshold_;
@@ -148,6 +155,7 @@ class CompilerOptions {
size_t tiny_method_threshold_;
size_t num_dex_methods_threshold_;
bool generate_gdb_information_;
+ bool generate_helper_trampolines_;
#ifdef ART_SEA_IR_MODE
bool sea_ir_mode_;