Added script to profile a build using perf

This may or may not work - hasn't been tested.