skip events that don't change anything in tracer
This happens when empty sub-scopes are moved around between scopes.
@@ -232,6 +232,10 @@ func (t *trace) ReserveMemory(scope string, prio uint8, size, mem int64) {
return
}
+ if size == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceReserveMemoryEvt,
Scope: scope,
@@ -246,6 +250,10 @@ func (t *trace) BlockReserveMemory(scope string, prio uint8, size, mem int64) {
return
}
+ if size == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceBlockReserveMemoryEvt,
Scope: scope,
@@ -260,6 +268,10 @@ func (t *trace) ReleaseMemory(scope string, size, mem int64) {
return
}
+ if size == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceReleaseMemoryEvt,
Scope: scope,
@@ -339,6 +351,10 @@ func (t *trace) AddStreams(scope string, deltaIn, deltaOut, nstreamsIn, nstreams
return
}
+ if deltaIn == 0 && deltaOut == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceAddStreamEvt,
Scope: scope,
@@ -354,6 +370,10 @@ func (t *trace) BlockAddStreams(scope string, deltaIn, deltaOut, nstreamsIn, nst
return
}
+ if deltaIn == 0 && deltaOut == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceBlockAddStreamEvt,
Scope: scope,
@@ -369,6 +389,10 @@ func (t *trace) RemoveStreams(scope string, deltaIn, deltaOut, nstreamsIn, nstre
return
}
+ if deltaIn == 0 && deltaOut == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceRemoveStreamEvt,
Scope: scope,
@@ -465,6 +489,10 @@ func (t *trace) AddConns(scope string, deltaIn, deltaOut, deltafd, nconnsIn, nco
return
}
+ if deltaIn == 0 && deltaOut == 0 && deltafd == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceAddConnEvt,
Scope: scope,
@@ -482,6 +510,10 @@ func (t *trace) BlockAddConns(scope string, deltaIn, deltaOut, deltafd, nconnsIn
return
}
+ if deltaIn == 0 && deltaOut == 0 && deltafd == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceBlockAddConnEvt,
Scope: scope,
@@ -499,6 +531,10 @@ func (t *trace) RemoveConns(scope string, deltaIn, deltaOut, deltafd, nconnsIn,
return
}
+ if deltaIn == 0 && deltaOut == 0 && deltafd == 0 {
+ return
+ }
+
t.push(traceEvt{
Type: traceRemoveConnEvt,
Scope: scope,
