i#7685 DrPoints: Progressive writing of BBVs#7815
Merged
Conversation
Normally BBVs are kept in memory the whole time DrPoints is attached to the target program and written only at detach. This can cause out-of-memory issues for long executions or programs with a large number of BBs. This PR adds an option that allows the user to specify how many BBVs to keep in memory at any given time. Issue #7685
Contributor
derekbruening
left a comment
There was a problem hiding this comment.
Main issues are whether this should be the default and not add an option at all, and that the output needs to be buffered.
Added default of 100 to -save_bbv_every. Added check for wrapping behavior. Updated test.
derekbruening
approved these changes
Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DrPoints previously stored all Basic Block Vectors (BBVs) in memory
until program exit, which could lead to out-of-memory issues for
long-running executions or programs with a large number of BBs
executed. This PR introduces the
-save_bbv_everyoption, allowingusers to specify a maximum number of BBVs to keep in memory before
flushing them to disk (or stdout) and reclaiming the space. This option
is enabled by default with a value of
100BBVs kept in memory at anygiven time.
The implementation also removes the
bb_id_count_pair_tstructure.Instead, the BBV vector now uses the BB ID directly as an index to store
the weighted execution counts.
Adds a test that uses
-save_every_bbvrunning DrPoints on our simple"hello world" app. Because we write BBVs every instruction interval, the
output is supposed to have "Hello, world!" in the middle of the printed BBVs.
Issue #7685