Profiler directed clean-up of dex2oat.
Fix bad usage of std::string in: the verifier and compiler driver method
arguments, causing unnecessary boxing and allocations; in creating a symbol for
the dex compilation unit, that is only used in portable builds; in pattern
matching for intrinsics by name.
Make class linker dex and classes locks reader/writer to allow concurrent
dex cache or class querying. Refactor ComputeCompilingMethodsClass to pass in a
dex cache hint, to avoid taking any locks when the dex file of the compiling
method matches that of the field or method being resolved.
Make the RegType's HasClass method virtual to avoid frequent virtual method
dispatch. Make RegTypeCache GetFromId inlinable.
Various other bits of whitespace and formatting clean-up.
Change-Id: Id152e1e5a6fed2961dad0b612b7aa0c48001ef94
diff --git a/src/verifier/method_verifier.cc b/src/verifier/method_verifier.cc
index 1b2d9f3..a7d26bb 100644
--- a/src/verifier/method_verifier.cc
+++ b/src/verifier/method_verifier.cc
@@ -955,9 +955,9 @@
const std::vector<uint8_t>* dex_gc_map = CreateLengthPrefixedDexGcMap(*(map.get()));
verifier::MethodVerifier::SetDexGcMap(ref, *dex_gc_map);
- MethodVerifier::PcToConreteMethod* pc_to_conrete_method = GenerateDevirtMap();
- if(pc_to_conrete_method != NULL ) {
- SetDevirtMap(ref, pc_to_conrete_method);
+ MethodVerifier::PcToConcreteMethod* pc_to_concrete_method = GenerateDevirtMap();
+ if(pc_to_concrete_method != NULL ) {
+ SetDevirtMap(ref, pc_to_concrete_method);
}
return true;
}
@@ -3160,7 +3160,7 @@
*log2_max_gc_pc = i;
}
-MethodVerifier::PcToConreteMethod* MethodVerifier::GenerateDevirtMap() {
+MethodVerifier::PcToConcreteMethod* MethodVerifier::GenerateDevirtMap() {
// It is risky to rely on reg_types for sharpening in cases of soft
// verification, we might end up sharpening to a wrong implementation. Just abort.
@@ -3168,7 +3168,7 @@
return NULL;
}
- UniquePtr<PcToConreteMethod> pc_to_concrete_method(new PcToConreteMethod());
+ UniquePtr<PcToConcreteMethod> pc_to_concrete_method(new PcToConcreteMethod());
uint32_t dex_pc = 0;
const uint16_t* insns = code_item_->insns_ ;
const Instruction* inst = Instruction::At(insns);
@@ -3338,7 +3338,7 @@
CHECK(GetDexGcMap(ref) != NULL);
}
-void MethodVerifier::SetDevirtMap(CompilerDriver::MethodReference ref, const PcToConreteMethod* devirt_map) {
+void MethodVerifier::SetDevirtMap(CompilerDriver::MethodReference ref, const PcToConcreteMethod* devirt_map) {
MutexLock mu(Thread::Current(), *devirt_maps_lock_);
DevirtualizationMapTable::iterator it = devirt_maps_->find(ref);
@@ -3371,7 +3371,7 @@
}
// Look up the PC in the map, get the concrete method to execute and return its reference.
- MethodVerifier::PcToConreteMethod::const_iterator pc_to_concrete_method = it->second->find(dex_pc);
+ MethodVerifier::PcToConcreteMethod::const_iterator pc_to_concrete_method = it->second->find(dex_pc);
if(pc_to_concrete_method != it->second->end()) {
return &(pc_to_concrete_method->second);
} else {