[PATCH] D118550: [Support][nfc] Add RAII helper for cleaning up time profiler in thread

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 05:16:59 PST 2022


int3 added a comment.

Yeah, I think that's probably a good idea. It took me a while to figure out that initializing the profiler on a per-thread basis was required; it was not at all obvious why my profiler events had started disappearing while I was parallelizing `lld`. Having it done automatically would've saved me some headache.

Another advantage would be that we could actually initialize the profiler once per thread, instead of once per task.

One drawback I guess is that there isn't a good way to specify the ProcName for these threads any more. But perhaps the ProcName was never really that relevant, and the spawned threads could just initialize it with the empty string?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118550/new/

https://reviews.llvm.org/D118550



More information about the llvm-commits mailing list