DynamoRIO
|
#include <drbbdup.h>
Detailed Description
Specifies the options when initialising drbbdup. set_up_bb_dups
and instrument_instr
cannot be NULL. runtime_case_opnd
must be a pointer-sized memory reference, unless non_default_case_limit
is 0.
Field Documentation
◆ allow_gen
drbbdup_allow_gen_t drbbdup_options_t::allow_gen |
A user-defined call-back function that determines whether to dynamically generate a basic block copy to handle a new case encountered at runtime. The function may be NULL, and in this case drbbdup will always consider dynamic handling for new cases.
◆ analyze_case
drbbdup_analyze_case_t drbbdup_options_t::analyze_case |
A user-defined call-back function that analyzes a basic block for a particular case.
◆ analyze_case_ex
drbbdup_analyze_case_ex_t drbbdup_options_t::analyze_case_ex |
Identical to analyze_case but taking extra parameters and with a return value. Only one of this field or the analyze_case field can be set.
◆ analyze_orig
drbbdup_analyze_orig_t drbbdup_options_t::analyze_orig |
A user-defined call-back function that conducts an analysis of the original basic block.
◆ atomic_load_encoding
bool drbbdup_options_t::atomic_load_encoding |
Instructs drbbdup whether or not the loading of the runtime case should use release-acquire semantics.
◆ destroy_case_analysis
drbbdup_destroy_case_analysis_t drbbdup_options_t::destroy_case_analysis |
A user-defined call-back function that destroys analysis data for a particular case.
◆ destroy_orig_analysis
drbbdup_destroy_orig_analysis_t drbbdup_options_t::destroy_orig_analysis |
A user-defined call-back function that destroys analysis data of the original basic block.
◆ hit_threshold
ushort drbbdup_options_t::hit_threshold |
Approximately, the number of times an unhandled case should be encountered by a thread before it becomes a candidate for dynamic generation.
◆ insert_encode
drbbdup_insert_encode_t drbbdup_options_t::insert_encode |
A user-defined call-back function that inserts code to encode the runtime case. The resulting encoding is used by the dispatcher to direct control to the appropriate basic block.
It can be left NULL. In such cases, it is expected that the runtime case encoding of a thread is done by external code and updated on demand. Essentially, drbbdup guarantees that it won't change the client's memory that stores the encoding, thus enabling insert_encode to perform no operation and not be needed.
◆ instrument_instr
drbbdup_instrument_instr_t drbbdup_options_t::instrument_instr |
A user-defined call-back function that instruments an instruction with respect to a particular case. Either this or the instrument_instr_ex field must be set.
◆ instrument_instr_ex
drbbdup_instrument_instr_ex_t drbbdup_options_t::instrument_instr_ex |
Identical to instrument_instr but taking extra parameters and with a return value. Either this or the instrument_instr field must be set.
◆ is_stat_enabled
bool drbbdup_options_t::is_stat_enabled |
Determines whether drbbdup should track a variety of statistics. Note, keeping track of statistics incurs additional overhead and it is not recommended at deployment.
In order for the client to successfully call drbbdup_get_stats(), the flag must be set to true.
◆ max_case_encoding
uintptr_t drbbdup_options_t::max_case_encoding |
Gives an upper bound on the value of all case encodings. This is used to optimize the dispatch code on AArchXX: in particular, an upper bound <256 avoids an extra scratch register. Set to 0 to indicate there is no bound.
◆ never_enable_dynamic_handling
bool drbbdup_options_t::never_enable_dynamic_handling |
If enable_dynamic_handling
will never be set by set_up_bb_dups
for any basic block, this field can be set to true. This reduces memory usage by not allocating bookkeeping data needed for dynamic handling.
◆ non_default_case_limit
ushort drbbdup_options_t::non_default_case_limit |
The maximum number of alternative cases, excluding the default case, that can be associated with a basic block. Once the limit is reached and an unhandled case is encountered, control is directed to the default case. If this is set to 0, no duplication is performed on any block, and 0 is passed as the encoding to the analyze_case
and instrument_instr
(and their extended version) callbacks.
◆ runtime_case_opnd
opnd_t drbbdup_options_t::runtime_case_opnd |
An operand that refers to the memory containing the current runtime case encoding. During runtime, the dispatcher loads the runtime encoding via this operand in order to direct control to the appropriate basic block. The opnd must be pointer-sized.
◆ set_up_bb_dups
drbbdup_set_up_bb_dups_t drbbdup_options_t::set_up_bb_dups |
A user-defined call-back function that sets up how to duplicate a basic block. Cannot be NULL.
◆ struct_size
size_t drbbdup_options_t::struct_size |
Set this to the size of this structure.
◆ user_data
void* drbbdup_options_t::user_data |
User-data made available to user-defined call-back functions that drbbdup invokes to manage basic block duplication.
The documentation for this struct was generated from the following file:
- /home/runner/work/dynamorio/dynamorio/ext/drbbdup/drbbdup.h