[PATCH] D140248: [OpenMP] Enable profiling on multiple threads

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 22:08:44 PST 2022


jdoerfert added a comment.

Isn't this duplicating the time profiler logic in libomptarget? I'm not sure if there is a better way but this seems unfortunate.



================
Comment at: llvm/lib/Support/TimeProfiler.cpp:324
+  Instances.List.push_back(prof);
+}
+
----------------
Nit: `Prof`, similar in other places.


================
Comment at: openmp/libomptarget/src/rtl.cpp:47
+// List of TimeTraceProfiler instances on other threads
+std::vector<llvm::TimeTraceProfiler *> *profileInstancesOtherThreads = nullptr;
+std::mutex profLock;
----------------
Why is this a pointer? And why a std::vector not llvm::SmallVector 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140248



More information about the llvm-commits mailing list