Add opcode instrumentation to drmgr
Often, during the insertion per instruction stage (i.e., stage 3), a client adds instrumentation according to the opcode of the instruction.
In order to alleviate the boiler code required by clients to check the opcode, the proposal is to add support for opcode events to drmgr. The call-backs are similar to drmgr_insertion_cb_t with the exception that they are called only when the instruction has a specific opcode as registered by the user.
In particular:
bool
drmgr_register_opcode_instrumentation_event(drmgr_opcode_insertion_cb_t insertion_func,
int opcode, drmgr_priority_t *priority);
bool
drmgr_unregister_opcode_instrumentation_event(drmgr_opcode_insertion_cb_t insertion_func,
int opcode);