[PATCH] D118550: [Support][nfc] Add RAII helper for cleaning up time profiler in thread
Russell Gallop via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 31 01:58:58 PST 2022
russell.gallop added a comment.
Hi @int3 ,
Thanks for the patch. When I originally added the multi-threaded support for the time profiler I considered adding the initialize/finish thread into the threadpool itself (llvm/lib/Support/ThreadPool.cpp). In the end I thought it was a bit messy there so just added it into LTO.cpp. With the increased use of multi-threading I think it would be worth reconsidering putting this into ThreadPool.cpp so we don't need to add this everywhere we want to trace multithreaded code. I think that the RAII code you propose will help this fit into ThreadPool.cpp neatly. For all I know there may be other problems with doing that, but I think it will be neater now this is used in more places. What do you think about trying that?
Regards
Russ
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