Specifies the options when initialising drbbdup.
instrument_instr cannot be NULL.
runtime_case_opnd must be a pointer-sized memory reference, unless
non_default_case_limit is 0.
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.
A user-defined call-back function that analyzes a basic block for a particular case.
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.
A user-defined call-back function that conducts an analysis of the original basic block.
Instructs drbbdup whether or not the loading of the runtime case should use release-acquire semantics.
A user-defined call-back function that destroys analysis data for a particular case.
A user-defined call-back function that destroys analysis data of the original basic block.
Approximately, the number of times an unhandled case should be encountered by a thread before it becomes a candidate for dynamic generation.
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.
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.
Identical to instrument_instr but taking extra parameters and with a return value. Either this or the instrument_instr field must be set.
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.
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.
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.
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
instrument_instr (and their extended version) callbacks.
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.
A user-defined call-back function that sets up how to duplicate a basic block. Cannot be NULL.
Set this to the size of this structure.
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: