Home | History | Annotate | Download | only in runtime

Lines Matching defs:method

89 static void UpdateEntrypoints(ArtMethod* method, const void* quick_code)
94 const void* old_code_ptr = method->GetEntryPointFromQuickCompiledCode();
98 code_cache->SaveCompiledCode(method, old_code_ptr);
101 method->SetEntryPointFromQuickCompiledCode(quick_code);
102 if (!method->IsResolutionMethod()) {
107 !method->IsNative() && !method->IsProxyMethod())) {
108 DCHECK(!method->IsNative()) << PrettyMethod(method);
109 DCHECK(!method->IsProxyMethod()) << PrettyMethod(method);
110 method->SetEntryPointFromInterpreter(art::artInterpreterToInterpreterBridge);
112 method->SetEntryPointFromInterpreter(art::artInterpreterToCompiledCodeBridge);
117 void Instrumentation::InstallStubsForMethod(ArtMethod* method) {
118 if (method->IsAbstract() || method->IsProxyMethod()) {
123 if (method->IsConstructor() &&
124 method->GetDeclaringClass()->DescriptorEquals("Ljava/lang/reflect/Proxy;")) {
131 bool is_class_initialized = method->GetDeclaringClass()->IsInitialized();
133 if ((forced_interpret_only_ || IsDeoptimized(method)) && !method->IsNative()) {
135 } else if (is_class_initialized || !method->IsStatic() || method->IsConstructor()) {
136 new_quick_code = class_linker->GetQuickOatCodeFor(method);
141 if ((interpreter_stubs_installed_ || forced_interpret_only_ || IsDeoptimized(method)) &&
142 !method->IsNative()) {
145 // Do not overwrite resolution trampoline. When the trampoline initializes the method's
148 if (is_class_initialized || !method->IsStatic() || method->IsConstructor()) {
152 new_quick_code = class_linker->GetQuickOatCodeFor(method);
159 UpdateEntrypoints(method, new_quick_code);
206 // This is an interpreter frame so method enter event must have been reported. However we
208 // Since we won't report method entry here, we can safely push any DEX pc.
215 LOG(INFO) << " Skipping runtime method. Frame " << GetFrameId();
286 // Create method enter events for all methods currently on the thread's stack. We only do this
326 << " Method=" << PrettyMethod(m);
351 // Create the method exit events. As the methods didn't really exit the result is 0.
587 // Restore stack only if there is no method currently deoptimized.
659 void Instrumentation::UpdateMethodsCode(ArtMethod* method, const void* quick_code) {
660 DCHECK(method->GetDeclaringClass()->IsResolved());
665 if ((interpreter_stubs_installed_ || IsDeoptimized(method)) && !method->IsNative()) {
679 UpdateEntrypoints(method, new_quick_code);
682 bool Instrumentation::AddDeoptimizedMethod(ArtMethod* method) {
683 if (IsDeoptimizedMethod(method)) {
688 deoptimized_methods_.insert(method);
692 bool Instrumentation::IsDeoptimizedMethod(ArtMethod* method) {
693 return deoptimized_methods_.find(method) != deoptimized_methods_.end();
704 bool Instrumentation::RemoveDeoptimizedMethod(ArtMethod* method) {
705 auto it = deoptimized_methods_.find(method);
717 void Instrumentation::Deoptimize(ArtMethod* method) {
718 CHECK(!method->IsNative());
719 CHECK(!method->IsProxyMethod());
720 CHECK(!method->IsAbstract());
725 bool has_not_been_deoptimized = AddDeoptimizedMethod(method);
726 CHECK(has_not_been_deoptimized) << "Method " << PrettyMethod(method)
730 UpdateEntrypoints(method, GetQuickInstrumentationEntryPoint());
740 void Instrumentation::Undeoptimize(ArtMethod* method) {
741 CHECK(!method->IsNative());
742 CHECK(!method->IsProxyMethod());
743 CHECK(!method->IsAbstract());
749 bool found_and_erased = RemoveDeoptimizedMethod(method);
750 CHECK(found_and_erased) << "Method " << PrettyMethod(method)
759 if (method->IsStatic() && !method->IsConstructor() &&
760 !method->GetDeclaringClass()->IsInitialized()) {
761 UpdateEntrypoints(method, GetQuickResolutionStub());
763 const void* quick_code = class_linker->GetQuickOatCodeFor(method);
764 UpdateEntrypoints(method, quick_code);
767 // If there is no deoptimized method left, we can restore the stack of each thread.
776 bool Instrumentation::IsDeoptimized(ArtMethod* method) {
777 DCHECK(method != nullptr);
779 return IsDeoptimizedMethod(method);
797 ArtMethod* method;
803 method = BeginDeoptimizedMethod();
804 CHECK(method != nullptr);
806 Undeoptimize(method);
811 // Indicates if instrumentation should notify method enter/exit events to the listeners.
844 const void* Instrumentation::GetQuickCodeFor(ArtMethod* method, size_t pointer_size) const {
847 const void* code = method->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size);
857 return runtime->GetClassLinker()->GetQuickOatCodeFor(method);
861 ArtMethod* method,
870 cur->MethodEntered(thread, this_object, method, dex_pc);
875 ArtMethod* method,
884 cur->MethodExited(thread, this_object, method, dex_pc, return_value);
889 ArtMethod* method,
893 listener->MethodUnwind(thread, this_object, method, dex_pc);
899 ArtMethod* method,
903 listener->DexPcMoved(thread, this_object, method, dex_pc);
907 void Instrumentation::BackwardBranchImpl(Thread* thread, ArtMethod* method,
910 listener->BackwardBranch(thread, method, offset);
915 ArtMethod* method, uint32_t dex_pc,
919 listener->FieldRead(thread, this_object, method, dex_pc, field);
924 ArtMethod* method, uint32_t dex_pc,
928 listener->FieldWritten(thread, this_object, method, dex_pc, field, field_value);
958 ArtMethod* method,
964 LOG(INFO) << "Entering " << PrettyMethod(method) << " from PC " << reinterpret_cast<void*>(lr);
966 instrumentation::InstrumentationStackFrame instrumentation_frame(this_object, method, lr,
971 MethodEnterEvent(self, this_object, method, 0);
989 ArtMethod* method = instrumentation_frame.method_;
991 char return_shorty = method->GetShorty(&length)[0];
1019 PrettyMethod(method).c_str(),
1027 LOG(INFO) << "Returning from " << PrettyMethod(method)
1042 ArtMethod* method = instrumentation_frame.method_;
1045 LOG(INFO) << "Popping for deoptimization " << PrettyMethod(method);
1049 LOG(INFO) << "Popping for unwind " << PrettyMethod(method);
1052 // Notify listeners of method unwind.
1056 MethodUnwindEvent(self, instrumentation_frame.this_object_, method, dex_pc);