Skip to content

i#7685 DrPoints: Progressive writing of BBVs#7815

Merged
edeiana merged 5 commits intomasterfrom
i7685-bbv-dump-every-x-intervals
Feb 24, 2026
Merged

i#7685 DrPoints: Progressive writing of BBVs#7815
edeiana merged 5 commits intomasterfrom
i7685-bbv-dump-every-x-intervals

Conversation

@edeiana
Copy link
Copy Markdown
Contributor

@edeiana edeiana commented Feb 19, 2026

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_every option, allowing
users 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 100 BBVs kept in memory at any
given time.

The implementation also removes the bb_id_count_pair_t structure.
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_bbv running 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

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
@edeiana edeiana changed the title i#7685 DrPoints: Progressing writing of BBVs i#7685 DrPoints: Progressive writing of BBVs Feb 20, 2026
Copy link
Copy Markdown
Contributor

@derekbruening derekbruening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Main issues are whether this should be the default and not add an option at all, and that the output needs to be buffered.

Comment thread clients/drpoints/drpoints.cpp Outdated
Comment thread clients/drpoints/drpoints.cpp Outdated
Comment thread clients/drpoints/drpoints.cpp
Comment thread clients/drpoints/drpoints.cpp
Comment thread clients/drpoints/drpoints.cpp Outdated
Comment thread clients/drpoints/drpoints.cpp Outdated
Comment thread clients/drpoints/drpoints.cpp Outdated
Comment thread clients/drpoints/drpoints.cpp
Added default of 100 to -save_bbv_every.
Added check for wrapping behavior.
Updated test.
Comment thread clients/drpoints/drpoints.cpp
Comment thread clients/drpoints/drpoints.cpp Outdated
@edeiana edeiana merged commit 466b321 into master Feb 24, 2026
24 checks passed
@edeiana edeiana deleted the i7685-bbv-dump-every-x-intervals branch February 24, 2026 03:14
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