dynamorio::drmemtrace::default_memtrace_stream_t Class Reference

#include <memtrace_stream.h>

Inheritance diagram for dynamorio::drmemtrace::default_memtrace_stream_t:
dynamorio::drmemtrace::memtrace_stream_t

Public Member Functions

uint64_t get_record_ordinal () const override
 
uint64_t get_instruction_ordinal () const override
 
std::string get_stream_name () const override
 
uint64_t get_last_timestamp () const override
 
uint64_t get_first_timestamp () const override
 
uint64_t get_version () const override
 
uint64_t get_filetype () const override
 
uint64_t get_cache_line_size () const override
 
uint64_t get_chunk_instr_count () const override
 
uint64_t get_page_size () const override
 
int64_t get_output_cpuid () const override
 
int get_shard_index () const override
 
int64_t get_workload_id () const override
 
int64_t get_tid () const override
 
- Public Member Functions inherited from dynamorio::drmemtrace::memtrace_stream_t
virtual ~memtrace_stream_t ()
 
virtual bool is_record_synthetic () const
 
virtual int64_t get_input_id () const
 
virtual memtrace_stream_tget_input_interface () const
 
virtual bool is_record_kernel () const
 
virtual double get_schedule_statistic (schedule_statistic_t stat) const
 

Additional Inherited Members

- Public Types inherited from dynamorio::drmemtrace::memtrace_stream_t
enum  schedule_statistic_t {
  SCHED_STAT_SWITCH_INPUT_TO_INPUT,
  SCHED_STAT_SWITCH_INPUT_TO_IDLE,
  SCHED_STAT_SWITCH_IDLE_TO_INPUT,
  SCHED_STAT_SWITCH_NOP,
  SCHED_STAT_QUANTUM_PREEMPTS,
  SCHED_STAT_DIRECT_SWITCH_ATTEMPTS,
  SCHED_STAT_DIRECT_SWITCH_SUCCESSES,
  SCHED_STAT_MIGRATIONS,
  SCHED_STAT_RUNQUEUE_STEALS,
  SCHED_STAT_RUNQUEUE_REBALANCES,
  SCHED_STAT_HIT_OUTPUT_LIMIT,
  SCHED_STAT_TYPE_COUNT
}
 

Detailed Description

Implementation of memtrace_stream_t useful for mocks in tests.

Member Function Documentation

◆ get_cache_line_size()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_cache_line_size ( ) const
inlineoverridevirtual

Returns the cache line size from the TRACE_MARKER_TYPE_CACHE_LINE_SIZE record in the trace header.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_chunk_instr_count()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_chunk_instr_count ( ) const
inlineoverridevirtual

Returns the chunk instruction count from the TRACE_MARKER_TYPE_CHUNK_INSTR_COUNT record in the trace header.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_filetype()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_filetype ( ) const
inlineoverridevirtual

Returns the OFFLINE_FILE_TYPE_* bitfields of type offline_file_type_t identifying the architecture and other key high-level attributes of the trace from the TRACE_MARKER_TYPE_FILETYPE record in the trace header.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_first_timestamp()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_first_timestamp ( ) const
inlineoverridevirtual

Returns the value of the first seen TRACE_MARKER_TYPE_TIMESTAMP marker.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_instruction_ordinal()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_instruction_ordinal ( ) const
inlineoverridevirtual

Returns the count of instructions from the start of the trace to this point. This includes instructions skipped over and not presented to any tool.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_last_timestamp()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_last_timestamp ( ) const
inlineoverridevirtual

Returns the value of the most recently seen TRACE_MARKER_TYPE_TIMESTAMP marker.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_output_cpuid()

int64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_output_cpuid ( ) const
inlineoverridevirtual

Returns a unique identifier for the current "output cpu". Generally this only applies when using SHARD_BY_CORE. For dynamic schedules, the identifier is typically an output cpu ordinal equal to get_shard_index(). For replaying an as-traced schedule, the identifier is typically the original input cpu which is now mapped directly to this output. If not implemented for the current mode, -1 is returned.

Reimplemented from dynamorio::drmemtrace::memtrace_stream_t.

◆ get_page_size()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_page_size ( ) const
inlineoverridevirtual

Returns the page size from the TRACE_MARKER_TYPE_PAGE_SIZE record in the trace header.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_record_ordinal()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_record_ordinal ( ) const
inlineoverridevirtual

Returns the count of memref_t records from the start of the trace to this point. This includes records skipped over and not presented to any tool. It does not include synthetic records (see is_record_synthetic()).

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_shard_index()

int dynamorio::drmemtrace::default_memtrace_stream_t::get_shard_index ( ) const
inlineoverridevirtual

Returns the 0-based ordinal for the current shard. For parallel analysis, this equals the shard_index passed to parallel_shard_init_stream(). This is more useful for serial modes where there is no other convenience mechanism to determine such an index; it allows a tool to compute per-shard results even in serial mode. The shard orderings in serial mode may not always mach the ordering in parallel mode. If not implemented, -1 is returned.

Reimplemented from dynamorio::drmemtrace::memtrace_stream_t.

◆ get_stream_name()

std::string dynamorio::drmemtrace::default_memtrace_stream_t::get_stream_name ( ) const
inlineoverridevirtual

Returns a name for the memtrace stream. For stored offline traces, this is the base name of the trace on disk. For online traces, this is the name of the pipe.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_tid()

int64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_tid ( ) const
inlineoverridevirtual

Returns the thread identifier for the current input trace. This is a convenience method for use in parallel_shard_init_stream() prior to access to any memref_t records.

Reimplemented from dynamorio::drmemtrace::memtrace_stream_t.

◆ get_version()

uint64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_version ( ) const
inlineoverridevirtual

Returns the trace_version_t value from the TRACE_MARKER_TYPE_VERSION record in the trace header.

Implements dynamorio::drmemtrace::memtrace_stream_t.

◆ get_workload_id()

int64_t dynamorio::drmemtrace::default_memtrace_stream_t::get_workload_id ( ) const
inlineoverridevirtual

Returns a unique identifier for the current workload. This might be an ordinal from the list of active workloads, or some other identifier. This is guaranteed to be unique among all inputs, unlike the process and thread identifiers in memref_t. If not implemented for the current mode, -1 is returned.

Reimplemented from dynamorio::drmemtrace::memtrace_stream_t.


The documentation for this class was generated from the following file:
  • /home/runner/work/dynamorio/dynamorio/build_release-64/clients/include/drmemtrace/memtrace_stream.h