We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arthas-boot.jar
as.sh
arthas-boot
public class SimpleArthasMatchTest { public static void main(String[] args) throws InterruptedException { while(true){ test1(); } } public static void test1() throws InterruptedException { Thread.sleep(100); test2(); } public static void test2(){ if(ThreadLocalRandom.current().nextInt() == 0){ System.out.println("Unreachable in practice"); } } }
[arthas@10632]$ trace SimpleArthasMatchTest test1 '#cost>10000' Press Q or Ctrl+C to abort. Affect(class count: 1 , method count: 1) cost in 42 ms, listenerId: 3 `---ts=2024-11-25 11:38:54.294;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=jdk.internal.loader.ClassLoaders$AppClassLoader@63947c6b [arthas@10632]$ trace SimpleArthasMatchTest test1 '#cost>10000' Press Q or Ctrl+C to abort. Affect(class count: 1 , method count: 1) cost in 16 ms, listenerId: 4 `---ts=2024-11-25 11:39:00.220;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=jdk.internal.loader.ClassLoaders$AppClassLoader@63947c6b `---[0.0414ms] SimpleArthasMatchTest:test2() #18 [arthas@10632]$ trace SimpleArthasMatchTest test1 '#cost>10000' Press Q or Ctrl+C to abort. Affect(class count: 1 , method count: 1) cost in 18 ms, listenerId: 5 `---ts=2024-11-25 11:39:04.875;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=jdk.internal.loader.ClassLoaders$AppClassLoader@63947c6b `---[0.0366ms] SimpleArthasMatchTest:test2() #18
###问题原因 在执行方法增强逻辑时(SpyImpl类中的atEnter、atExit等方法),并不能保证atExit前一定执行过atEnter,导致依赖于进出栈来完成的操作无法正确执行,例如计算耗时,导致耗时计算错误,以及调用信息缺失等
The text was updated successfully, but these errors were encountered:
#2565 跟这个是同一类问题,都是cost计算错误导致的,不同的表现形式
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
环境信息
arthas-boot.jar
或者as.sh
的版本: 3.7.2arthas-boot
的版本: 3.7.2重现问题的步骤
期望的结果
实际运行的结果
###问题原因
在执行方法增强逻辑时(SpyImpl类中的atEnter、atExit等方法),并不能保证atExit前一定执行过atEnter,导致依赖于进出栈来完成的操作无法正确执行,例如计算耗时,导致耗时计算错误,以及调用信息缺失等
The text was updated successfully, but these errors were encountered: