Full threadwmf·DTrace and SystemTap can insert probes in code if you're only interested in certain parts. If you want basic-block-level or instruction-level coverage, look at Pin, DynamoRIO, or Valgrind.View on HN