DynamoRIO
|
#include <scheduler.h>
Public Member Functions | |
input_workload_t () | |
input_workload_t (const std::string &trace_path, std::vector< range_t > regions_of_interest={}) | |
input_workload_t (std::vector< input_reader_t > readers, std::vector< range_t > regions_of_interest={}) | |
Data Fields | |
size_t | struct_size = sizeof(input_workload_t) |
std::string | path |
std::vector< input_reader_t > | readers |
std::set< memref_tid_t > | only_threads |
std::vector< input_thread_info_t > | thread_modifiers |
std::vector< timestamp_range_t > | times_of_interest |
std::set< input_ordinal_t > | only_shards |
int | output_limit = 0 |
Detailed Description
template<typename RecordType, typename ReaderType>
struct dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t
Specifies the input workloads to be scheduled.
Constructor & Destructor Documentation
◆ input_workload_t() [1/3]
|
inline |
Create an empty workload. This is not a valid final input.
◆ input_workload_t() [2/3]
|
inline |
Create a workload coming from a directory of many trace files or from a single trace file where each trace file uses the given regions of interest.
◆ input_workload_t() [3/3]
|
inline |
Create a workload with a set of pre-initialized readers which use the given regions of interest.
Field Documentation
◆ only_shards
std::set<input_ordinal_t> dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t::only_shards |
If empty, every trace file in 'path' or every reader in 'readers' becomes an enabled input. If non-empty, only those inputs whose indices are in this set are enabled and the rest are ignored. An index is the 0-based ordinal in the 'readers' vector or in the files opened at 'path' (which are sorted lexicographically by path). It is an error to have both this and 'only_threads' be non-empty.
◆ only_threads
std::set<memref_tid_t> dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t::only_threads |
If empty, every trace file in 'path' or every reader in 'readers' becomes an enabled input. If non-empty, only those inputs whose thread ids are in this set are enabled and the rest are ignored. It is an error to have both this and 'only_shards' be non-empty.
◆ output_limit
int dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t::output_limit = 0 |
If greater than zero, imposes a maximum number of outputs that the inputs comprising this workload can execute upon simultaneously. If an input would be executed next but would exceed this cap, a different input is selected instead or the output goes idle if none are found.
◆ path
std::string dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t::path |
A directory of trace files or a single trace file. A reader will be opened for each input file and its init() function will be called; that function will not block (variants where it does block, such as for IPC, should leave 'path' empty and use 'reader' below instead).
◆ readers
std::vector<input_reader_t> dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t::readers |
An alternative to passing in a path and having the scheduler open that file(s) is to directly pass in a reader. This field is only considered if 'path' is empty. The scheduler will call the init() function for each reader at the time of the first access to it through an output stream (supporting IPC readers whose init() blocks).
◆ struct_size
size_t dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t::struct_size = sizeof(input_workload_t) |
Size of the struct for binary-compatible additions.
◆ thread_modifiers
std::vector<input_thread_info_t> dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t::thread_modifiers |
Scheduling modifiers for the threads in this workload.
◆ times_of_interest
std::vector<timestamp_range_t> dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_workload_t::times_of_interest |
If non-empty, all input records outside of these ranges are skipped. These times cut across all inputs of this workload. The times are converted into a separate sequence of instruction dynamorio::drmemtrace::scheduler_tmpl_t::range_t for each input. The end result is as though the dynamorio::drmemtrace::scheduler_tmpl_t:: input_thread_info_t.regions_of_interest field were set for each input. See the comments by that field for further details such as the marker inserted between ranges. Although the times cut across all inputs for determining the per-input instruction-ordinal ranges, no barrier is applied to align the resulting regions of interest: i.e., one input can finish its initial region and move to its next region before all other inputs finish their initial regions.
If non-empty, the dynamorio::drmemtrace::scheduler_tmpl_t:: input_thread_info_t.regions_of_interest field must be empty for each modifier for this workload.
If non-empty, the dynamorio::drmemtrace::scheduler_tmpl_t:: scheduler_options_t.replay_as_traced_istream field must also be specified to provide the timestamp-to-instruction-ordinal mappings. These mappings are not precise due to the coarse-grained timestamps and the elision of adjacent timestamps in the istream. Interpolation is used to estimate instruction ordinals when timestamps fall in between recorded points.
The documentation for this struct was generated from the following file:
- /home/runner/work/dynamorio/dynamorio/build_release-64/clients/include/drmemtrace/scheduler.h