am ec5683a4: am a7e8919e: am 2e250c82: Revert "Always enable lock level checks."
* commit 'ec5683a4c79c3df6bec9329e59999bbc1e4a636a':
Revert "Always enable lock level checks."
diff --git a/compiler/dex/portable/mir_to_gbc.cc b/compiler/dex/portable/mir_to_gbc.cc
index 90cec75..7831cf6 100644
--- a/compiler/dex/portable/mir_to_gbc.cc
+++ b/compiler/dex/portable/mir_to_gbc.cc
@@ -1972,7 +1972,7 @@
::llvm::OwningPtr< ::llvm::tool_output_file> out_file(
new ::llvm::tool_output_file(fname.c_str(), errmsg,
- ::llvm::sys::fs::F_Binary));
+ ::llvm::raw_fd_ostream::F_Binary));
if (!errmsg.empty()) {
LOG(ERROR) << "Failed to create bitcode output file: " << errmsg;
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc
index 29963fe..014c51e 100644
--- a/compiler/elf_writer_quick.cc
+++ b/compiler/elf_writer_quick.cc
@@ -661,7 +661,7 @@
return false;
}
- LOG(INFO) << "ELF file written successfully: " << elf_file_->GetPath();
+ VLOG(compiler) << "ELF file written successfully: " << elf_file_->GetPath();
return true;
}
diff --git a/compiler/llvm/llvm_compilation_unit.cc b/compiler/llvm/llvm_compilation_unit.cc
index 7542b84..9296fc7 100644
--- a/compiler/llvm/llvm_compilation_unit.cc
+++ b/compiler/llvm/llvm_compilation_unit.cc
@@ -214,6 +214,7 @@
::llvm::TargetOptions target_options;
target_options.FloatABIType = ::llvm::FloatABI::Soft;
target_options.NoFramePointerElim = true;
+ target_options.NoFramePointerElimNonLeaf = true;
target_options.UseSoftFloat = false;
target_options.EnableFastISel = false;
@@ -257,7 +258,7 @@
::llvm::OwningPtr< ::llvm::tool_output_file> out_file(
new ::llvm::tool_output_file(bitcode_filename_.c_str(), errmsg,
- ::llvm::sys::fs::F_Binary));
+ ::llvm::raw_fd_ostream::F_Binary));
if (!errmsg.empty()) {
@@ -277,6 +278,7 @@
// pm_builder.Inliner = ::llvm::createAlwaysInlinerPass();
// pm_builder.Inliner = ::llvm::createPartialInliningPass();
pm_builder.OptLevel = 3;
+ pm_builder.DisableSimplifyLibCalls = 1;
pm_builder.DisableUnitAtATime = 1;
pm_builder.populateFunctionPassManager(fpm);
pm_builder.populateModulePassManager(pm);
diff --git a/runtime/native/java_lang_Runtime.cc b/runtime/native/java_lang_Runtime.cc
index e380c17..55575cf 100644
--- a/runtime/native/java_lang_Runtime.cc
+++ b/runtime/native/java_lang_Runtime.cc
@@ -28,6 +28,10 @@
namespace art {
static void Runtime_gc(JNIEnv*, jclass) {
+ if (Runtime::Current()->IsExplicitGcDisabled()) {
+ LOG(INFO) << "Explicit GC skipped.";
+ return;
+ }
Runtime::Current()->GetHeap()->CollectGarbage(false);
}
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index a30403d..aaae300 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -72,6 +72,7 @@
: is_compiler_(false),
is_zygote_(false),
is_concurrent_gc_enabled_(true),
+ is_explicit_gc_disabled_(false),
default_stack_size_(0),
heap_(NULL),
monitor_list_(NULL),
@@ -346,6 +347,7 @@
parsed->is_zygote_ = false;
parsed->interpreter_only_ = false;
parsed->is_concurrent_gc_enabled_ = true;
+ parsed->is_explicit_gc_disabled_ = false;
parsed->lock_profiling_threshold_ = 0;
parsed->hook_is_sensitive_thread_ = NULL;
@@ -516,6 +518,8 @@
LOG(WARNING) << "Ignoring unknown -Xgc option: " << gc_options[i];
}
}
+ } else if (option == "-XX:+DisableExplicitGC") {
+ parsed->is_explicit_gc_disabled_ = true;
} else if (StartsWith(option, "-verbose:")) {
std::vector<std::string> verbose_options;
Split(option.substr(strlen("-verbose:")), ',', verbose_options);
@@ -827,6 +831,7 @@
is_compiler_ = options->is_compiler_;
is_zygote_ = options->is_zygote_;
is_concurrent_gc_enabled_ = options->is_concurrent_gc_enabled_;
+ is_explicit_gc_disabled_ = options->is_explicit_gc_disabled_;
compiler_filter_ = options->compiler_filter_;
huge_method_threshold_ = options->huge_method_threshold_;
diff --git a/runtime/runtime.h b/runtime/runtime.h
index b93ae9d..8aba762 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -99,6 +99,7 @@
bool is_zygote_;
bool interpreter_only_;
bool is_concurrent_gc_enabled_;
+ bool is_explicit_gc_disabled_;
size_t heap_initial_size_;
size_t heap_maximum_size_;
size_t heap_growth_limit_;
@@ -146,6 +147,10 @@
return is_concurrent_gc_enabled_;
}
+ bool IsExplicitGcDisabled() const {
+ return is_explicit_gc_disabled_;
+ }
+
#ifdef ART_SEA_IR_MODE
bool IsSeaIRMode() const {
return sea_ir_mode_;
@@ -405,6 +410,7 @@
bool is_compiler_;
bool is_zygote_;
bool is_concurrent_gc_enabled_;
+ bool is_explicit_gc_disabled_;
CompilerFilter compiler_filter_;
size_t huge_method_threshold_;