- 我已经在 issues 里搜索,没有重复的issue。
环境信息
arthas-boot.jar
或者as.sh
的版本:- Arthas 版本: 3.3.7
- 操作系统版本: windows
- 目标进程的JVM版本: 1.8
- 执行
arthas-boot
的版本: 3.3.7
重现问题的步骤
1、将springmvc启动
2、执行arthas
3、执行trace 命令
期望的结果
[arthas@15828]$ trace --skipJDKMethod false com.sankuai.pay.mra.bluegreendeploy.controller.BlueGreenDeploymentController list
Press Q or Ctrl+C to abort.
Affect(class count: 2 , method count: 2) cost in 98 ms, listenerId: 2
`---ts=2020-08-22 14:19:17;thread_name=qtp1131905905-122;id=7a;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@18b4aac2
`---[3802.607999ms] com.sankuai.pay.mra.bluegreendeploy.controller.BlueGreenDeploymentController$$EnhancerBySpringCGLIB$$61154c62:list()
`---[3802.5624ms] org.springframework.cglib.proxy.MethodInterceptor:intercept()
`---[3802.1046ms] com.sankuai.pay.mra.bluegreendeploy.controller.BlueGreenDeploymentController:list()
+---[3802.044ms] com.sankuai.pay.mra.bluegreendeploy.service.BlueGreenDeploymentService:queryList() #118
**备注:**:这里应该继续打印mapper的耗时
`---[0.0121ms] com.sankuai.pay.mra.bluegreendeploy.model.ResponseWrapper:ofSuccess() #119
实际运行的结果
[arthas@15828]$ trace --skipJDKMethod false com.sankuai.pay.mra.bluegreendeploy.controller.BlueGreenDeploymentController list
Press Q or Ctrl+C to abort.
Affect(class count: 2 , method count: 2) cost in 98 ms, listenerId: 2
`---ts=2020-08-22 14:19:17;thread_name=qtp1131905905-122;id=7a;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@18b4aac2
`---[3802.607999ms] com.sankuai.pay.mra.bluegreendeploy.controller.BlueGreenDeploymentController$$EnhancerBySpringCGLIB$$61154c62:list()
`---[3802.5624ms] org.springframework.cglib.proxy.MethodInterceptor:intercept()
`---[3802.1046ms] com.sankuai.pay.mra.bluegreendeploy.controller.BlueGreenDeploymentController:list()
+---[3802.044ms] com.sankuai.pay.mra.bluegreendeploy.service.BlueGreenDeploymentService:queryList() #118
`---[0.0121ms] com.sankuai.pay.mra.bluegreendeploy.model.ResponseWrapper:ofSuccess() #119
把异常信息贴到这里
2条答案
按热度按时间jum4pzuy1#
没看懂,trace是只有一层的。要深入可以继续trace ,参考: https://arthas.aliyun.com/doc/trace.html#id8
h9a6wy2h2#
我使用了 https://arthas.aliyun.com/doc/trace.html#id8 中的方法,是可以的
比如你这里
$ trace --skipJDKMethod false com.sankuai.pay.mra.bluegreendeploy.controller.BlueGreenDeploymentController list
显示的
listenerId: 2
然后另开一个终端
telnet localhost 3658
再输入
trace com.sankuai.pay.mra.bluegreendeploy.service.BlueGreenDeploymentService queryList --listenerId 2
然后再通过调用目标方法,去查看终端1 这个方法的调用栈应该会展开