Sliver icon indicating copy to clipboard operation
Sliver copied to clipboard

获取的堆栈中多了一些runtimeMethod方法

Open liuhangb opened this issue 10 months ago • 6 comments

获取的堆栈中多了一些runtimeMethod方法:

<runtime method>.<runtime internal callee-save reference and argument registers method>

bool FetchStackVisitor::VisitFrame() {
  void *method = ArtHelper::GetCurMethodOfVisitor(this);
  auto *artMethod = static_cast<ArtMethod *>(method);
// 按照我的理解, 应该是在这里会过滤runtime Method, 不过目前没有生效
  if (artMethod == nullptr || artMethod->IsRuntimeMethod()) {
    return true;
  }
        at android.graphics.HardwareRenderer.nSyncAndDrawFrame
        at android.graphics.HardwareRenderer.syncAndDrawFrame
        at android.view.ThreadedRenderer.draw
        at android.view.ViewRootImpl.draw
        at android.view.ViewRootImpl.performDraw
        at android.view.ViewRootImpl.performTraversals
        at android.view.ViewRootImpl.doTraversal
        at android.view.ViewRootImpl$TraversalRunnable.run
        at android.view.Choreographer$CallbackRecord.run
        at android.view.Choreographer.doCallbacks
        at android.view.Choreographer.doFrame
        at android.view.Choreographer$FrameDisplayEventReceiver.run
        at android.os.Handler.handleCallback
        at android.os.Handler.dispatchMessage
        at android.os.Looper.loop
        at android.app.ActivityThread.main
        at <runtime method>.<runtime internal callee-save reference and argument registers method>
        at java.lang.reflect.Method.invoke
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run
        at <runtime method>.<runtime internal callee-save reference and argument registers method>
        at com.android.internal.os.ZygoteInit.main

liuhangb avatar Apr 23 '24 10:04 liuhangb