DynamoRIO
Simulator Parameters

drmemtrace's behavior can be controlled through options passed after the -t drmemtrace but prior to the "--" delimiter on the command line:

$ bin64/drrun -t drmemtrace <options> <to> <drmemtrace> -- /path/to/target/app <args> <for> <app>

Boolean options can be disabled using a "-no_" prefix.

The parameters available are described below:

  • -offline
    default value: false
    By default, traces are processed online, sent over a pipe to a simulator. If this option is enabled, trace data is instead written to files in -outdir for later offline analysis. No simulator is executed.
  • -ipc_name
    default value: drcachesimpipe
    For online tracing and simulation (the default, unless -offline is requested), specifies the name of the named pipe used to communicate between the target application processes and the caching device simulator. On Linux this can include an absolute path (if it doesn't, a default temp directory will be used). A unique name must be chosen for each instance of the simulator being run at any one time. On Windows, the name is limited to 247 characters.
  • -outdir
    default value: .
    For the offline analysis mode (when -offline is requested), specifies the path to a directory where per-thread trace files will be written.
  • -subdir_prefix
    default value: drmemtrace
    For the offline analysis mode (when -offline is requested), specifies the prefix for the name of the sub-directory where per-thread trace files will be written. The sub-directory is created inside -outdir and has the form 'prefix.app-name.pid.id.dir'.
  • -indir
    default value: ""
    After a trace file is produced via -offline into -outdir, it can be passed to the simulator via this flag pointing at the subdirectory created in -outdir. The -offline tracing produces raw data files which are converted into final trace files on the first execution with -indir. The raw files can also be manually converted using the drraw2trace tool. Legacy single trace files with all threads interleaved into one are not supported with this option: use -infile instead.
  • -infile
    default value: ""
    Directs the simulator to use a single all-threads-interleaved-into-one trace file. This is a legacy file format that is no longer produced.
  • -jobs
    default value: -1
    By default, both post-processing of offline raw trace files and analysis of trace files is parallelized. This option controls the number of concurrent jobs. 0 disables concurrency and uses a single thread to perform all operations. A negative value sets the job count to the number of hardware threads, with a cap of 16. This is ignored for -core_sharded where -cores sets the parallelism.
  • -module_file
    default value: ""
    The opcode_mix tool needs the modules.log file (generated by the offline post-processing step in the raw/ subdirectory) in addition to the trace file. If the file is named modules.log and is in the same directory as the trace file, or a raw/ subdirectory below the trace file, this parameter can be omitted.
  • -alt_module_dir
    default value: ""
    Specifies a directory containing libraries referenced in -module_file for analysis tools, or in the raw modules file for post-prcoessing of offline raw trace files. This directory takes precedence over the recorded path.
  • -chunk_instr_count
    default value: 10000000
    Specifies the size in instructions of the chunks into which a trace output file is split inside a zipfile. This is the granularity of a fast seek. This only applies when generating .zip-format traces; when built without support for writing .zip files, this option is ignored. For 32-bit this cannot exceed 4G.
  • -instr_encodings
    default value: false
    By default instruction encodings are not sent to online tools, to reduce overhead. (Offline tools have them added by default.)
  • -funclist_file
    default value: ""
    The func_view tool needs the mapping from function name to identifier that was recorded during offline tracing. This data is stored in its own separate file in the raw/ subdirectory. If the file is named funclist.log and is in the same directory as the trace file, or a raw/ subdirectory below the trace file, this parameter can be omitted.
  • -cores
    default value: 4
    Specifies the number of cores to simulate. For -core_sharded, each core executes in parallel in its own worker thread and -jobs is ignored.
  • -line_size
    default value: 64
    Specifies the cache line size, which is assumed to be identical for L1 and L2 caches. Must be at least 4 and a power of 2.
  • -L1I_size
    default value: 32K
    Specifies the total size of each L1 instruction cache. L1I_size/L1I_assoc must be a power of 2 and a multiple of line_size.
  • -L1D_size
    default value: 32K
    Specifies the total size of each L1 data cache. L1D_size/L1D_assoc must be a power of 2 and a multiple of line_size.
  • -L1I_assoc
    default value: 8
    Specifies the associativity of each L1 instruction cache. L1I_size/L1I_assoc must be a power of 2 and a multiple of line_size.
  • -L1D_assoc
    default value: 8
    Specifies the associativity of each L1 data cache. L1D_size/L1D_assoc must be a power of 2 and a multiple of line_size.
  • -LL_size
    default value: 8M
    Specifies the total size of the unified last-level (L2) cache. LL_size/LL_assoc must be a power of 2 and a multiple of line_size.
  • -LL_assoc
    default value: 16
    Specifies the associativity of the unified last-level (L2) cache. LL_size/LL_assoc must be a power of 2 and a multiple of line_size.
  • -LL_miss_file
    default value: ""
    If non-empty, when running the cache simulator, requests that every last-level cache miss be written to a file at the specified path. Each miss is written in text format as a <program counter, address> pair. If this tool is linked with zlib, the file is written in gzip-compressed format. If non-empty, when running the cache miss analyzer, requests that prefetching hints based on the miss analysis be written to the specified file. Each hint is written in text format as a <program counter, stride, locality level> tuple.
  • -L0_filter
    default value: false
    DEPRECATED: Use the -L0I_filter and -L0D_filter options instead.
  • -L0I_filter
    default value: false
    Filters out instruction hits in a 'zero-level' cache during tracing itself, shrinking the final trace to only contain instructions that miss in this initial cache. This cache is direct-mapped with size equal to L0I_size. It uses virtual addresses regardless of -use_physical. The dynamic (pre-filtered) per-thread instruction count is tracked and supplied via a dynamorio::drmemtrace::TRACE_MARKER_TYPE_INSTRUCTION_COUNT marker at thread buffer boundaries and at thread exit.
  • -L0D_filter
    default value: false
    Filters out data hits in a 'zero-level' cache during tracing itself, shrinking the final trace to only contain data accesses that miss in this initial cache. This cache is direct-mapped with size equal to L0D_size. It uses virtual addresses regardless of -use_physical.
  • -L0I_size
    default value: 32K
    Specifies the size of the 'zero-level' instruction cache for L0I_filter. Must be a power of 2 and a multiple of line_size, unless it is set to 0, which disables instruction fetch entries from appearing in the trace.
  • -L0D_size
    default value: 32K
    Specifies the size of the 'zero-level' data cache for L0D_filter. Must be a power of 2 and a multiple of line_size, unless it is set to 0, which disables data entries from appearing in the trace.
  • -instr_only_trace
    default value: false
    If -instr_only_trace, only instruction fetch entries are included in the trace and data entries are omitted.
  • -coherence
    default value: false
    Writes to cache lines will invalidate other private caches that hold that line.
  • -use_physical
    default value: false
    If available, metadata with virtual-to-physical-address translation information is added to the trace. This is not possible from user mode on all platforms. The regular trace entries remain virtual, with a pair of markers of types dynamorio::drmemtrace::TRACE_MARKER_TYPE_PHYSICAL_ADDRESS and dynamorio::drmemtrace::TRACE_MARKER_TYPE_VIRTUAL_ADDRESS inserted at some prior point for each new or changed page mapping to show the corresponding physical addresses. If translation fails, a dynamorio::drmemtrace::TRACE_MARKER_TYPE_PHYSICAL_ADDRESS_NOT_AVAILABLE is inserted. This option may incur significant overhead both for the physical translation and as it requires disabling optimizations.For -offline, this option must be passed to both the tracer (to insert the markers) and the simulator (to use the markers).
  • -virt2phys_freq
    default value: 0
    This option only applies if -use_physical is enabled. The virtual to physical mapping is cached for performance reasons, yet the underlying mapping can change without notice. This option controls the frequency with which the cached value is ignored in order to re-access the actual mapping and ensure accurate results. The units are the number of memory accesses per forced access. A value of 0 uses the cached values for the entire application execution.
  • -cpu_scheduling
    default value: false
    By default, the simulator schedules threads to simulated cores in a static round-robin fashion. This option causes the scheduler to instead use the recorded cpu that each thread executed on (at a granularity of the trace buffer size) for scheduling, mapping traced cpu's to cores and running each segment of each thread on the core that owns the recorded cpu for that segment. This option is not supported with -core_serial; use -cpu_schedule_file with -core_serial instead.
  • -max_trace_size
    default value: 0
    If non-zero, this sets a maximum size on the amount of raw trace data gathered for each thread. This is not an exact limit: it may be exceeded by the size of one internal buffer. Once reached, instrumentation continues for that thread, but no further data is recorded.
  • -max_global_trace_refs
    default value: 0
    If non-zero, this sets a maximum size on the amount of trace entry references (of any type: instructions, loads, stores, markers, etc.) recorded. Once reached, instrumented execution continues, but no further data is recorded. This is similar to -exit_after_tracing but without terminating the process.The reference count is approximate.
  • -align_endpoints
    default value: true
    When using attach/detach to trace a burst, the attach and detach processes are staggered, with the set of threads producing trace data incrementally growing or shrinking. This results in uneven thread activity at the start and end of the burst. If this option is enabled, tracing is nop-ed until fully attached to all threads and is nop-ed as soon as detach starts, eliminating the unevenness. This also allows omitting threads that did nothing during the burst.
  • -trace_after_instrs
    default value: 0
    If non-zero, this causes tracing to be suppressed until this many dynamic instruction executions are observed from the start of the application. At that point, regular tracing is put into place. The threshold should be considered approximate, especially for larger values. Use -trace_for_instrs, -max_trace_size, or -max_global_trace_refs to set a limit on the subsequent trace length. Use -retrace_every_instrs to trace repeatedly.
  • -trace_for_instrs
    default value: 0
    If non-zero, this stops recording a trace after the specified number of instructions are traced. Unlike -exit_after_tracing, which kills the application (and counts data as well as instructions), the application continues executing. This can be combined with -retrace_every_instrs. The actual trace period may vary slightly from this number due to optimizations that reduce the overhead of instruction counting.
  • -retrace_every_instrs
    default value: 0
    This option augments -trace_for_instrs. After tracing concludes, this option causes non-traced instructions to be counted and after the number specified by this option, tracing will start up again for the -trace_for_instrs duration. This process repeats itself. This can be combined with -trace_after_instrs for an initial period of non-tracing. Each tracing window is delimited by TRACE_MARKER_TYPE_WINDOW_ID markers. For -offline traces, each window is placed into its own separate set of output files, unless -no_split_windows is set.
  • -split_windows
    default value: true
    By default, offline traces in separate windows from -retrace_every_instrs are written to a different set of files for each window. If this option is disabled, all windows are concatenated into a single trace, separated by TRACE_MARKER_TYPE_WINDOW_ID markers.
  • -exit_after_tracing
    default value: 0
    If non-zero, after tracing the specified number of references, the process is exited with an exit code of 0. The reference count is approximate. Use -max_global_trace_refs instead to avoid terminating the process.
  • -raw_compress
    default value: lz4
    Specifies the compression type to use for raw offline files: "snappy", "snappy_nocrc" (snappy without checksums, which is much faster), "gzip", "zlib", "lz4", or "none". Whether this reduces overhead depends on the storage type: for an SSD, zlib and gzip typically add overhead and would only be used if space is at a premium; snappy_nocrc and lz4 are nearly always performance wins.
  • -compress
    default value: zip
    Specifies the compression type to use for trace files: "zip", "gzip", "zlib", "lz4", or "none". In most cases where fast skipping by instruction count is not needed lz4 compression generally improves performance and is recommended. When it comes to storage types, the impact on overhead varies: for SSDs, zip and gzip often increase overhead and should only be chosen if space is limited.
  • -online_instr_types
    default value: false
    By default, offline traces include some information on the types of instructions, branches in particular. For online traces, this comes at a performance cost, so it is turned off by default.
  • -replace_policy
    default value: LRU
    Specifies the replacement policy for caches. Supported policies: LRU (Least Recently Used), LFU (Least Frequently Used), FIFO (First-In-First-Out).
  • -data_prefetcher
    default value: nextline
    Specifies the hardware data prefetcher policy. The currently supported policies are 'nextline' (fetch the subsequent cache line) and 'none' (disables hardware prefetching). The prefetcher is located between the L1D and LL caches.
  • -page_size
    default value: 4K
    Specifies the virtual/physical page size.
  • -TLB_L1I_entries
    default value: 32
    Specifies the number of entries in each L1 instruction TLB. Must be a power of 2.
  • -TLB_L1D_entries
    default value: 32
    Specifies the number of entries in each L1 data TLB. Must be a power of 2.
  • -TLB_L1I_assoc
    default value: 32
    Specifies the associativity of each L1 instruction TLB. Must be a power of 2.
  • -TLB_L1D_assoc
    default value: 32
    Specifies the associativity of each L1 data TLB. Must be a power of 2.
  • -TLB_L2_entries
    default value: 1024
    Specifies the number of entries in each unified L2 TLB. Must be a power of 2.
  • -TLB_L2_assoc
    default value: 4
    Specifies the associativity of each unified L2 TLB. Must be a power of 2.
  • -TLB_replace_policy
    default value: LFU
    Specifies the replacement policy for TLBs. Supported policies: LFU (Least Frequently Used).
  • -tool
    default value: cache_simulator
    Predefined types: cache_simulator, miss_analyzer, TLB_simulator, reuse_distance, reuse_time, histogram, basic_counts, invariant_checker, schedule_stats, or record_filter. The record_filter tool cannot be combined with the others as it operates on raw disk records. To invoke an external tool: specify its name as identified by a name.drcachesim config file in the DR tools directory.
  • -verbose
    default value: 0
    Verbosity level for notifications.
  • -show_func_trace
    default value: true
    In the func_trace tool, this controls whether every traced call is shown or instead only aggregate statistics are shown.
  • -test_mode
    default value: false
    Run extra analyses for sanity checks on the trace.
  • -test_mode_name
    default value: ""
    Run extra analyses for specific sanity checks by name on the trace.
  • -disable_optimizations
    default value: false
    Disables various optimizations where information is omitted from offline trace recording when it can be reconstructed during post-processing. This is meant for testing purposes.
  • -dr
    default value: ""
    Specifies the path of the DynamoRIO root directory.
  • -dr_debug
    default value: false
    Requests use of the debug build of DynamoRIO rather than the release build.
  • -dr_ops
    default value: ""
    Specifies the options to pass to DynamoRIO.
  • -tracer
    default value: ""
    The full path to the tracer library.
  • -tracer_alt
    default value: ""
    The full path to the tracer library for the other bitwidth, for use on child processes with a different bitwidth from their parent. If empty, such child processes will die with fatal errors.
  • -interval_microseconds
    default value: 0
    Desired length of each trace interval, defined in microseconds of trace time. Trace intervals are measured using the TRACE_MARKER_TYPE_TIMESTAMP marker values. If set, analysis tools receive a callback at the end of each interval, and one at the end of trace analysis to print the whole-trace interval results.
  • -interval_instr_count
    default value: 0
    Desired length of each trace interval, defined in instr count of each shard. With -parallel, this does not support whole trace intervals, only per-shard intervals. If set, analysis tools receive a callback at the end of each interval, and separate callbacks per shard at the end of trace analysis to print each shard's interval results.
  • -only_thread
    default value: 0
    Limits analyis to the single thread with the given identifier. 0 enables all threads.
  • -skip_instrs
    default value: 0
    Specifies the number of instructions to skip in the beginning of the trace analysis. For serial iteration, this number is computed just once across the interleaving sequence of all threads; for parallel iteration, each thread skips this many insructions. When built with zipfile support, this skipping is optimized and large instruction counts can be quickly skipped; this is not the case for -skip_refs.
  • -skip_refs
    default value: 0
    Specifies the number of references to skip in the beginning of the application execution. These memory references are dropped instead of being simulated. This skipping may be slow for large skip values; consider -skip_instrs for a faster method of skipping.
  • -L0_filter_until_instrs
    default value: 0
    Specifies the number of instructions to run in warmup mode. This instruction count is per-thread. In warmup mode, we filter accesses through the -L0{D,I}_filter caches. If neither -L0D_filter nor -L0I_filter are specified then both are assumed to be true. The size of these can be specified using -L0{D,I}_size. The filter instructions come after the -trace_after_instrs count and before the full trace. This is intended to be used together with other trace options (e.g., -trace_for_instrs, -exit_after_tracing, -max_trace_size etc.) but with the difference that a filter trace is also collected. The filter trace and full trace are stored in a single file separated by a TRACE_MARKER_TYPE_FILTER_ENDPOINT marker. When used with windows (i.e., -retrace_every_instrs), each window contains a filter trace and a full trace. Therefore TRACE_MARKER_TYPE_WINDOW_ID markers indicate start of filtered records.
  • -warmup_refs
    default value: 0
    Specifies the number of memory references to warm up caches before simulation. The warmup references come after the skipped references and before the simulated references. This flag is incompatible with warmup_fraction.
  • -warmup_fraction
    default value: 0
    Specifies the fraction of last level cache blocks to be loaded such that the cache is considered to be warmed up before simulation. The warmup fraction is computed after the skipped references and before simulated references. This flag is incompatible with warmup_refs.
  • -sim_refs
    default value: 8589934592G
    Specifies the number of memory references to simulate. The simulated references come after the skipped and warmup references, and the references following the simulated ones are dropped.
  • -view_syntax
    default value: att/arm/dr/riscv
    Specifies the syntax to use when viewing disassembled offline traces. The option can be set to one of "att" (AT&T style), "intel" (Intel style), "dr" (DynamoRIO's native style with all implicit operands listed), "arm" (32-bit ARM style), and "riscv" (RISC-V style). An invalid specification falls back to the default, which is "att" for x86, "arm" for ARM (32-bit), "dr" for AArch64, and "riscv" for RISC-V.
  • -config_file
    default value: ""
    The full path to the cache hierarchy configuration file.
  • -report_top
    default value: 10
    Specifies the number of top results to be reported.
  • -reuse_distance_threshold
    default value: 100
    Specifies the reuse distance threshold for reporting the distant repeated references. A reference is a distant repeated reference if the distance to the previous reference on the same cache line exceeds the threshold.
  • -reuse_distance_histogram
    default value: false
    By default only the mean, median, and standard deviation of the reuse distances are reported. This option prints out the full histogram of reuse distances.
  • -reuse_skip_dist
    default value: 500
    Specifies the distance between nodes in the skip list. For optimal performance, set this to a value close to the estimated average reuse distance of the dataset.
  • -reuse_distance_limit
    default value: 0
    Specifies the maximum length of the access history list used for distance calculation. Setting this limit can significantly improve performance and reduce memory consumption for very long traces.
  • -reuse_verify_skip
    default value: false
    Verifies every skip list-calculated reuse distance with a full list walk. This incurs significant additional overhead. This option is only available in debug builds.
  • -reuse_histogram_bin_multiplier
    default value: 1
    The first histogram bin has a size of 1, meaning it contains the count for one distance. Each subsequent bin size is increased by this multiplier. For multipliers >1.0, this results in geometric growth of bin sizes, with multiple distance values being reported for each bin. For large traces, a value of 1.05 works well to limit the output to a reasonable number of bins. Note that this option only affects the printing of histograms via the -reuse_distance_histogram option; the raw histogram data is always collected at full precision.
  • -record_function
    default value: ""
    Record invocations trace for the specified function(s) in the option value. Default value is empty. The value should fit this format: function_name|func_args_num (e.g., -record_function "memset|3") with an optional suffix "|noret" (e.g., -record_function "free|1|noret"). The trace would contain information for each function invocation's return address, function argument value(s), and (unless "|noret" is specified) function return value. (If multiple requested functions map to the same address and differ in whether "noret" was specified, the attribute from the first one requested will be used. If they differ in the number of args, the minimum value will be used.) We only record pointer-sized arguments and return values. The trace identifies which function is involved via a numeric ID entry prior to each set of value entries. The mapping from numeric ID to library-qualified symbolic name is recorded during tracing in a file "funclist.log" whose format is described by the drmemtrace_get_funclist_path() function's documentation. If the target function is in the dynamic symbol table, then the function_name should be a mangled name (e.g. "_Znwm" for "operator new", "_ZdlPv" for "operator delete"). Otherwise, the function_name should be a demangled name. Recording multiple functions can be achieved by using the separator "&" (e.g., -record_function "memset|3&memcpy|3"), or specifying multiple -record_function options (e.g., -record_function "memset|3" -record_function "memcpy|3"). Note that the provided function name should be unique, and not collide with existing heap functions (see -record_heap_value) if -record_heap option is enabled.
  • -record_heap
    default value: false
    It is a convenience option to enable recording a trace for the defined heap functions in -record_heap_value. Specifying this option is equivalent to -record_function [heap_functions], where [heap_functions] is the value in -record_heap_value.
  • -record_heap_value
    default value: malloc|1&free|1|noret&realloc|2&calloc|2&tc_malloc|1&tc_free|1|noret&tc_realloc|2&tc_calloc|2&__libc_malloc|1&__libc_free|1|noret&__libc_realloc|2&__libc_calloc|2&_Znwm|1&_ZnwmRKSt9nothrow_t|2&_ZnwmSt11align_val_t|2&_ZnwmSt11align_val_tRKSt9nothrow_t|3&_ZnwmPv|2&_Znam|1&_ZnamRKSt9nothrow_t|2&_ZnamSt11align_val_t|2&_ZnamSt11align_val_tRKSt9nothrow_t|3&_ZnamPv|2&_ZdlPv|1|noret&_ZdlPvRKSt9nothrow_t|2|noret&_ZdlPvSt11align_val_t|2|noret&_ZdlPvSt11align_val_tRKSt9nothrow_t|3|noret&_ZdlPvm|2|noret&_ZdlPvmSt11align_val_t|3|noret&_ZdlPvS_|2|noret&_ZdaPv|1|noret&_ZdaPvRKSt9nothrow_t|2|noret&_ZdaPvSt11align_val_t|2|noret&_ZdaPvSt11align_val_tRKSt9nothrow_t|3|noret&_ZdaPvm|2|noret&_ZdaPvmSt11align_val_t|3|noret&_ZdaPvS_|2|noret
    Functions recorded by -record_heap. The option value should fit the same format required by -record_function. These functions will not be traced unless -record_heap is specified.
  • -record_dynsym_only
    default value: false
    Symbol lookup can be expensive for large applications and libraries. This option causes the symbol lookup for -record_function and -record_heap to look in the dynamic symbol table only.
  • -record_replace_retaddr
    default value: false
    Function wrapping can be expensive for large concurrent applications. This option causes the post-function control point to be located using return address replacement, which has lower overhead, but runs the risk of breaking an application that examines or changes its own return addresses in the recorded functions.
  • -record_syscall
    default value: ""
    Record the parameters and success of the specified system call number(s). The option value should fit this format: sycsall_number|parameter_number E.g., -record_syscall "2|2" will record SYS_open's 2 parameters and whether successful (1 for success or 0 for failure, in a function return value record) for x86 Linux. SYS_futex is recorded by default on Linux and this option's value adds to futex rather than replacing it (setting futex to 0 parameters disables). The trace identifies which syscall owns each set of parameter and return value records via a numeric ID equal to the syscall number + TRACE_FUNC_ID_SYSCALL_BASE. Recording multiple syscalls can be achieved by using the separator "&" (e.g., -record_syscall "202|6&3|1"), or specifying multiple -record_syscall options. It is up to the user to ensure the values are correct; a too-large parameter count may cause tracing to fail with an error mid-run.
  • -miss_count_threshold
    default value: 50000
    Specifies the minimum number of LLC misses of a load for it to be eligible for analysis in search of patterns in the miss address stream.
  • -miss_frac_threshold
    default value: 0.005
    Specifies the minimum fraction of LLC misses of a load (from all misses) for it to be eligible for analysis in search of patterns in the miss address stream.
  • -confidence_threshold
    default value: 0.75
    Specifies the minimum confidence to include a discovered pattern in the output results. Confidence in a discovered pattern for a load instruction is calculated as the fraction of the load's misses with the discovered pattern over all the load's misses.
  • -enable_drstatecmp
    default value: false
    When true, this option enables the drstatecmp library that performs state comparisons to detect instrumentation-induced bugs due to state clobbering.
  • -enable_kernel_tracing
    default value: false
    By default, offline tracing only records a userspace trace. If this option is enabled, offline tracing will record each syscall's Kernel PT and write every syscall's PT and metadata to files in -outdir/kernel.raw/ for later offline analysis. And this feature is available only on Intel CPUs that support Intel@ Processor Trace.
  • -core_sharded
    default value: false
    By default, the input trace is analyzed in parallel across shards equal to software threads. This option instead schedules those threads onto virtual cores and analyzes each core in parallel. Thus, each shard consists of pieces from many software threads. How the scheduling is performed is controlled by a set of options with the prefix "sched_" along with -cores.
  • -core_serial
    default value: false
    In this mode, scheduling is performed just like for -core_sharded. However, the resulting schedule is acted upon by a single analysis threadwhich walks the N cores in lockstep in round robin fashion. How the scheduling is performed is controlled by a set of options with the prefix "sched_" along with -cores.
  • -sched_quantum
    default value: 1000000
    Applies to -core_sharded and -core_serial. Scheduling quantum: in microseconds of wall-clock time if -sched_time is set; otherwise in instructions.
  • -sched_time
    default value: false
    Applies to -core_sharded and -core_serial. Whether to use wall-clock time for the scheduling quantum, with a value equal to -sched_quantum in microseconds of wall-clock time.
  • -sched_order_time
    default value: true
    Applies to -core_sharded and -core_serial. Whether to honor recorded timestamps for ordering
  • -sched_syscall_switch_us
    default value: 30000000
    Minimum latency in timestamp units (us) to consider a non-blocking syscall as incurring a context switch (see -sched_blocking_switch_us for maybe-blocking syscalls). Applies to -core_sharded and -core_serial.
  • -sched_blocking_switch_us
    default value: 500
    Minimum latency in timestamp units (us) to consider any syscall that is marked as maybe-blocking to incur a context switch. Applies to -core_sharded and -core_serial.
  • -sched_block_scale
    default value: 1000
    The scale applied to the microsecond latency of blocking system calls. A higher value here results in blocking syscalls keeping inputs unscheduled for longer. This should roughly equal the slowdown of instruction record processing versus the original (untraced) application execution.
  • -sched_block_max_us
    default value: 25000000
    The maximum blocked time, after scaling with -sched_block_scale.
  • -record_file
    default value: ""
    Applies to -core_sharded and -core_serial. Path for storing record of schedule.
  • -replay_file
    default value: ""
    Applies to -core_sharded and -core_serial. Path with stored schedule for replay.
  • -cpu_schedule_file
    default value: ""
    Applies to -core_sharded and -core_serial. Path with stored as-traced schedule for replay.
  • -sched_switch_file
    default value: ""
    Applies to -core_sharded and -core_serial. Path to file holding context switch sequences. The file can contain multiple sequences each with regular trace headers and the sequence proper bracketed by TRACE_MARKER_TYPE_CONTEXT_SWITCH_START and TRACE_MARKER_TYPE_CONTEXT_SWITCH_END markers.
  • -sched_randomize
    default value: false
    Applies to -core_sharded and -core_serial. Disables the normal methods of choosing the next input based on priority, timestamps (if -sched_order_time is set), and FIFO order and instead selects the next input randomly. This is intended for experimental use in sensitivity studies.
  • -sched_disable_direct_switches
    default value: false
    Applies to -core_sharded and -core_serial. Disables switching to the recorded targets of TRACE_MARKER_TYPE_DIRECT_THREAD_SWITCH system call metadata markers and causes the associated system call to be treated like any other call with a switch being determined by latency and the next input in the queue. The TRACE_MARKER_TYPE_DIRECT_THREAD_SWITCH markers are not removed from the trace.
  • -schedule_stats_print_every
    default value: 500000
    A letter is printed every N instrs or N waits
  • -syscall_template_file
    default value: ""
    Path to the file that contains system call trace templates. If set, system call traces will be injected from the file into the resulting trace. This is still experimental so the template file format may change without backward compatibility.
  • -filter_stop_timestamp
    default value: 0
    Record filtering will be disabled (everything will be output) when the tool sees a TRACE_MARKER_TYPE_TIMESTAMP marker with timestamp greater than the specified value.
  • -filter_cache_size
    default value: 0
    Enable data cache filter with given size (in bytes), with 64 byte line size and a direct mapped LRU cache.
  • -filter_trace_types
    default value: ""
    Comma-separated integers for trace types to remove. See trace_type_t for the list of trace entry types.
  • -filter_marker_types
    default value: ""
    Comma-separated integers for marker types to remove. See trace_marker_type_t for the list of marker types.
  • -filter_encodings2regdeps
    default value: false
    This option is for -simulator_type record_filter. When present, it converts the encoding of instructions from a real ISA to the DR_ISA_REGDEPS synthetic ISA.
  • -trim_before_timestamp
    default value: 0
    Removes all records (after headers) before the first TRACE_MARKER_TYPE_TIMESTAMP marker in the trace with timestamp greater than or equal to the specified value.
  • -trim_after_timestamp
    default value: 18446744073709551615
    Removes all records from the first TRACE_MARKER_TYPE_TIMESTAMP marker with timestamp larger than the specified value.
  • -abort_on_invariant_error
    default value: true
    When set to true, the trace invariant checker analysis tool aborts when a trace invariant error is found. Otherwise it prints the error and continues. Also, the total invariant error count is printed at the end; a non-zero error count does not affect the exit code of the analyzer.