Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#7216: noise generator basic structure #7283

Open
wants to merge 52 commits into
base: master
Choose a base branch
from

Conversation

edeiana
Copy link
Contributor

@edeiana edeiana commented Feb 18, 2025

Scaffolding for the noise generator.
Adds noise_generator_t as a subclass of the iterator reader_t.
Currently noise_generator_t only produces TRACE_TYPE_READ records
with address 0xdeadbeef (easier to spot in tools' output). These records are
preceded by TRACE_TYPE_THREAD, TRACE_TYPE_PID,
TRACE_MARKER_TYPE_TIMESTAMP and followed by TRACE_TYPE_THREAD_EXIT
as this is the sequence of records the scheduler expects. We assign a large value to
TRACE_MARKER_TYPE_TIMESTAMP because the scheduler will overwrite it anyway
in dynamic mode. We support mixing noise with real inputs only in dynamic scheduling
mode, we don't support mixing with other inputs in non-dynamic modes.
As of now, the user can add a single-process, single-thread noise generator workload to
the scheduler's input workloads through the -add_noise_generator flag
in the drmemtrace framework. Adding a noise_generator_t to the scheduler's input
workloads is done by the factory class noise_generator_factory_t through its
create_noise_generator() method, which currently returns a noise generator as an
input_reader_t that can then be added to the scheduler's input_workload_t vector.
As of now, there are three knobs the user can control in the noise generator:
PID, TID, and number of noise records to generate. These knobs are encapsulated
in the noise_generator_info_t struct. For now they are pre-set with default values:
PID = 1, TID = 1, number of noise records to generate = 1000. We plan to have better
default values in the future (perhaps through a lightweight analysis of the target trace(s)
we want to add noise to) and options for the user to directly change these values.

Adds a unit test in scheduler_unit_tests.cpp and an end-to-end test leveraging
the schedule_stats tool.

Issue: #7216

@edeiana edeiana changed the title i#7216 noise generator basic structure i#7216: noise generator basic structure Feb 21, 2025
@edeiana edeiana marked this pull request as ready for review February 21, 2025 11:38
@edeiana edeiana requested a review from derekbruening March 6, 2025 11:42
@edeiana edeiana requested a review from derekbruening March 9, 2025 09:41
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