Merge pull request #1784 from alexrp/profiler-init