|
38 | 38 | * <p>This test focuses on the production scenario where the profiler runs continuously for |
39 | 39 | * extended periods without stop/restart cycles. In production, Recording objects live for the |
40 | 40 | * 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). |
42 | 42 | * |
43 | 43 | * <p><b>What This Test Validates:</b> |
44 | 44 | * <ul> |
45 | 45 | * <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> |
47 | 47 | * <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> |
49 | 50 | * </ul> |
50 | 51 | * |
51 | 52 | * <p><b>Test Strategy:</b> |
52 | 53 | * <ul> |
53 | 54 | * <li>Continuous profiling (NO stop/restart cycles)</li> |
54 | 55 | * <li>Generate transient methods across multiple chunk boundaries</li> |
55 | 56 | * <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> |
58 | 59 | * </ul> |
59 | 60 | */ |
60 | 61 | public class GetLineNumberTableLeakTest extends AbstractProfilerTest { |
|
0 commit comments