Common: Add a built-in profiler
Merge pull request #1574 from degasus/profiler

Common: Add a built-in profiler