Pull request for all the remaining patches, including the new performance monitors.

Sine you added our own version of the perf_event.h file: Is this still correct or is the included file checked?