|virtual scheduler_status_t||init (std::vector< input_workload_t > &workload_inputs, int output_count, scheduler_options_t options)|
|virtual stream_t *||get_stream (output_ordinal_t ordinal)|
|virtual int||get_input_stream_count () const|
|virtual memtrace_stream_t *||get_input_stream_interface (input_ordinal_t input) const|
|virtual std::string||get_input_stream_name (input_ordinal_t input) const|
|std::string||get_error_string () const|
|static scheduler_options_t||make_scheduler_parallel_options (int verbosity=0)|
|static scheduler_options_t||make_scheduler_serial_options (int verbosity=0)|
|static constexpr input_ordinal_t||INVALID_INPUT_ORDINAL = -1|
|static constexpr output_ordinal_t||INVALID_OUTPUT_ORDINAL = -1|
template<typename RecordType, typename ReaderType>
class dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >
< DrMemtrace tracing + simulation infrastructure namespace. Schedules traced software threads onto simulated cpus. Takes in a set of recorded traces and maps them onto a new set of output streams, typically representing simulated cpus.
This is a templated class to support not just operating over dynamorio::drmemtrace::memref_t inputs read by dynamorio::drmemtrace::reader_t, but also over dynamorio::drmemtrace::trace_entry_t records read by dynamorio::drmemtrace::record_reader_t.
Member Typedef Documentation
|typedef int dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::input_ordinal_t|
Identifies an input stream by its index.
|typedef int dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::output_ordinal_t|
Identifies an output stream by its index.
Member Enumeration Documentation
Flags specifying how inter-input-stream dependencies are handled.
Ignores all inter-input dependencies.
Ensures timestamps in the inputs arrive at the outputs in timestamp order. For MAP_TO_ANY_OUTPUT, enforcing asked-for context switch rates is more important that honoring precise trace-buffer-based timestamp inter-input dependencies: thus, timestamp ordering will be followed at context switch points for picking the next input, but timestamps will not preempt an input. To precisely follow the recorded timestamps, use MAP_TO_RECORDED_OUTPUT.
Controls how inputs are mapped to outputs.
Each input stream is mapped to a single output stream (i.e., no input will appear on more than one output), supporting lock-free parallel analysis when combined with DEPENDENCY_IGNORE.
Each input stream is assumed to contain markers indicating how it was originally scheduled. Those markers are honored with respect to which core number (considered to correspond to output stream ordinal) an input is scheduled into. This requires an output stream count equal to the number of cores occupied by the input stream set. When combined with DEPENDENCY_TIMESTAMPS, this will precisely replay the recorded schedule; for this mode, dynamorio::drmemtrace::scheduler_tmpl_t:: scheduler_options_t.replay_as_traced_istream must be specified. The original as-traced cpuid that is mapped to each output stream can be obtained by calling the get_output_cpuid() function on each stream.
The input streams are scheduled using a new dynamic sequence onto the output streams. Any input markers indicating how the software threads were originally mapped to cores during tracing are ignored. Instead, inputs run until either a quantum expires (see dynamorio::drmemtrace::scheduler_tmpl_t::scheduler_options_t::quantum_unit) or a (potentially) blocking system call is identified. At this point, a new input is selected, taking into consideration other options such as priorities, core bindings, and inter-input dependencies.
A schedule recorded previously by this scheduler is to be replayed. The input schedule data is specified in dynamorio::drmemtrace::scheduler_tmpl_t:: scheduler_options_t.schedule_replay_istream. The same output count and input stream order and count must be re-specified; scheduling details such as regions of interest and core bindings do not need to be re-specified and are in fact ignored.
Quantum units used for replacing one input with another pre-emptively.
Uses the instruction count as the quantum.
Uses the user's notion of time as the quantum. This must be supplied by the user by calling the next_record() variant that takes in the current time.
Flags controlling aspects of the scheduler beyond the core scheduling.
Whether physical addresses should be provided in addition to virtual addresses.
Specifies that speculation should supply just NOP instructions.
Causes the get_record_ordinal() and get_instruction_ordinal() results for an output stream to equal those values for the current input stream for that output, rather than accumulating across inputs.
If there is just one input and just one output stream, this sets SCHEDULER_USE_INPUT_ORDINALS; otherwise, it has no effect.
Status codes used by non-stream member functions. get_error_string() provides additional information such as which input file path failed.
Status codes used by stream member functions. get_error_string() provides additional information such as which input file path failed.
Stream is healthy and can continue to advance.
Stream is at its end.
For dynamic scheduling with cross-stream dependencies, the scheduler may pause a stream if it gets ahead of another stream it should have a dependence on. This value is also used for schedules following the recorded timestamps (DEPENDENCY_TIMESTAMPS) to avoid one stream getting ahead of another. For replaying a schedule as it was traced with MAP_TO_RECORDED_OUTPUT this can indicate an idle period on a core where the traced workload was not currently scheduled.
Input region is out of bounds.
Feature not implemented.
Used for internal scheduler purposes.
Failed to record schedule for future replay.
Constructor & Destructor Documentation
Member Function Documentation
Returns a string further describing an error code.
Returns the number of input streams.
Returns the dynamorio::drmemtrace::memtrace_stream_t interface for the 'ordinal'-th input stream.
Returns the name (from get_stream_name()) of the 'ordinal'-th input stream.
Returns the 'ordinal'-th output stream.
Initializes the scheduler for the given inputs, count of output streams, and options.
Constructs options for a parallel no-inter-input-dependencies schedule where the output stream's get_record_ordinal() and get_instruction_ordinal() reflect just the current input rather than all past inputs on that output.
Constructs options for a serial as-recorded schedule where the output stream's get_record_ordinal() and get_instruction_ordinal() honor skipped records in the input if, and only if, there is a single input and a single output.
|scheduler_status_t dynamorio::drmemtrace::scheduler_tmpl_t< RecordType, ReaderType >::write_recorded_schedule||(||)|
Sentinel value indicating that no input stream is specified.
Sentinel value indicating that no input stream is specified.
The documentation for this class was generated from the following file: