mem_perf: perfcounter and memory profiling

Perfocunter overhauls and memory profiling added
Merge branch 'master' of github.com:prattmic/F4OS

s merge is necessary,