[PATCH] D118550: [Support] Have ThreadPool initialize a TimeTraceProfiler per thread
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 12:01:48 PST 2022
mehdi_amini added a comment.
ThreadPool changes looks fine overall.
The ThreadPool implementation so far does not have any dependency on global state, it is slightly annoying to me to introduce some here.
================
Comment at: llvm/lib/Support/ThreadPool.cpp:52-53
+ if (!EnableFlag && Tasks.empty()) {
+ if (timeTraceProfilerEnabled())
+ timeTraceProfilerFinishThread();
return;
----------------
Can you handle this with RAII? llvm::make_scope_exit outside of the loop?
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