llvm-project/lldb/source/Breakpoint
Pavel Labath 4f89157b9d [lldb] Make StatsDuration thread-safe
std::chrono::duration types are not thread-safe, and they cannot be
concurrently updated from multiple threads. Currently, we were doing
such a thing (only) in the DWARF indexing code
(DWARFUnit::ExtractDIEsRWLocked), but I think it can easily happen that
someone else tries to update another statistic like this without
bothering to check for thread safety.

This patch changes the StatsDuration type from a simple typedef into a
class in its own right. The class stores the duration internally as
std::atomic<uint64_t> (so it can be updated atomically), but presents it
to its users as the usual chrono type (duration<float>).

Differential Revision: https://reviews.llvm.org/D117474
2022-01-19 16:42:53 +01:00
..
Breakpoint.cpp [lldb] Make StatsDuration thread-safe 2022-01-19 16:42:53 +01:00
BreakpointID.cpp Use llvm::is_contained (NFC) 2021-10-24 09:32:57 -07:00
BreakpointIDList.cpp [lldb] Remove redundant calls to set eReturnStatusFailed 2021-06-17 12:21:54 +01:00
BreakpointList.cpp Use llvm::erase_if (NFC) 2021-10-18 09:33:42 -07:00
BreakpointLocation.cpp Convert functions that were returning BreakpointOption * to BreakpointOption &. 2021-06-15 14:34:02 -07:00
BreakpointLocationCollection.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
BreakpointLocationList.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
BreakpointName.cpp Convert functions that were returning BreakpointOption * to BreakpointOption &. 2021-06-15 14:34:02 -07:00
BreakpointOptions.cpp Convert functions that were returning BreakpointOption * to BreakpointOption &. 2021-06-15 14:34:02 -07:00
BreakpointPrecondition.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
BreakpointResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
BreakpointResolverAddress.cpp [lldb][NFC] Remove dead code in BreakpointResolverAddress 2020-08-10 11:29:40 +02:00
BreakpointResolverFileLine.cpp [source map] fix relative path breakpoints 2021-07-29 18:36:06 -07:00
BreakpointResolverFileRegex.cpp Fix bugprone argument comments. 2022-01-09 12:21:02 -08:00
BreakpointResolverName.cpp [lldb] Use a struct to pass function search options to Module::FindFunction 2021-08-05 10:18:14 -07:00
BreakpointResolverScripted.cpp [lldb] Clarify StructuredDataImpl ownership 2021-12-13 21:04:51 +01:00
BreakpointSite.cpp Convert functions that were returning BreakpointOption * to BreakpointOption &. 2021-06-15 14:34:02 -07:00
BreakpointSiteList.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
CMakeLists.txt [lldb/Breakpoint] Rename StoppointLocation to StoppointSite and drop its relationship with BreakpointLocation 2020-07-29 22:07:46 +03:00
Stoppoint.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
StoppointCallbackContext.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
StoppointSite.cpp [lldb/Breakpoint] Rename StoppointLocation to StoppointSite and drop its relationship with BreakpointLocation 2020-07-29 22:07:46 +03:00
Watchpoint.cpp [lldb/Breakpoint] Rename StoppointLocation to StoppointSite and drop its relationship with BreakpointLocation 2020-07-29 22:07:46 +03:00
WatchpointList.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
WatchpointOptions.cpp [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00