Home | History | Annotate | Download | only in runtime

Lines Matching refs:Method

71 // Takes a method and returns a 'canonical' one if the method is default (and therefore potentially
73 // method we are in.
88 Breakpoint(ArtMethod* method, uint32_t dex_pc, DeoptimizationRequest::Kind deoptimization_kind)
89 : method_(GetCanonicalMethod(method)),
102 // Method() is called from root visiting, do not use ScopedObjectAccess here or it can cause
104 ArtMethod* Method() const {
116 // Returns true if the method of this breakpoint and the passed in method should be considered the
117 // same. That is, they are either the same method or they are copied from the same method.
133 os << StringPrintf("Breakpoint[%s @%#x]", PrettyMethod(rhs.Method()).c_str(), rhs.DexPc());
142 void MethodEntered(Thread* thread, mirror::Object* this_object, ArtMethod* method,
145 if (method->IsNative()) {
146 // TODO: post location events is a suspension point and native method entry stubs aren't.
150 // We also listen to kDexPcMoved instrumentation event so we know the DexPcMoved method is
152 // we report the event in DexPcMoved. However, we must remind this is method entry so we
156 } else if (IsListeningToMethodExit() && IsReturn(method, dex_pc)) {
158 // RETURN so we know the MethodExited method is going to be called right after us. To avoid
160 // However, we must remind this is method entry so we send the METHOD_ENTRY event. And we can
164 Dbg::UpdateDebugger(thread, this_object, method, 0, Dbg::kMethodEntry, nullptr);
168 void MethodExited(Thread* thread, mirror::Object* this_object, ArtMethod* method,
171 if (method->IsNative()) {
172 // TODO: post location events is a suspension point and native method entry stubs aren't.
177 // It is also the method entry.
178 DCHECK(IsReturn(method, dex_pc));
182 Dbg::UpdateDebugger(thread, this_object, method, dex_pc, events, &return_value);
186 ArtMethod* method, uint32_t dex_pc)
189 LOG(ERROR) << "Unexpected method unwind event in debugger " << PrettyMethod(method)
193 void DexPcMoved(Thread* thread, mirror::Object* this_object, ArtMethod* method,
196 if (IsListeningToMethodExit() && IsReturn(method, new_dex_pc)) {
198 // RETURN so we know the MethodExited method is going to be called right after us. Like in
200 // Besides, if this RETURN instruction is the only one in the method, we can send multiple
202 // Therefore, we must not clear the debug method entry flag here.
206 // It is also the method entry.
210 Dbg::UpdateDebugger(thread, this_object, method, new_dex_pc, events, nullptr);
215 ArtMethod* method, uint32_t dex_pc, ArtField* field)
217 Dbg::PostFieldAccessEvent(method, dex_pc, this_object, field);
221 ArtMethod* method, uint32_t dex_pc, ArtField* field,
224 Dbg::PostFieldModificationEvent(method, dex_pc, this_object, field, &field_value);
233 void Branch(Thread* /*thread*/, ArtMethod* method, uint32_t dex_pc, int32_t dex_pc_offset)
235 LOG(ERROR) << "Unexpected branch event in debugger " << PrettyMethod(method)
242 ArtMethod* method,
246 LOG(ERROR) << "Unexpected invoke event in debugger " << PrettyMethod(method)
251 static bool IsReturn(ArtMethod* method, uint32_t dex_pc)
253 const DexFile::CodeItem* code_item = method->GetCodeItem();
317 receiver.VisitRootIfNonNull(visitor, root_info); // null for static method call.
572 // Used to patch boot image method entry point to interpreter bridge.
1367 return m == event_location.method;
1445 // We should not get here for a method without code (native, proxy or abstract). Log it and
1447 LOG(WARNING) << "Trying to mangle slot for method without code " << PrettyMethod(m);
1467 // We should not get here for a method without code (native, proxy or abstract). Log it and
1469 LOG(WARNING) << "Trying to demangle slot for method without code " << PrettyMethod(m);
1484 // Slot is invalid in the method.
1485 LOG(ERROR) << "Invalid local slot " << slot << " for method " << PrettyMethod(m);
1608 ArtMethod* method;
1622 MangleSlot(slot, pContext->method));
1624 slot = MangleSlot(slot, pContext->method);
1650 context.method = m;
2317 return true; // The debugger can't do anything useful with a frame that has no Method*.
2482 // We can't read/write local value from/into native method.
2546 return StringPrintf(" at DEX pc 0x%08x in method %s", visitor.GetDexPc(false),
2798 // local variable(s). To achieve this, we install instrumentation exit stub on each method of the
2813 location->method = GetCanonicalMethod(m);
2839 const DexFile::CodeItem* code_item = location.method->GetCodeItem();
2898 ArtMethod* method = GetMethod();
2899 DCHECK(method != nullptr);
2900 if (method->IsRuntimeMethod()) {
2901 // Ignore callee save method.
2902 DCHECK(method->IsCalleeSaveMethod());
2908 // First Java method found. It is either the method that threw the exception,
2909 // or the Java native method that is reporting an exception thrown by
2912 throw_method_ = method;
2921 found_dex_pc = method->FindCatchBlock(exception_class, dex_pc, &unused_clear_exception);
2923 catch_method_ = method;
2992 if (!IsDebuggerActive() || dex_pc == static_cast<uint32_t>(-2) /* fake method exit */) {
3006 // Step into method calls. We break when the line number
3007 // or method pointer changes. If we're in SS_MIN mode, we
3011 VLOG(jdwp) << "SS new method";
3020 // Step over method calls. We break when the line number is
3022 // depth. (We can't just compare on the method, because we
3031 VLOG(jdwp) << "SS method pop";
3044 // Return from the current method. We break when the frame
3047 // This differs from the "method exit" break in that it stops
3054 VLOG(jdwp) << "SS method pop";
3116 VLOG(jdwp) << "Deoptimize method " << PrettyMethod(request.Method()) << " ...";
3117 instrumentation->Deoptimize(request.Method());
3118 VLOG(jdwp) << "Deoptimize method " << PrettyMethod(request.Method()) << " DONE";
3121 VLOG(jdwp) << "Undeoptimize method " << PrettyMethod(request.Method()) << " ...";
3122 instrumentation->Undeoptimize(request.Method());
3123 VLOG(jdwp) << "Undeoptimize method " << PrettyMethod(request.Method()) << " DONE";
3169 DCHECK(req.Method() == nullptr);
3179 DCHECK(req.Method() == nullptr);
3190 DCHECK(req.Method() != nullptr);
3192 << " for deoptimization of " << PrettyMethod(req.Method());
3197 DCHECK(req.Method() != nullptr);
3199 << " for undeoptimization of " << PrettyMethod(req.Method());
3250 bool Dbg::MethodHasAnyBreakpoints(ArtMethod* method) {
3252 return FindFirstBreakpointForMethod(method) != nullptr;
3255 // Sanity checks all existing breakpoints on the same method.
3266 // We should have deoptimized everything but not "selectively" deoptimized this method.
3270 // We should have "selectively" deoptimized this method.
3271 // Note: while we have not deoptimized everything for this method, we may have done it for
3275 // This method does not require deoptimization.
3281 // Returns the deoptimization kind required to set a breakpoint in a method.
3290 VLOG(jdwp) << "No need for deoptimization when fully running with interpreter for method "
3302 // There is no breakpoint on this method yet: we need to deoptimize. If this method is default,
3303 // we deoptimize everything; otherwise we deoptimize only this method. We
3309 VLOG(jdwp) << "Need full deoptimization because of copying of method "
3313 // We don't need to deoptimize if the method has not been compiled.
3316 VLOG(jdwp) << "Need selective deoptimization for compiled method " << PrettyMethod(m);
3319 // Method is not compiled: we don't need to deoptimize.
3320 VLOG(jdwp) << "No need for deoptimization for non-compiled method " << PrettyMethod(m);
3325 // There is at least one breakpoint for this method: we don't need to deoptimize.
3342 DCHECK(m != nullptr) << "No method for method id " << location->method_id;
3358 // If there is at least one existing breakpoint on the same method, the new breakpoint
3377 DCHECK(m != nullptr) << "No method for method id " << location->method_id;
3391 // There is no more breakpoint on this method: we need to undeoptimize.
3393 // This method required full deoptimization: we need to undeoptimize everything.
3397 // This method required selective deoptimization: we need to undeoptimize only that method.
3401 // This method had no need for deoptimization: do nothing.
3407 // There is at least one breakpoint for this method: we don't need to undeoptimize.
3428 // If we want to step into a method, then we have to force interpreter on that call.
3443 // We can only interpret pure Java method.
3449 // If we want to step into a method, then we have to force interpreter on that call.
3454 // in or step over, that was implicitly invoked by calling a static method,
3455 // then we need to step into that method. Having a lower stack depth than
3466 // invoking the compiled code of the method, for example.
3481 // We can only interpret pure Java method.
3488 // out, that was implicitly invoked by calling a static method, then we
3489 // need to step into the caller of that method. Having a lower stack
3498 // invoked by calling a static method and the caller is deoptimized,
3500 // on the static method that was called originally. This problem can
3501 // be solved easily by forcing instrumentation on the called method,
3518 // We can only interpret pure Java method.
3551 ArtMethod* method = GetMethod();
3552 if (method == nullptr) {
3564 if (Runtime::Current()->GetInstrumentation()->IsDeoptimized(method)) {
3565 // We found a deoptimized method in the stack.
3597 // Deoptimization is required if at least one method in the stack needs it. However we
3675 method(nullptr),
3684 if (method == nullptr) {
3686 method = m;
3697 ArtMethod* method;
3753 visitor.stack_depth, visitor.method);
3762 // method on the stack (and no line number either).
3776 VLOG(jdwp) << "Single-step current method: " << PrettyMethod(single_step_control->GetMethod());
3846 // Thread is already invoking a method on behalf of the debugger.
3847 LOG(ERROR) << "InvokeMethod request for thread already invoking a method: " << *targetThread;
3851 // Thread is not suspended by an event so it cannot invoke a method.
3861 * the threads it has suspended so the target thread can execute the method.
3870 * responsibility of the debugger to properly resume that thread before invoking a method).
3881 << suspend_count << "). This thread will invoke the method only once "
3914 // Check the argument list matches the method.
3960 // Attaches the DebugInvokeReq to the target thread so it executes the method when
3987 // to preserve that across the method invocation.
3992 // Execute the method then sends reply to the debugger.
4025 // Translate the method through the vtable, unless the debugger wants to suppress it.
4026 ArtMethod* m = pReq->method;
4044 // Invoke the method.
4163 // Send the reply unless the debugger detached before the completion of the method.
4879 static const char* GetMethodSourceFile(ArtMethod* method)
4881 DCHECK(method != nullptr);
4882 const char* source_file = method->GetDeclaringClassSourceFile();
4896 * (2b) number of method name strings
4904 * (2b) method's class name
4905 * (2b) method name
4906 * (2b) method source file
4909 * (xb) method name strings
4924 * We use separate string tables for class names, method names, and source
4938 // In case this method is called when allocation tracker is disabled,
4991 // (2b) number of method name strings
5022 // (2b) method's class name
5023 // (2b) method name
5024 // (2b) method source file
5038 // (xb) method name strings
5053 ArtMethod* DeoptimizationRequest::Method() const {
5068 breakpoint.Method()->VisitRoots(root_visitor, sizeof(void*));