Commit e25f439
Fix calltrace_storage counters accumulating across rotations
clearTableOnly() was freeing memory without decrementing the global
CALLTRACE_STORAGE_BYTES/TRACES counters, causing them to grow
monotonically (cumulative total ever allocated, not current live size).
Add a decrement pass in clearTableOnly() using the same table
iteration as collect(), computed after waitForAllRefCountsToClear()
ensures no concurrent writers. Both the direct clear() path and
the deferred-free processTraces() path go through clearTableOnly(),
so a single fix covers both.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent 0d2637d commit e25f439
1 file changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
109 | 132 | | |
110 | 133 | | |
111 | 134 | | |
| |||
424 | 447 | | |
425 | 448 | | |
426 | 449 | | |
427 | | - | |
| 450 | + | |
428 | 451 | | |
429 | 452 | | |
430 | 453 | | |
| |||
0 commit comments