llvm-project/lldb/source/Core
Pavel Labath 96a3c91e66 Refactor Timer class
Summary:
While removing TimeValue from this class I noticed a lot of room for small
simplifications here. Main are:
  - instead of complicated start-stop dances to compute own time, each Timer
    just starts the timer once, and keeps track of the durations of child
    timers. Then the own time can be computed at the end by subtracting the two
    values.
  - remove double accounting in TimerStack - the stack object already knows the
    number of timers.
The interface does not lend itself well to unit testing, but I have added a
couple of tests which can (and did) catch any obvious errors.

Reviewers: tberghammer, clayborg

Subscribers: mgorny, lldb-commits

Differential Revision: https://reviews.llvm.org/D26243

llvm-svn: 285890
2016-11-03 09:14:09 +00:00
..
Address.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
AddressRange.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
AddressResolver.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
AddressResolverFileLine.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
AddressResolverName.cpp Make lldb::Regex use StringRef. 2016-09-21 16:01:28 +00:00
ArchSpec.cpp [LLDB][MIPS] Fix qProcessInfo to return correct pointer size based on ELF ABI 2016-10-12 10:21:09 +00:00
Baton.cpp Some more pointer safety in Breakpoint. 2016-09-13 17:53:38 +00:00
Broadcaster.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
CMakeLists.txt Use llvm's demangler. 2016-09-07 16:14:00 +00:00
Communication.cpp Remove TimeValue usage from two files 2016-11-02 12:18:42 +00:00
Connection.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ConnectionMachPort.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ConnectionSharedMemory.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ConstString.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
DataBufferHeap.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
DataBufferMemoryMap.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
DataEncoder.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
DataExtractor.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Debugger.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
Disassembler.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
DynamicLoader.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
EmulateInstruction.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Error.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Event.cpp Update the prompt related functions to use StringRefs. 2016-09-23 18:06:53 +00:00
FastDemangle.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
FileLineResolver.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
FileSpecList.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
FormatEntity.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
History.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
IOHandler.cpp [lldb-mi] Fix prompt which can get inserted in the middle of program output in lldb-mi 2016-10-01 10:37:56 +00:00
Listener.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Log.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
Logging.cpp Refactor the Args class. 2016-10-03 22:51:09 +00:00
Mangled.cpp Convert some Args index-based iteration to range-style iteration. 2016-10-05 23:40:23 +00:00
Module.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
ModuleChild.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ModuleList.cpp Remove TimeValue usage from FileSpec.h 2016-11-01 16:11:14 +00:00
Opcode.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
PluginManager.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
RegisterValue.cpp [LLDB][MIPS] Fix register read/write for 32 bit big endian system 2016-10-10 09:02:41 +00:00
RegularExpression.cpp Fix failing regex tests. 2016-09-21 17:13:51 +00:00
Scalar.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
SearchFilter.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
Section.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
SourceManager.cpp Remove TimeValue usage from FileSpec.h 2016-11-01 16:11:14 +00:00
State.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Stream.cpp Convert UniqueCStringMap to use StringRef. 2016-10-06 21:22:44 +00:00
StreamAsynchronousIO.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamCallback.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamFile.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamGDBRemote.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StreamString.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
StringList.cpp Refactor the Args class. 2016-10-03 22:51:09 +00:00
StructuredData.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
Timer.cpp Refactor Timer class 2016-11-03 09:14:09 +00:00
UUID.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
UserID.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
UserSettingsController.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
VMRange.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
Value.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObject.cpp Fix Clang-tidy readability-redundant-string-cstr warnings 2016-11-02 20:34:10 +00:00
ValueObjectCast.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectChild.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectConstResult.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectConstResultCast.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectConstResultChild.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectConstResultImpl.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectDynamicValue.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectList.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectMemory.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectRegister.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectSyntheticFilter.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
ValueObjectVariable.cpp *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00