To dump a trace for future offline analysis, use the
The collected traces will be dumped into a newly created directory, which can be passed to drcachesim for offline cache simulation with the
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
If built with the zlib library, the canonical trace files are automatically compressed with gzip. The trace reader supports reading gzip or snappy compressed files.
The raw files are also compressed, controlled by the -p raw_compress option. If built with lz4 support and not statically linked with the application, lz4 is used by default. Whether compressing the raw files is a net reduction in overhead depends on the storage medium and compression scheme. The "lz4" and "snappy_nocrc" schemes are generally performnce wins even for an SSD, while "gzip" or "zlib" slow things down. For a spinning disk, any compression should be a net win.
Older versions of the simulator produced a single trace file containing all threads interleaved. The
-infile option supports reading these legacy files:
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.