[Openmp-commits] [PATCH] D157646: [OpenMP] Add option to use different units for blocktime

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 17 05:05:13 PDT 2023


protze.joachim added a comment.

__kmp_initialize_system_tick is only used for an X86-specific optimization using `rdtsc`.
For other architectures, gettimeofday is used to measure time. From my experience, `clock_gettime(CLOCK_MONOTONIC, ..)` is less expensive, but this experience is also limited to X68.

I just added an inline comment to update a comment.



================
Comment at: openmp/runtime/src/z_Linux_util.cpp:2006
   kmp_uint64 now, nsec2, diff;
-  kmp_uint64 delay = 100000; // 50~100 usec on most machines.
+  kmp_uint64 delay = 100000000; // 50~100 usec on most machines.
   kmp_uint64 nsec = __kmp_now_nsec();
----------------
Is this still 50~100 usec, or 50~100 msec now?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157646



More information about the Openmp-commits mailing list