summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Timer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move classes from Core -> Utility.Zachary Turner2017-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This moves the following classes from Core -> Utility. ConstString Error RegularExpression Stream StreamString The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem. Differential Revision: https://reviews.llvm.org/D29427 llvm-svn: 293941
* Refactor Timer classPavel Labath2016-11-031-106/+41
| | | | | | | | | | | | | | | | | | | | | | 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
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-203/+156
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* remove use of Mutex in favour of std::{,recursive_}mutexSaleem Abdulrasool2016-05-181-8/+7
| | | | | | | | | | This is a pretty straightforward first pass over removing a number of uses of Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there are interfaces which take Mutex::Locker & to lock internal locks. This patch cleans up most of the easy cases. The only non-trivial change is in CommandObjectTarget.cpp where a Mutex::Locker was split into two. llvm-svn: 269877
* Get rid of a global constructor that was causing a warning on MacOSX and ↵Greg Clayton2016-03-241-3/+14
| | | | | | make the Timer safe to use after the main threads global destructor chain is called. llvm-svn: 264346
* Remove Timer::Initialize routinePavel Labath2016-02-011-23/+12
| | | | | | | | | | | | | | | | | | | | Summary: I've run into an issue when running unit tests, where the underlying problem turned out to be that we were creating Timer objects (through several layers of indirection) without calling Timer::Initialize. Since Timer's thread-local storage was not properly initialized, we were overwriting gtest's own thread-local storage, causing test failures. Instead of requiring that every test calls Timer::Initialize(), I remove the function altogether: The thread-local storage can be initialized on-demand, and the g_file variable initialized to stdout and never changed, so I have simply removed it. Reviewers: clayborg, zturner, tberghammer Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D16722 llvm-svn: 259356
* Try to fix MSVC build after r251105Tamas Berghammer2015-10-231-2/+2
| | | | llvm-svn: 251109
* Fix race conditions in Core/TimerTamas Berghammer2015-10-231-28/+45
| | | | | | | | | | | The Timer class already had some support for multi-threaded access but it still contained several race conditions. This CL fixes them in preparation of adding multi-threaded dwarf parsing (and other multi-threaded parts later). Differential revision: http://reviews.llvm.org/D13940 llvm-svn: 251105
* MingW compilation (windows). Includes various refactoring to improve ↵Virgile Bello2013-08-231-6/+6
| | | | | | portability. llvm-svn: 189107
* <rdar://problem/12978143>Enrico Granata2013-01-281-9/+9
| | | | | | | | | | | Data formatters now cache themselves. This commit provides a new formatter cache mechanism. Upon resolving a formatter (summary or synthetic), LLDB remembers the resolution for later faster retrieval. Also moved the data formatters subsystem from the core to its own group and folder for easier management, and done some code reorganization. The ObjC runtime v1 now returns a class name if asked for the dynamic type of an object. This is required for formatters caching to work with the v1 runtime. Lastly, this commit disposes of the old hack where ValueObjects had to remember whether they were queried for formatters with their static or dynamic type. Now the ValueObjectDynamicValue class works well enough that we can use its dynamic value setting for the same purpose. llvm-svn: 173728
* Patch from Filipe Cabecinhas.Greg Clayton2012-04-261-2/+0
| | | | llvm-svn: 155642
* Added a setting to "log timer" so you can see the incremental timings as well:Jim Ingham2010-11-041-1/+6
| | | | | | log timer increment true/false llvm-svn: 118268
* Added some missing API for address resolving within a module, and lookingGreg Clayton2010-09-101-15/+24
| | | | | | | | | | up a seciton offset address (SBAddress) within a module that returns a symbol context (SBSymbolContext). Also added a SBSymbolContextList in preparation for adding find/lookup APIs that can return multiple results. Added a lookup example code that shows how to do address lookups. llvm-svn: 113599
* Add missing includes.Eli Friedman2010-06-091-1/+4
| | | | llvm-svn: 105712
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+235
llvm-svn: 105619
OpenPOWER on IntegriCloud