summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-03-03 15:16:37 -0800
committerBrian Carlstrom <bdc@google.com>2014-03-04 16:53:15 -0800
commit2ec6520d57479d393bffa05defa1479b25ca8382 (patch)
tree6f5266b53e335c7bf74b52905f64435dd114a18f /runtime
parente6031e6fefc8f439b44e284b8563c790ef764c68 (diff)
downloadart-2ec6520d57479d393bffa05defa1479b25ca8382.zip
art-2ec6520d57479d393bffa05defa1479b25ca8382.tar.gz
art-2ec6520d57479d393bffa05defa1479b25ca8382.tar.bz2
Support compiler filters for boot classpath
image_writer.cc Remove assumption that all methods in the boot classpath are compiled oat_writer.cc Don't skip writing ArtMethod::quick_code_offset_ for methods that need resolution, leave that to ImageWriter dex2oat.cc Allow dex2dex compilation of image dex files by making the in memory pages writable in all cases, not just app case. oatdump.cc dump new OatHeader fields use ImageSpace.GetImageFilename, not command line image filename, since location may be in dalvik-cache remove inaccurate check about non-null GC map quick_trampoline_entrypoints.cc add and improve some DCHECKS that were useful while debugging class_linker.cc image_space.cc fix double facepalm parsed_options.cc fix zygote logging to not skip values to two part options like -classpath <foo> runtime.cc wireup parsed compiler options to runtime Change-Id: Iad314df0b80623c0663d61713d5098297ab9ac87
Diffstat (limited to 'runtime')
-rw-r--r--runtime/class_linker.cc2
-rw-r--r--runtime/entrypoints/quick/quick_trampoline_entrypoints.cc7
-rw-r--r--runtime/gc/space/image_space.cc2
-rw-r--r--runtime/parsed_options.cc6
-rw-r--r--runtime/runtime.cc3
5 files changed, 14 insertions, 6 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index e5ca721..7e43994 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -581,7 +581,7 @@ bool ClassLinker::GenerateOatFile(const char* dex_filename,
argv.push_back(oat_fd_option);
argv.push_back(oat_location_option);
const std::vector<std::string>& compiler_options = Runtime::Current()->GetCompilerOptions();
- for (size_t i = 0; compiler_options.size(); ++i) {
+ for (size_t i = 0; i < compiler_options.size(); ++i) {
argv.push_back(compiler_options[i].c_str());
}
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index ef40be8..63e0d42 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -485,9 +485,11 @@ extern "C" uint64_t artQuickToInterpreterBridge(mirror::ArtMethod* method, Threa
ThrowAbstractMethodError(method);
return 0;
} else {
+ DCHECK(!method->IsNative()) << PrettyMethod(method);
const char* old_cause = self->StartAssertNoThreadSuspension("Building interpreter shadow frame");
MethodHelper mh(method);
const DexFile::CodeItem* code_item = mh.GetCodeItem();
+ DCHECK(code_item != nullptr) << PrettyMethod(method);
uint16_t num_regs = code_item->registers_size_;
void* memory = alloca(ShadowFrame::ComputeSize(num_regs));
ShadowFrame* shadow_frame(ShadowFrame::Create(num_regs, NULL, // No last shadow coming from quick.
@@ -507,7 +509,7 @@ extern "C" uint64_t artQuickToInterpreterBridge(mirror::ArtMethod* method, Threa
// Ensure static method's class is initialized.
SirtRef<mirror::Class> sirt_c(self, method->GetDeclaringClass());
if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(sirt_c, true, true)) {
- DCHECK(Thread::Current()->IsExceptionPending());
+ DCHECK(Thread::Current()->IsExceptionPending()) << PrettyMethod(method);
self->PopManagedStackFragment(fragment);
return 0;
}
@@ -766,7 +768,8 @@ extern "C" const void* artQuickResolutionTrampoline(mirror::ArtMethod* called,
const void* code = NULL;
if (LIKELY(!thread->IsExceptionPending())) {
// Incompatible class change should have been handled in resolve method.
- CHECK(!called->CheckIncompatibleClassChange(invoke_type));
+ CHECK(!called->CheckIncompatibleClassChange(invoke_type))
+ << PrettyMethod(called) << " " << invoke_type;
if (virtual_or_interface) {
// Refine called method based on receiver.
CHECK(receiver != nullptr) << invoke_type;
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
index 98d4eef..8426fab 100644
--- a/runtime/gc/space/image_space.cc
+++ b/runtime/gc/space/image_space.cc
@@ -87,7 +87,7 @@ static bool GenerateImage(const std::string& image_file_name, std::string* error
}
const std::vector<std::string>& compiler_options = Runtime::Current()->GetImageCompilerOptions();
- for (size_t i = 0; compiler_options.size(); ++i) {
+ for (size_t i = 0; i < compiler_options.size(); ++i) {
arg_vector.push_back(compiler_options[i].c_str());
}
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 765074a..b6f36b6 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -186,10 +186,12 @@ bool ParsedOptions::Parse(const Runtime::Options& options, bool ignore_unrecogni
profile_clock_source_ = kDefaultProfilerClockSource;
for (size_t i = 0; i < options.size(); ++i) {
- const std::string option(options[i].first);
if (true && options[0].first == "-Xzygote") {
- LOG(INFO) << "option[" << i << "]=" << option;
+ LOG(INFO) << "option[" << i << "]=" << options[i].first;
}
+ }
+ for (size_t i = 0; i < options.size(); ++i) {
+ const std::string option(options[i].first);
if (StartsWith(option, "-help")) {
Usage(nullptr);
return false;
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 7546729..de06fb8 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -490,6 +490,9 @@ bool Runtime::Init(const Options& raw_options, bool ignore_unrecognized) {
default_stack_size_ = options->stack_size_;
stack_trace_file_ = options->stack_trace_file_;
+ compiler_options_ = options->compiler_options_;
+ image_compiler_options_ = options->image_compiler_options_;
+
max_spins_before_thin_lock_inflation_ = options->max_spins_before_thin_lock_inflation_;
monitor_list_ = new MonitorList;