[Openmp-commits] [PATCH] D93055: [OpenMP] Add time profiling for libomptarget

Giorgis Georgakoudis via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 11 10:52:06 PST 2020


ggeorgakoudis added a comment.

In D93055#2446636 <https://reviews.llvm.org/D93055#2446636>, @JonChesterfield wrote:

> Interesting. Not sure about the dependency on an llvm library, though maybe guarding it makes that acceptable.
>
> The DIY equivalent we've been using is functionally similar. Implemented at trace.h <https://github.com/ROCm-Developer-Tools/amd-llvm-project/blob/aomp11/openmp/libomptarget/plugins/amdgpu/src/trace.h> in as unintrusive a fashion as I could manage.
>
> In addition to the time taken by calls, maintaining a log of the arguments to the functions (and the return value) has been very helpful as a debugging hack. The proper thing to do is probably to write said data to an in memory ring buffer. The above header just splats it to stdout.
>
> Does this clang-format nicely? I'd expect to have to spell it `TIMESCOPE();` or similar.

Thanks for the comment Jon. It's interesting to include debugging information. I have changed the macro to the format you suggest.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93055



More information about the Openmp-commits mailing list