Now we register for events we'll need. For our first pass we only need to register for the bb event (to add our instrumentation) and the exit event (to display the results). We don't need to register for trace events (as we will add our instrumentation to the constituent bbs) and we can ignore the for_trace
and translating
arguments to the basic block callback as our changes are deterministic and idempotent so DynamoRIO default translation will work fine.