summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnwar Ghuloum <anwarg@google.com>2013-05-10 13:24:54 -0700
committerAnwar Ghuloum <anwarg@google.com>2013-05-10 13:24:54 -0700
commitc44f68fb6a6d55c0df28dd05b93d8906ec20bd08 (patch)
treefc4ac69b301b7461d285f440730909555fca1809 /src
parent2c6de22d6dcdc6fe1a065480582989e15a47fcb5 (diff)
downloadandroid_art-c44f68fb6a6d55c0df28dd05b93d8906ec20bd08.tar.gz
android_art-c44f68fb6a6d55c0df28dd05b93d8906ec20bd08.tar.bz2
android_art-c44f68fb6a6d55c0df28dd05b93d8906ec20bd08.zip
Fixed Android.common.mk #define setting for small art
We were seeing things compile when they shouldn't have. This fixes it. Plus added a bit more documentation to options, set default values for the two small art related thresholds to zero. Change-Id: Id5db11962f3e30d8d4ee6b85d4cf7d6e66323adb
Diffstat (limited to 'src')
-rw-r--r--src/compiler/driver/compiler_driver.cc3
-rw-r--r--src/runtime.h9
2 files changed, 9 insertions, 3 deletions
diff --git a/src/compiler/driver/compiler_driver.cc b/src/compiler/driver/compiler_driver.cc
index 67a55f64e8..5ddd0a69bd 100644
--- a/src/compiler/driver/compiler_driver.cc
+++ b/src/compiler/driver/compiler_driver.cc
@@ -1649,11 +1649,12 @@ void CompilerDriver::CompileMethod(const DexFile::CodeItem* code_item, uint32_t
} else if (code_item->insns_size_in_code_units_ < Runtime::Current()->GetSmallModeMethodDexSizeLimit()) {
// Do compile small methods.
dont_compile = false;
+ LOG(INFO) << "Compiling a small method: " << PrettyMethod(method_idx, dex_file);
}
if (!dont_compile) {
compiled_method = (*compiler_)(*this, code_item, access_flags, invoke_type, class_def_idx,
- method_idx, class_loader, dex_file);
+ method_idx, class_loader, dex_file);
CHECK(compiled_method != NULL) << PrettyMethod(method_idx, dex_file);
}
}
diff --git a/src/runtime.h b/src/runtime.h
index 0ada0a24a5..6f03fe0d68 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -61,8 +61,13 @@ class Runtime {
public:
typedef std::vector<std::pair<std::string, const void*> > Options;
- static const size_t kDefaultSmallModeMethodThreshold = 30;
- static const size_t kDefaultSmallModeMethodDexSizeLimit = 100;
+ // In small mode, apps with fewer than this number of methods will be compiled
+ // anyways.
+ static const size_t kDefaultSmallModeMethodThreshold = 0;
+
+ // In small mode, methods smaller than this dex op count limit will get compiled
+ // anyways.
+ static const size_t kDefaultSmallModeMethodDexSizeLimit = 0;
class ParsedOptions {
public: