Home | History | Annotate | Download | only in runtime

Lines Matching defs:Method

82     ArtMethod* method = Method();
83 DCHECK(method != nullptr);
84 return method->GetLineNumFromDexPC(DexPc());
87 ArtMethod* Method() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
151 while (depth < kMaxAllocRecordStackDepth && stack_[depth].Method() != nullptr) {
182 // Unused entries have null method.
188 Breakpoint(ArtMethod* method, uint32_t dex_pc,
196 method_ = soa.EncodeMethod(method);
203 method_ = soa.EncodeMethod(other.Method());
206 ArtMethod* Method() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
230 os << StringPrintf("Breakpoint[%s @%#x]", PrettyMethod(rhs.Method()).c_str(), rhs.DexPc());
239 void MethodEntered(Thread* thread, mirror::Object* this_object, ArtMethod* method,
242 if (method->IsNative()) {
243 // TODO: post location events is a suspension point and native method entry stubs aren't.
247 // We also listen to kDexPcMoved instrumentation event so we know the DexPcMoved method is
249 // we report the event in DexPcMoved. However, we must remind this is method entry so we
253 } else if (IsListeningToMethodExit() && IsReturn(method, dex_pc)) {
255 // RETURN so we know the MethodExited method is going to be called right after us. To avoid
257 // However, we must remind this is method entry so we send the METHOD_ENTRY event. And we can
261 Dbg::UpdateDebugger(thread, this_object, method, 0, Dbg::kMethodEntry, nullptr);
265 void MethodExited(Thread* thread, mirror::Object* this_object, ArtMethod* method,
268 if (method->IsNative()) {
269 // TODO: post location events is a suspension point and native method entry stubs aren't.
274 // It is also the method entry.
275 DCHECK(IsReturn(method, dex_pc));
279 Dbg::UpdateDebugger(thread, this_object, method, dex_pc, events, &return_value);
283 ArtMethod* method, uint32_t dex_pc)
286 LOG(ERROR) << "Unexpected method unwind event in debugger " << PrettyMethod(method)
290 void DexPcMoved(Thread* thread, mirror::Object* this_object, ArtMethod* method,
293 if (IsListeningToMethodExit() && IsReturn(method, new_dex_pc)) {
295 // RETURN so we know the MethodExited method is going to be called right after us. Like in
297 // Besides, if this RETURN instruction is the only one in the method, we can send multiple
299 // Therefore, we must not clear the debug method entry flag here.
303 // It is also the method entry.
307 Dbg::UpdateDebugger(thread, this_object, method, new_dex_pc, events, nullptr);
312 ArtMethod* method, uint32_t dex_pc, ArtField* field)
314 Dbg::PostFieldAccessEvent(method, dex_pc, this_object, field);
318 ArtMethod* method, uint32_t dex_pc, ArtField* field,
321 Dbg::PostFieldModificationEvent(method, dex_pc, this_object, field, &field_value);
330 void BackwardBranch(Thread* /*thread*/, ArtMethod* method, int32_t dex_pc_offset)
332 LOG(ERROR) << "Unexpected backward branch event in debugger " << PrettyMethod(method)
337 static bool IsReturn(ArtMethod* method, uint32_t dex_pc)
339 const DexFile::CodeItem* code_item = method->GetCodeItem();
410 receiver.VisitRootIfNonNull(visitor, root_info); // null for static method call.
427 if (gBreakpoints[i].DexPc() == dex_pc && gBreakpoints[i].Method() == m) {
1423 return m == event_location.method;
1504 // We should not get here for a method without code (native, proxy or abstract). Log it and
1506 LOG(WARNING) << "Trying to mangle slot for method without code " << PrettyMethod(m);
1526 // We should not get here for a method without code (native, proxy or abstract). Log it and
1528 LOG(WARNING) << "Trying to demangle slot for method without code " << PrettyMethod(m);
1543 // Slot is invalid in the method.
1544 LOG(ERROR) << "Invalid local slot " << slot << " for method " << PrettyMethod(m);
1671 ArtMethod* method;
1684 MangleSlot(slot, pContext->method));
1686 slot = MangleSlot(slot, pContext->method);
1712 context.method = m;
2380 return true; // The debugger can't do anything useful with a frame that has no Method*.
2545 // We can't read/write local value from/into native method.
2607 return StringPrintf(" at DEX pc 0x%08x in method %s", visitor.GetDexPc(false),
2865 location->method = m;
2891 const DexFile::CodeItem* code_item = location.method->GetCodeItem();
2951 ArtMethod* method = GetMethod();
2952 DCHECK(method != nullptr);
2953 if (method->IsRuntimeMethod()) {
2954 // Ignore callee save method.
2955 DCHECK(method->IsCalleeSaveMethod());
2961 // First Java method found. It is either the method that threw the exception,
2962 // or the Java native method that is reporting an exception thrown by
2965 throw_method_ = method;
2974 found_dex_pc = method->FindCatchBlock(exception_class, dex_pc, &unused_clear_exception);
2976 catch_method_ = method;
3046 if (!IsDebuggerActive() || dex_pc == static_cast<uint32_t>(-2) /* fake method exit */) {
3060 // Step into method calls. We break when the line number
3061 // or method pointer changes. If we're in SS_MIN mode, we
3065 VLOG(jdwp) << "SS new method";
3074 // Step over method calls. We break when the line number is
3076 // depth. (We can't just compare on the method, because we
3085 VLOG(jdwp) << "SS method pop";
3098 // Return from the current method. We break when the frame
3101 // This differs from the "method exit" break in that it stops
3108 VLOG(jdwp) << "SS method pop";
3170 VLOG(jdwp) << "Deoptimize method " << PrettyMethod(request.Method()) << " ...";
3171 instrumentation->Deoptimize(request.Method());
3172 VLOG(jdwp) << "Deoptimize method " << PrettyMethod(request.Method()) << " DONE";
3175 VLOG(jdwp) << "Undeoptimize method " << PrettyMethod(request.Method()) << " ...";
3176 instrumentation->Undeoptimize(request.Method());
3177 VLOG(jdwp) << "Undeoptimize method " << PrettyMethod(request.Method()) << " DONE";
3223 DCHECK(req.Method() == nullptr);
3233 DCHECK(req.Method() == nullptr);
3244 DCHECK(req.Method() != nullptr);
3246 << " for deoptimization of " << PrettyMethod(req.Method());
3251 DCHECK(req.Method() != nullptr);
3253 << " for undeoptimization of " << PrettyMethod(req.Method());
3297 // TODO We should not be asked to watch location in a native or abstract method so the code item
3301 // Note: method verifier may cause thread suspension.
3310 // Note: we don't need to verify the method.
3317 if (breakpoint.Method() == m) {
3324 bool Dbg::MethodHasAnyBreakpoints(ArtMethod* method) {
3326 return FindFirstBreakpointForMethod(method) != nullptr;
3329 // Sanity checks all existing breakpoints on the same method.
3334 if (breakpoint.Method() == m) {
3340 // We should have deoptimized everything but not "selectively" deoptimized this method.
3344 // We should have "selectively" deoptimized this method.
3345 // Note: while we have not deoptimized everything for this method, we may have done it for
3349 // This method does not require deoptimization.
3355 // Returns the deoptimization kind required to set a breakpoint in a method.
3364 VLOG(jdwp) << "No need for deoptimization when fully running with interpreter for method "
3376 // There is no breakpoint on this method yet: we need to deoptimize. If this method may be
3377 // inlined, we deoptimize everything; otherwise we deoptimize only this method.
3378 // Note: IsMethodPossiblyInlined goes into the method verifier and may cause thread suspension.
3382 VLOG(jdwp) << "Need full deoptimization because of possible inlining of method "
3386 // We don't need to deoptimize if the method has not been compiled.
3390 // If the method may be called through its direct code pointer (without loading
3394 << "into image for compiled method " << PrettyMethod(m);
3397 VLOG(jdwp) << "Need selective deoptimization for compiled method " << PrettyMethod(m);
3401 // Method is not compiled: we don't need to deoptimize.
3402 VLOG(jdwp) << "No need for deoptimization for non-compiled method " << PrettyMethod(m);
3407 // There is at least one breakpoint for this method: we don't need to deoptimize.
3424 DCHECK(m != nullptr) << "No method for method id " << location->method_id;
3440 // If there is at least one existing breakpoint on the same method, the new breakpoint
3459 DCHECK(m != nullptr) << "No method for method id " << location->method_id;
3462 if (gBreakpoints[i].DexPc() == location->dex_pc && gBreakpoints[i].Method() == m) {
3473 // There is no more breakpoint on this method: we need to undeoptimize.
3475 // This method required full deoptimization: we need to undeoptimize everything.
3479 // This method required selective deoptimization: we need to undeoptimize only that method.
3483 // This method had no need for deoptimization: do nothing.
3489 // There is at least one breakpoint for this method: we don't need to undeoptimize.
3510 // If we want to step into a method, then we have to force interpreter on that call.
3525 // We can only interpret pure Java method.
3531 // If we want to step into a method, then we have to force interpreter on that call.
3536 // in or step over, that was implicitly invoked by calling a static method,
3537 // then we need to step into that method. Having a lower stack depth than
3548 // invoking the compiled code of the method, for example.
3563 // We can only interpret pure Java method.
3570 // out, that was implicitly invoked by calling a static method, then we
3571 // need to step into the caller of that method. Having a lower stack
3580 // invoked by calling a static method and the caller is deoptimized,
3582 // on the static method that was called originally. This problem can
3583 // be solved easily by forcing instrumentation on the called method,
3600 // We can only interpret pure Java method.
3687 method(nullptr),
3696 if (method == nullptr) {
3698 method = m;
3709 ArtMethod* method;
3765 visitor.stack_depth, visitor.method);
3774 // method on the stack (and no line number either).
3789 VLOG(jdwp) << "Single-step current method: " << PrettyMethod(single_step_control->GetMethod());
3858 // Thread is already invoking a method on behalf of the debugger.
3859 LOG(ERROR) << "InvokeMethod request for thread already invoking a method: " << *targetThread;
3863 // Thread is not suspended by an event so it cannot invoke a method.
3872 * a method we have to resume fully and then re-suspend it back to the
3879 * by rejecting the method invocation request. Without this, we will
3888 LOG(ERROR) << *targetThread << " suspend count too deep for method invocation: " << suspend_count;
3921 // Check the argument list matches the method.
3965 // Attaches the DebugInvokeReq to the target thread so it executes the method when
3993 // to preserve that across the method invocation.
3998 // Execute the method then sends reply to the debugger.
4031 // Translate the method through the vtable, unless the debugger wants to suppress it.
4032 ArtMethod* m = pReq->method;
4050 // Invoke the method.
4168 // Send the reply unless the debugger detached before the completion of the method.
4975 ArtMethod* m = stack_element->Method();
5031 static const char* GetMethodSourceFile(ArtMethod* method)
5033 DCHECK(method != nullptr);
5034 const char* source_file = method->GetDeclaringClassSourceFile();
5048 * (2b) number of method name strings
5056 * (2b) method's class name
5057 * (2b) method name
5058 * (2b) method source file
5061 * (xb) method name strings
5076 * We use separate string tables for class names, method names, and source
5104 ArtMethod* m = record->StackElement(i)->Method();
5134 // (2b) number of method name strings
5162 // (2b) method's class name
5163 // (2b) method name
5164 // (2b) method source file
5166 ArtMethod* m = record->StackElement(stack_frame)->Method();
5179 // (xb) method name strings
5194 ArtMethod* DeoptimizationRequest::Method() const {