[Openmp-commits] [PATCH] D131690: [OpenMP][OMPT] Fix memory leak when using serialized GCC compatibility code
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Aug 11 13:26:46 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG56f36f85e029: [OpenMP][OMPT] Fix memory leak when using GCC compatibility code (authored by jlpeyton).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131690/new/
https://reviews.llvm.org/D131690
Files:
openmp/runtime/src/kmp_runtime.cpp
Index: openmp/runtime/src/kmp_runtime.cpp
===================================================================
--- openmp/runtime/src/kmp_runtime.cpp
+++ openmp/runtime/src/kmp_runtime.cpp
@@ -1947,12 +1947,14 @@
}
} else if (call_context == fork_context_gnu) {
#if OMPT_SUPPORT
- ompt_lw_taskteam_t lwt;
- __ompt_lw_taskteam_init(&lwt, master_th, gtid, &ompt_parallel_data,
- return_address);
+ if (ompt_enabled.enabled) {
+ ompt_lw_taskteam_t lwt;
+ __ompt_lw_taskteam_init(&lwt, master_th, gtid, &ompt_parallel_data,
+ return_address);
- lwt.ompt_task_info.frame.exit_frame = ompt_data_none;
- __ompt_lw_taskteam_link(&lwt, master_th, 1);
+ lwt.ompt_task_info.frame.exit_frame = ompt_data_none;
+ __ompt_lw_taskteam_link(&lwt, master_th, 1);
+ }
// don't use lw_taskteam after linking. content was swaped
#endif
@@ -2396,6 +2398,9 @@
#if OMPT_SUPPORT
if (ompt_enabled.enabled) {
+ if (fork_context == fork_context_gnu) {
+ __ompt_lw_taskteam_unlink(master_th);
+ }
__kmp_join_restore_state(master_th, parent_team);
}
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131690.451964.patch
Type: text/x-patch
Size: 1229 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220811/59d83d09/attachment.bin>
More information about the Openmp-commits
mailing list