diff options
| author | 2013-07-02 14:17:23 -0700 | |
|---|---|---|
| committer | 2013-07-02 14:17:23 -0700 | |
| commit | 2010a6004fb083eb4109c21886fce6ee65abda33 (patch) | |
| tree | 59182eeeadcb3d9926fd4fb1e355a70e15fde079 /src | |
| parent | 0b4e3ef67508a0b8c121b6b26ab5ea0a1d8e7141 (diff) | |
Disable -Xjnigreflimit: in art too.
Bug: 7903975
Change-Id: I1ec552b35331227ecd7dc3d0a2f0507b1c24e375
Diffstat (limited to 'src')
| -rw-r--r-- | src/jni_internal.cc | 11 | ||||
| -rw-r--r-- | src/jni_internal.h | 1 | ||||
| -rw-r--r-- | src/runtime.cc | 4 | ||||
| -rw-r--r-- | src/runtime.h | 3 |
4 files changed, 4 insertions, 15 deletions
diff --git a/src/jni_internal.cc b/src/jni_internal.cc index e457edcd8f..50b28b8d7e 100644 --- a/src/jni_internal.cc +++ b/src/jni_internal.cc @@ -62,17 +62,10 @@ static const size_t kPinTableInitial = 16; // Arbitrary. static const size_t kPinTableMax = 1024; // Arbitrary sanity check. static size_t gGlobalsInitial = 512; // Arbitrary. -static size_t gGlobalsMax = 51200; // Arbitrary sanity check. +static size_t gGlobalsMax = 51200; // Arbitrary sanity check. (Must fit in 16 bits.) static const size_t kWeakGlobalsInitial = 16; // Arbitrary. -static const size_t kWeakGlobalsMax = 51200; // Arbitrary sanity check. - -void SetJniGlobalsMax(size_t max) { - if (max != 0) { - gGlobalsMax = max; - gGlobalsInitial = std::min(gGlobalsInitial, gGlobalsMax); - } -} +static const size_t kWeakGlobalsMax = 51200; // Arbitrary sanity check. (Must fit in 16 bits.) static jweak AddWeakGlobalReference(ScopedObjectAccess& soa, Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { diff --git a/src/jni_internal.h b/src/jni_internal.h index dc6ca4af52..7b43f95cb3 100644 --- a/src/jni_internal.h +++ b/src/jni_internal.h @@ -48,7 +48,6 @@ class Libraries; class ScopedObjectAccess; class Thread; -void SetJniGlobalsMax(size_t max); void JniAbortF(const char* jni_function_name, const char* fmt, ...) __attribute__((__format__(__printf__, 2, 3))); void RegisterNativeMethods(JNIEnv* env, const char* jni_class_name, const JNINativeMethod* methods, diff --git a/src/runtime.cc b/src/runtime.cc index 3a528a125e..e5fb46fa5b 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -345,7 +345,6 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b parsed->interpreter_only_ = false; parsed->is_concurrent_gc_enabled_ = true; - parsed->jni_globals_max_ = 0; parsed->lock_profiling_threshold_ = 0; parsed->hook_is_sensitive_thread_ = NULL; @@ -535,7 +534,7 @@ Runtime::ParsedOptions* Runtime::ParsedOptions::Create(const Options& options, b } } } else if (StartsWith(option, "-Xjnigreflimit:")) { - parsed->jni_globals_max_ = ParseIntegerOrDie(option); + // Silently ignored for backwards compatibility. } else if (StartsWith(option, "-Xlockprofthreshold:")) { parsed->lock_profiling_threshold_ = ParseIntegerOrDie(option); } else if (StartsWith(option, "-Xstacktracefile:")) { @@ -791,7 +790,6 @@ bool Runtime::Init(const Options& raw_options, bool ignore_unrecognized) { QuasiAtomic::Startup(); - SetJniGlobalsMax(options->jni_globals_max_); Monitor::Init(options->lock_profiling_threshold_, options->hook_is_sensitive_thread_); host_prefix_ = options->host_prefix_; diff --git a/src/runtime.h b/src/runtime.h index 0b893a341d..31b3a1b4c8 100644 --- a/src/runtime.h +++ b/src/runtime.h @@ -63,7 +63,7 @@ class Runtime { public: typedef std::vector<std::pair<std::string, const void*> > Options; - // In small mode, apps with fewer than this number of methods will be compiled + // In small mode, apps with fewer than this number of methods will be compiled // anyways. // TODO: come up with a reasonable default. static const size_t kDefaultSmallModeMethodThreshold = 0; @@ -96,7 +96,6 @@ class Runtime { size_t heap_max_free_; double heap_target_utilization_; size_t stack_size_; - size_t jni_globals_max_; size_t lock_profiling_threshold_; std::string stack_trace_file_; bool method_trace_; |