summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-11-27 00:06:30 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-11-27 00:06:30 +0000
commitbd6bb37c377e78aeafb4faf9acd70efbcbc62d30 (patch)
treef098642047c7a88bddc0ea941fd8fdfa98e3b940
parent7939a254e79834746fc52827c6bc0667f098e7db (diff)
parentcd195fe131842ad9ca7909203d479d325feaf9dd (diff)
downloadandroid_art-bd6bb37c377e78aeafb4faf9acd70efbcbc62d30.tar.gz
android_art-bd6bb37c377e78aeafb4faf9acd70efbcbc62d30.tar.bz2
android_art-bd6bb37c377e78aeafb4faf9acd70efbcbc62d30.zip
Merge "Add a way to change the IMT size"
-rw-r--r--build/Android.common_build.mk8
-rw-r--r--runtime/mirror/class.h6
2 files changed, 13 insertions, 1 deletions
diff --git a/build/Android.common_build.mk b/build/Android.common_build.mk
index 7d34daef98..c6e2b95599 100644
--- a/build/Android.common_build.mk
+++ b/build/Android.common_build.mk
@@ -220,6 +220,14 @@ art_cflags := \
# -Wmissing-declarations \
+
+ifdef ART_IMT_SIZE
+ art_cflags += -DIMT_SIZE=$(ART_IMT_SIZE)
+else
+ # Default is 64
+ art_cflags += -DIMT_SIZE=64
+endif
+
ifeq ($(ART_SMALL_MODE),true)
art_cflags += -DART_SMALL_MODE=1
endif
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index a77972efc5..56867dd319 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -29,6 +29,10 @@
#include "read_barrier_option.h"
#include "utils.h"
+#ifndef IMT_SIZE
+#error IMT_SIZE not defined
+#endif
+
namespace art {
struct ClassOffsets;
@@ -58,7 +62,7 @@ class MANAGED Class FINAL : public Object {
// Interface method table size. Increasing this value reduces the chance of two interface methods
// colliding in the interface method table but increases the size of classes that implement
// (non-marker) interfaces.
- static constexpr size_t kImtSize = 64;
+ static constexpr size_t kImtSize = IMT_SIZE;
// imtable entry embedded in class object.
struct MANAGED ImTableEntry {