-
Notifications
You must be signed in to change notification settings - Fork 33
Limitations (Performance)
##Performance
Trying to draw instructions on a fancy graph as fast as a CPU can execute them is always going to be a losing battle.
rgat (the visualiser) and drgat (the DynamoRIO client) use a few techniques to try and keep up:
-
Minimal traces. drgat sends the opcodes of each basic block to rgat when DynamoRIO presents them. Now everytime that block is executed drgat only has to send a short descriptor of the block to the visualiser, drastically reducing the volume of trace data being transferred.
-
Soft deinstrumentation of busy code. When one or more basic blocks execute repeatedly (above a certain number of iterations) drgat stops sending trace data until execution moves to a new or less busy area of code. We don't get an exact instruction-by-instruction trace from this, however we do have the exact number of each instruction executed and all transitions between basic blocks. This allows accurate reconstruction of the graph without flooding the visualiser with instruction trace data.
Lots of interesting optimisation problems remain. The primary performance problem is when lots of different areas of code execute: a self-modifying loop would be especially bad.