Hi all,
there was a commit a while ago that effectively forces all LLVM projects
to use libatomics on 32bit platforms. It is completely necessary for
clang and LLVM, of limited usefulness for libc++ (<atomics> test cases)
and necessary for LLDB right now. The only instance in LLDB is
include/Utility/Timer.h for nanosecond-precise time accounting. While
the code is correct, it will be secretly using a mutex in the
implementation and therefore not be wait-free. This feels like somewhat
of a bad idea for an accounting tool, so I would like to:

(a) Make the mutex explicit if 64bit operations are not lock-free.

or

(b) Weaken the consistency constraints to provide eventually-consistent
times by splitting the field into explicit 32bit chunks. This makes the
write side get predictable timings at the expensive of the summaries
being potentially off a bit in the case of races.

Joerg
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to