Skip to content

fix(ddprof_live_heap): remove startup printf to improve heap profile accuracy - #209

Open
r1viollet wants to merge 1 commit into
mainfrom
r1viollet/ddprof-live-heap-remove-printf
Open

fix(ddprof_live_heap): remove startup printf to improve heap profile accuracy#209
r1viollet wants to merge 1 commit into
mainfrom
r1viollet/ddprof-live-heap-remove-printf

Conversation

@r1viollet

Copy link
Copy Markdown
Collaborator

Remove diagnostic printf that was creating a persistent stdio buffer allocation,
accounting for ~8% of in-use memory and causing leak_function to measure at 91%
instead of 100%.

Root cause: The startup printf creates a stdio buffer that persists in
memory. As seen in the CI profile data:

  • leak_function: 536,370 bytes (91%)
  • _IO_printf buffer: 48,760 bytes (8%)
  • allocate_memory: 0 bytes

The test objective is to validate leak profiling accuracy, not test printf
output. Removing this output improves test precision and eliminates the need
for wider error margins.

Better than PR #207 which widens margins - this directly fixes the root cause.

@r1viollet
r1viollet marked this pull request as ready for review September 8, 2026 07:57
@r1viollet
r1viollet requested a review from a team as a code owner September 8, 2026 07:57
…accuracy

Remove diagnostic printf that was creating a persistent stdio buffer allocation.
This accounted for ~8% of in-use memory, causing leak_function to measure at 91%
instead of 100%.

The test objective is to validate leak profiling accuracy, not test printf output.
Removing this output improves test precision and maintains 5% margin expectations.
@r1viollet
r1viollet force-pushed the r1viollet/ddprof-live-heap-remove-printf branch from f3c701c to 0650235 Compare September 8, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants