DynamoRIO
Offline Traces and Analysis

To dump a trace for future offline analysis, use the offline parameter:

$ bin64/drrun -t drcachesim -offline -- /path/to/target/app <args> <for> <app>

The collected traces will be dumped into a newly created directory, which can be passed to drcachesim for offline cache simulation with the -indir option:

$ bin64/drrun -t drcachesim -indir drmemtrace.app.pid.xxxx.dir/

The direct results of the -offline run are raw, compacted files, stored in a raw/ subdirectory of the drmemtrace.app.pid.xxxx.dir directory. The -indir option both converts the data to a canonical trace form and passes the resulting data to the cache simulator. The canonical trace data is stored by -indir in a trace/ subdirectory inside the drmemtrace.app.pid.xxxx.dir/ directory. For both the raw and canonical data, a separate file per application thread is used. If the canonical data already exists, future runs will use that data rather than re-converting it. Either the top-level directory or the trace/ subdirectory may be pointed at with -indir:

$ bin64/drrun -t drcachesim -indir drmemtrace.app.pid.xxxx.dir/trace

The canonical trace files may be manually compressed with gzip, as the trace reader supports reading gzipped files.

Older versions of the simulator produced a single trace file containing all threads interleaved. The -infile option supports reading these legacy files:

$ gzip drmemtrace.app.pid.xxxx.dir/drmemtrace.trace
$ bin64/drrun -t drcachesim -infile drmemtrace.app.pid.xxxx.dir/drmemtrace.trace.gz

The same analysis tools used online are available for offline: the trace format is identical.

For details on the offline trace format and how to diagnose problems with offline traces, see DrCacheSim Offline Trace Debugging.