[Openmp-commits] [PATCH] D110202: [OpenMP] Add function tracing debugging to device RTL

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Sep 21 15:59:20 PDT 2021


jdoerfert added a comment.

Add them to the entry points and some other "important functions" like parallel_51.



================
Comment at: openmp/libomptarget/DeviceRTL/include/Debug.h:40
 
+#define ENTER DebugEntryRAII Entry(__FILE__, __LINE__, __PRETTY_FUNCTION__);
+
----------------
jhuber6 wrote:
> tianshilei1992 wrote:
> > Just `ENTER`?
> Wasn't sure what to call it, could be like `FunctionTrace` or something.
`#define FunctionTracingRAII()`


================
Comment at: openmp/libomptarget/DeviceRTL/include/Debug.h:42
+
+struct DebugEntryRAII {
+  DebugEntryRAII(const char *File, const unsigned Line, const char *Function);
----------------
Documentation, also for the macro.


================
Comment at: openmp/libomptarget/DeviceRTL/src/Debug.cpp:59
+  if (mapping::getThreadIdInBlock() == 0 &&
+      config::isDebugMode(config::DebugKind::FunctionTracing)) {
+
----------------
swap these two, same below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110202



More information about the Openmp-commits mailing list