separate out main from worker thread in profiling