[Openmp-commits] [PATCH] D47717: [OMPT] Make sure that OMPT is enabled in runtime entry points that access internals of the runtime
Simon Convent via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jun 6 05:08:45 PDT 2018
sconvent added inline comments.
================
Comment at: runtime/src/ompt-general.cpp:458
(ompt_callback_t)ompt_callbacks.ompt_callback(event_name); \
- if (mycb) { \
+ if (ompt_enabled.enabled && ompt_enabled.event_name && mycb) { \
*callback = mycb; \
----------------
Hahnfeld wrote:
> Should we put an `if (ompt_enabled.enabled) return ompt_get_callback_failure` at the very beginning of the function? That seems invariant to the switch-case...
You meant `if (!ompt_enabled.enabled) `right?
https://reviews.llvm.org/D47717
More information about the Openmp-commits
mailing list