DynamoRIO
|
#include <record_filter.h>
Data Structures | |
class | record_filter_func_t |
struct | record_filter_info_t |
Public Member Functions | |
std::string | initialize_stream (memtrace_stream_t *serial_stream) override |
bool | print_results () override |
bool | parallel_shard_supported () override |
std::string | initialize_shard_type (shard_type_t shard_type) override |
void * | parallel_shard_init_stream (int shard_index, void *worker_data, memtrace_stream_t *shard_stream) override |
bool | parallel_shard_exit (void *shard_data) override |
std::string | parallel_shard_error (void *shard_data) override |
Public Member Functions inherited from dynamorio::drmemtrace::analysis_tool_tmpl_t< RecordType > | |
analysis_tool_tmpl_t () | |
virtual std::string | initialize () |
virtual shard_type_t | preferred_shard_type () |
virtual bool | operator! () |
virtual std::string | get_error_string () |
virtual bool | process_memref (const RecordType &entry)=0 |
virtual interval_state_snapshot_t * | generate_interval_snapshot (uint64_t interval_id) |
virtual bool | finalize_interval_snapshots (std::vector< interval_state_snapshot_t * > &interval_snapshots) |
virtual interval_state_snapshot_t * | combine_interval_snapshots (const std::vector< const interval_state_snapshot_t * > latest_shard_snapshots, uint64_t interval_end_timestamp) |
virtual bool | print_interval_results (const std::vector< interval_state_snapshot_t * > &interval_snapshots) |
virtual bool | release_interval_snapshot (interval_state_snapshot_t *interval_snapshot) |
virtual void * | parallel_worker_init (int worker_index) |
virtual std::string | parallel_worker_exit (void *worker_data) |
virtual void * | parallel_shard_init (int shard_index, void *worker_data) |
virtual bool | parallel_shard_memref (void *shard_data, const RecordType &entry) |
virtual interval_state_snapshot_t * | generate_shard_interval_snapshot (void *shard_data, uint64_t interval_id) |
analysis_tool_tmpl_t () | |
virtual std::string | initialize () |
virtual shard_type_t | preferred_shard_type () |
virtual bool | operator! () |
virtual std::string | get_error_string () |
virtual bool | process_memref (const RecordType &entry)=0 |
virtual interval_state_snapshot_t * | generate_interval_snapshot (uint64_t interval_id) |
virtual bool | finalize_interval_snapshots (std::vector< interval_state_snapshot_t * > &interval_snapshots) |
virtual interval_state_snapshot_t * | combine_interval_snapshots (const std::vector< const interval_state_snapshot_t * > latest_shard_snapshots, uint64_t interval_end_timestamp) |
virtual bool | print_interval_results (const std::vector< interval_state_snapshot_t * > &interval_snapshots) |
virtual bool | release_interval_snapshot (interval_state_snapshot_t *interval_snapshot) |
virtual void * | parallel_worker_init (int worker_index) |
virtual std::string | parallel_worker_exit (void *worker_data) |
virtual void * | parallel_shard_init (int shard_index, void *worker_data) |
virtual bool | parallel_shard_memref (void *shard_data, const RecordType &entry) |
virtual interval_state_snapshot_t * | generate_shard_interval_snapshot (void *shard_data, uint64_t interval_id) |
Detailed Description
Analysis tool that filters the trace_entry_t records of an offline trace. Streams through each shard independenty and parallelly, and writes the filtered version to the output directory with the same base name. Serial mode is not yet supported.
Member Function Documentation
◆ initialize_shard_type()
|
overridevirtual |
Identifies the shard type for this analysis. The return value indicates whether the tool supports this shard type, with failure (a non-empty string) being treated as a fatal error for the analysis.
Reimplemented from dynamorio::drmemtrace::analysis_tool_tmpl_t< RecordType >.
◆ initialize_stream()
|
overridevirtual |
Tools are encouraged to perform any initialization that might fail here rather than in the constructor. The serial_stream
interface allows tools to query details of the underlying trace during serial operation; it is nullptr for parallel operation (a per-shard version is passed to parallel_shard_init_stream()). On an error, this returns an error string. On success, it returns "".
Reimplemented from dynamorio::drmemtrace::analysis_tool_tmpl_t< RecordType >.
◆ parallel_shard_error()
|
overridevirtual |
Returns a description of the last error for this shard.
Reimplemented from dynamorio::drmemtrace::analysis_tool_tmpl_t< RecordType >.
◆ parallel_shard_exit()
|
overridevirtual |
Invoked once when all trace entries for a shard have been processed. shard_data
is the value returned by parallel_shard_init_stream() for this shard. This allows a tool to clean up its thread data, or to report thread analysis results. Most tools, however, prefer to aggregate data or at least sort data, and perform nothing here, doing all cleanup in print_results() by storing the thread data into a table. Return whether exiting was successful. On failure, parallel_shard_error() returns a descriptive message.
Reimplemented from dynamorio::drmemtrace::analysis_tool_tmpl_t< RecordType >.
◆ parallel_shard_init_stream()
|
overridevirtual |
Invoked once for each trace shard prior to calling parallel_shard_memref() for that shard, this allows a tool to create data local to a shard. The shard_index
is the 0-based ordinal of the shard, serving as a unique identifier allowing shard data to be stored into a global table if desired (typically for aggregation use in print_results()). The worker_data
is the return value of parallel_worker_init() for the worker thread who will exclusively operate on this shard. The shard_stream
allows tools to query details of the underlying trace shard during parallel operation; it is valid only until parallel_shard_exit() is called. The return value here will be passed to each invocation of parallel_shard_memref() for that same shard.
Reimplemented from dynamorio::drmemtrace::analysis_tool_tmpl_t< RecordType >.
◆ parallel_shard_supported()
|
overridevirtual |
Returns whether this tool supports analyzing trace shards concurrently, or whether it needs to see a single thread-interleaved stream of traced events. This may be called prior to initialize().
Reimplemented from dynamorio::drmemtrace::analysis_tool_tmpl_t< RecordType >.
◆ print_results()
|
overridevirtual |
This routine reports the results of the trace analysis. It should leave the i/o state in a default format (std::dec) to support multiple tools. The return value indicates whether it was successful. On failure, get_error_string() returns a descriptive message.
Implements dynamorio::drmemtrace::analysis_tool_tmpl_t< RecordType >.
The documentation for this class was generated from the following file:
- /home/runner/work/dynamorio/dynamorio/build_release-64/clients/include/drmemtrace/record_filter.h