[Openmp-commits] [PATCH] D90867: [OpenMP][stats] reset serial state when re-entering serial region

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 17 08:10:55 PST 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0454154efd54: [OpenMP][stats] reset serial state when re-entering serial region (authored by jlpeyton).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90867

Files:
  openmp/runtime/src/kmp_csupport.cpp


Index: openmp/runtime/src/kmp_csupport.cpp
===================================================================
--- openmp/runtime/src/kmp_csupport.cpp
+++ openmp/runtime/src/kmp_csupport.cpp
@@ -324,6 +324,7 @@
 #if KMP_STATS_ENABLED
   if (previous_state == stats_state_e::SERIAL_REGION) {
     KMP_EXCHANGE_PARTITIONED_TIMER(OMP_serial);
+    KMP_SET_THREAD_STATE(previous_state);
   } else {
     KMP_POP_PARTITIONED_TIMER();
   }
@@ -436,6 +437,7 @@
 #if KMP_STATS_ENABLED
   if (previous_state == stats_state_e::SERIAL_REGION) {
     KMP_EXCHANGE_PARTITIONED_TIMER(OMP_serial);
+    KMP_SET_THREAD_STATE(previous_state);
   } else {
     KMP_POP_PARTITIONED_TIMER();
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90867.305803.patch
Type: text/x-patch
Size: 677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201117/b3a2aed2/attachment.bin>


More information about the Openmp-commits mailing list