Skip to content

trace命令输出的行号错误 #1855

Closed
@hengyunabc

Description

以 MathGame 为例,trace输出结果里的# 明显不符合:https://github.com/alibaba/arthas/blob/arthas-all-3.5.2/math-game/src/main/java/demo/MathGame.java

  • 启动 java -jar ~/.arthas/lib/3.5.2/arthas/math-game.jar

  • 指定版本 as.sh --use-version 3.5.2

$ trace *MathGame * --skipJDKMethod false
Press Q or Ctrl+C to abort.
Affect(class count: 1 , method count: 5) cost in 166 ms, listenerId: 1
`---ts=2021-07-08 19:02:56;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc
    `---[1.56174ms] demo.MathGame:run()
        +---[0.031262ms] java.util.Random:nextInt() #23
        +---[0.788524ms] demo.MathGame:primeFactors() #24 [throws Exception]
        |   `---[0.281266ms] demo.MathGame:primeFactors() [throws Exception]
        |       +---[0.014698ms] java.lang.StringBuilder:<init>() #46
        |       +---[min=0.006556ms,max=0.026137ms,total=0.045363ms,count=3] java.lang.StringBuilder:append() #57
        |       +---[0.012086ms] java.lang.StringBuilder:toString() #57
        |       +---[0.016014ms] java.lang.IllegalArgumentException:<init>() #57
        |       `---throw:java.lang.IllegalArgumentException #57 [number is: -99270, need >= 2]
        +---[0.008383ms] java.lang.StringBuilder:<init>() #28
        +---[0.104945ms] java.lang.String:format() #57
        +---[min=0.006426ms,max=0.007892ms,total=0.014318ms,count=2] java.lang.StringBuilder:append() #57
        +---[0.012215ms] java.lang.Exception:getMessage() #57
        +---[0.006068ms] java.lang.StringBuilder:toString() #57
        `---[0.132489ms] java.io.PrintStream:println() #57

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions