Customizing the Tracer

The tracer supports customization for special-purpose i/o via drmemtrace_replace_file_ops(), allowing traces to be written to locations not supported by simple UNIX file operations. One option for using this function is to create a new client which links with the provided drmemtrace_static library, includes the drmemtrace/drmemtrace.h header via:


And includes its own dr_client_main() which calls drmemtrace_client_main().

The tracer also supports storing custom data with each module (i.e., library or executable) such as a build identifier via drmemtrace_custom_module_data(). The custom data may be retrieved by creating a custom offline trace post-processor and using the module_mapper_t class.