[Openmp-commits] [openmp] a3c0f70 - [NFC] fix failed ompt tests on M1 device (#65696)
via Openmp-commits
openmp-commits at lists.llvm.org
Fri Nov 24 14:40:18 PST 2023
Author: Lixi Zhou
Date: 2023-11-24T23:40:14+01:00
New Revision: a3c0f705db03c4ebf651ee2d83cebb02b1e27540
URL: https://github.com/llvm/llvm-project/commit/a3c0f705db03c4ebf651ee2d83cebb02b1e27540
DIFF: https://github.com/llvm/llvm-project/commit/a3c0f705db03c4ebf651ee2d83cebb02b1e27540.diff
LOG: [NFC] fix failed ompt tests on M1 device (#65696)
Fix the 2 failed ompt tests on M1 device found on #63194.
```
libomp :: ompt/synchronization/masked.c
libomp :: ompt/synchronization/master.c
```
For the details of this fix, please check the origin discussion in
https://github.com/llvm/llvm-project/issues/63194#issuecomment-1710494689
Thanks @jprotze for the fix.
Added:
Modified:
openmp/runtime/test/ompt/callback.h
Removed:
################################################################################
diff --git a/openmp/runtime/test/ompt/callback.h b/openmp/runtime/test/ompt/callback.h
index efbd4c716e0ee1e..62eff09e28423e6 100644
--- a/openmp/runtime/test/ompt/callback.h
+++ b/openmp/runtime/test/ompt/callback.h
@@ -189,9 +189,17 @@ ompt_label_##id:
#elif KMP_ARCH_AARCH64
// On AArch64 the NOP instruction is 4 bytes long, can be followed by inserted
// store instruction (another 4 bytes long).
-#define print_possible_return_addresses(addr) \
- printf("%" PRIu64 ": current_address=%p or %p\n", ompt_get_thread_data()->value, \
- ((char *)addr) - 4, ((char *)addr) - 8)
+#if KMP_OS_DARWIN
+#define print_possible_return_addresses(addr) \
+ printf("%" PRIu64 ": current_address=%p or %p or %p\n", \
+ ompt_get_thread_data()->value, ((char *)addr) - 4, \
+ ((char *)addr) - 8, ((char *)addr) - 12)
+#else
+#define print_possible_return_addresses(addr) \
+ printf("%" PRIu64 ": current_address=%p or %p\n", \
+ ompt_get_thread_data()->value, ((char *)addr) - 4, \
+ ((char *)addr) - 8)
+#endif
#elif KMP_ARCH_RISCV64
#if __riscv_compressed
// On RV64GC the C.NOP instruction is 2 byte long. In addition, the compiler
More information about the Openmp-commits
mailing list