Merge branch 'master' into oneagent

oneagent
hengyunabc 4 years ago
commit 4d47eb5ec8

@ -81,8 +81,11 @@ public class AbstractTraceAdviceListener extends AdviceListenerAdapter {
private void finishing(ClassLoader loader, Advice advice) { private void finishing(ClassLoader loader, Advice advice) {
// 本次调用的耗时 // 本次调用的耗时
TraceEntity traceEntity = threadLocalTraceEntity(loader); TraceEntity traceEntity = threadLocalTraceEntity(loader);
double cost = threadLocalWatch.costInMillis(); if (traceEntity.deep >= 1) { // #1817 防止deep为负数
if (--traceEntity.deep == 0) { traceEntity.deep--;
}
if (traceEntity.deep == 0) {
double cost = threadLocalWatch.costInMillis();
try { try {
boolean conditionResult = isConditionMet(command.getConditionExpress(), advice, cost); boolean conditionResult = isConditionMet(command.getConditionExpress(), advice, cost);
if (this.isVerbose()) { if (this.isVerbose()) {

@ -18,14 +18,6 @@ public class TraceEntity {
this.deep = 0; this.deep = 0;
} }
public int getDeep() {
return deep;
}
public void setDeep(int deep) {
this.deep = deep;
}
private TraceTree createTraceTree(ClassLoader loader) { private TraceTree createTraceTree(ClassLoader loader) {
return new TraceTree(ThreadUtil.getThreadNode(loader, Thread.currentThread())); return new TraceTree(ThreadUtil.getThreadNode(loader, Thread.currentThread()));
} }

Loading…
Cancel
Save