Skip to content

Commit 6e7729f

Browse files
jbachorikclaude
andcommitted
Update test javadoc to reflect actual behavior
- Fixed leak description (1.2 GB line number table leak, not 3.8M methods) - Updated method_map size expectations (~300-500 vs 500-1000) - Removed plateau detection mention (we removed that bogus logic) - Added memory threshold validation (< 600 KB) - Added class unloading validation - Updated test strategy to reflect combined cleanup approach 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent fc0e2af commit 6e7729f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

ddprof-test/src/test/java/com/datadoghq/profiler/memleak/GetLineNumberTableLeakTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,24 @@
3838
* <p>This test focuses on the production scenario where the profiler runs continuously for
3939
* extended periods without stop/restart cycles. In production, Recording objects live for the
4040
* entire application lifetime (days/weeks), and without cleanup, _method_map would accumulate
41-
* ALL methods encountered, causing unbounded growth (observed: 3.8M methods × ~300 bytes = 1.2 GB).
41+
* ALL methods encountered, causing unbounded growth (observed: 1.2 GB line number table leak).
4242
*
4343
* <p><b>What This Test Validates:</b>
4444
* <ul>
4545
* <li>Age-based cleanup removes methods unused for 3+ consecutive chunks</li>
46-
* <li>method_map size stays bounded (500-1000 methods vs 3000 without cleanup)</li>
46+
* <li>method_map size stays bounded (~300-500 methods vs 3000 without cleanup)</li>
4747
* <li>Cleanup runs during switchChunk() triggered by dump() operations</li>
48-
* <li>Memory growth plateaus after initial warmup (not linear growth)</li>
48+
* <li>Memory growth stays under threshold (< 600 KB for 3000 methods generated)</li>
49+
* <li>Class unloading frees SharedLineNumberTable memory naturally</li>
4950
* </ul>
5051
*
5152
* <p><b>Test Strategy:</b>
5253
* <ul>
5354
* <li>Continuous profiling (NO stop/restart cycles)</li>
5455
* <li>Generate transient methods across multiple chunk boundaries</li>
5556
* <li>Allow natural class unloading (no strong references held)</li>
56-
* <li>Verify bounded growth via TEST_LOG output showing method_map size</li>
57-
* <li>Combined cleanup: method_map cleanup + class unloading for optimal memory</li>
57+
* <li>Verify bounded growth via TEST_LOG output and NMT measurements</li>
58+
* <li>Combined cleanup: method_map cleanup + class unloading</li>
5859
* </ul>
5960
*/
6061
public class GetLineNumberTableLeakTest extends AbstractProfilerTest {

0 commit comments

Comments
 (0)