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
测试代码:
public class AAA { public static void main(String[] args) { for(;;) { aaa(); } } public static void aaa() { for(int i = 0; i < 10; ++i) { bbb(i); System.err.println(i); } } public static void bbb(int i ) { try { Thread.sleep(i * 100); } catch (InterruptedException e) { e.printStackTrace(); } } }
执行 trace AAA aaa ,然后q,停止后,再次执行trace AAA aaa。很大概率出现下面的信息:
trace AAA aaa
q
$ trace AAA aaa Press Q or Ctrl+C to abort. Affect(class count: 1 , method count: 1) cost in 24 ms, listenerId: 2
然后一直挂起,不打印trace结果,好像是 aaa 函数没被调用,但实际上 aaa 一直在执行。
原因是trace在第一次执行时, before/after 的执行并不一定对等。可能没有执行before,只执行了 after,然后AbstractTraceAdviceListener里的判断就会出问题,出现 traceEntity.deep是负数。
AbstractTraceAdviceListener
traceEntity.deep
The text was updated successfully, but these errors were encountered:
fix trace command may not print result problem. #1817
e6f5b59
No branches or pull requests
测试代码:
执行
trace AAA aaa
,然后q
,停止后,再次执行trace AAA aaa
。很大概率出现下面的信息:然后一直挂起,不打印trace结果,好像是 aaa 函数没被调用,但实际上 aaa 一直在执行。
原因是trace在第一次执行时, before/after 的执行并不一定对等。可能没有执行before,只执行了 after,然后
AbstractTraceAdviceListener
里的判断就会出问题,出现traceEntity.deep
是负数。The text was updated successfully, but these errors were encountered: