[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
Thu Nov 5 10:41:41 PST 2020
jlpeyton created this revision.
jlpeyton added reviewers: AndreyChurbanov, tlwilmar.
jlpeyton added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
jlpeyton requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Forgot to reset the stats state when re-entering serial region for both `pragma omp parallel` and `pragma omp teams`
Repository:
rG LLVM Github Monorepo
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.303181.patch
Type: text/x-patch
Size: 677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201105/5f9c5a81/attachment.bin>
More information about the Openmp-commits
mailing list