[Openmp-commits] [PATCH] D87722: [OpenMP] Additional Information for Libomptarget Device Mappings

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Sep 15 13:52:14 PDT 2020

jhuber6 added inline comments.

Comment at: openmp/libomptarget/src/device.cpp:65
+      }
+    }
jdoerfert wrote:
> please call dumpTargetPointerMappings, maybe pass the initial message as an argument or something but there is little gain in duplicating the logic.
Alright, I just want to clarify that you want this to print out only the persisting data on the device. The devices are stored in a global vector so they only deallocate at the end of the program.

Comment at: openmp/libomptarget/src/device.cpp:230
     uintptr_t tp = HT.TgtPtrBegin + ((uintptr_t)HstPtrBegin - HT.HstPtrBegin);
-    DP("Mapping exists%s with HstPtrBegin=" DPxMOD ", TgtPtrBegin=" DPxMOD ", "
+    INFO(DeviceID, "Mapping exists%s with HstPtrBegin=" DPxMOD ", TgtPtrBegin=" DPxMOD ", "
         "Size=%" PRId64 ",%s RefCount=%s\n", (IsImplicit ? " (implicit)" : ""),
Do you think there's a way to get the names of these mappings? I think it would be extremely helpful but would probably require adding something similar the ident_t that would outweigh the benefits.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list