Added patch for perf self monitoring and sample handling in a concurrent thread.