dynamorio::drmemtrace::record_filter_t::record_filter_func_t Class Referenceabstract

#include <record_filter.h>

Public Member Functions

virtual void * parallel_shard_init (memtrace_stream_t *shard_stream, bool partial_trace_filter)=0
 
virtual bool parallel_shard_filter (trace_entry_t &entry, void *shard_data, record_filter_info_t &record_filter_info)=0
 
virtual bool parallel_shard_exit (void *shard_data)=0
 
std::string get_error_string ()
 
virtual uint64_t update_filetype (uint64_t filetype)
 

Detailed Description

The base class for a single filter.

Member Function Documentation

◆ get_error_string()

std::string dynamorio::drmemtrace::record_filter_t::record_filter_func_t::get_error_string ( )
inline

Returns the error string. If no error occurred, it will be empty.

◆ parallel_shard_exit()

virtual bool dynamorio::drmemtrace::record_filter_t::record_filter_func_t::parallel_shard_exit ( void *  shard_data)
pure virtual

Invoked when all trace_entry_t in a shard have been processed by parallel_shard_filter(). shard_data is same as what was returned by parallel_shard_init().

◆ parallel_shard_filter()

virtual bool dynamorio::drmemtrace::record_filter_t::record_filter_func_t::parallel_shard_filter ( trace_entry_t entry,
void *  shard_data,
record_filter_info_t record_filter_info 
)
pure virtual

Invoked for each trace_entry_t in the shard. It returns whether or not this entry should be included in the result trace. shard_data is same as what was returned by parallel_shard_init(). The given entry is included in the result trace iff all provided dynamorio::drmemtrace::record_filter_t::record_filter_func_t return true. The entry parameter can also be modified by the record_filter_func_t. The passed entry is not guaranteed to be the original one from the trace if other filter tools are present, and may include changes made by other tools. An error is indicated by setting error_string_ to a non-empty value. record_filter_info is the interface used by record_filter to share data with its filters.

◆ parallel_shard_init()

virtual void* dynamorio::drmemtrace::record_filter_t::record_filter_func_t::parallel_shard_init ( memtrace_stream_t shard_stream,
bool  partial_trace_filter 
)
pure virtual

Invoked for each shard prior to calling parallel_shard_filter() on any entry. The returned pointer is passed to all invocations of parallel_shard_filter() and parallel_shard_exit(). This routine can be used to initialize state for each shard. partial_trace_filter denotes whether the trace will be filtered only partially, e.g. due to stop_timestamp.

◆ update_filetype()

virtual uint64_t dynamorio::drmemtrace::record_filter_t::record_filter_func_t::update_filetype ( uint64_t  filetype)
inlinevirtual

If a filter modifies the file type of a trace, its changes should be made here, so they are visible to the record_filter even if the trace_entry_t containing the file type marker is not modified directly by the filter.


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