make profiler thread safe
Merge pull request #1129 from dwightguth/profiler

make profiler thread safe