summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-perf/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove lldb-perfJonas Devlieghere2019-07-0815-1757/+0
| | | | | | | | | As discussed offline, this tool is no longer used or maintained, and doesn't provide the right abstraction for performance tracking in lldb. Differential revision: https://reviews.llvm.org/D64362 llvm-svn: 365391
* Delete unnecessary copy ctors/copy assignment operatorsFangrui Song2019-05-152-16/+0
| | | | | | It's the simplest and gives the cleanest semantics. llvm-svn: 360762
* Replace 'ap' with 'up' suffix in variable names. (NFC)Jonas Devlieghere2019-02-133-32/+32
| | | | | | | | | | | | | | | | | The `ap` suffix is a remnant of lldb's former use of auto pointers, before they got deprecated. Although all their uses were replaced by unique pointers, some variables still carried the suffix. In r353795 I removed another auto_ptr remnant, namely redundant calls to ::get for unique_pointers. Jim justly noted that this is a good opportunity to clean up the variable names as well. I went over all the changes to ensure my find-and-replace didn't have any undesired side-effects. I hope I didn't miss any, but if you end up at this commit doing a git blame on a weirdly named variable, please know that the change was unintentional. llvm-svn: 353912
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1915-60/+45
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Make lldb -Werror clean for -Wstring-conversionDavid Blaikie2017-01-061-4/+2
| | | | | | | | | Also found/fixed one bug identified by this warning in RenderScriptx86ABIFixups.cpp where a string literal was being used in an effort to provide a name for an instruction/register, but was instead being passed as the bool 'isVolatile' parameter. llvm-svn: 291198
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-0615-1836/+1317
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Cleanup how we listen for process events by using the broadcaster class name ↵Greg Clayton2014-08-181-3/+1
| | | | | | instead of having to catch each process instance as it comes alive. llvm-svn: 215937
* Fixed the lldb_perf_clang.cpp test case to be able to run correctly.Greg Clayton2014-02-272-84/+119
| | | | | | | | | 1 - There were some outdated options being passed to clang 2 - There were some bad paths being passed as options 3 - The path to the main.cpp file ("/tmp/main.cpp") was wrong when the tests were being run, now we create a temp file 4 - Added a new ActionType::eNone to do nothing (no continue, step, or kill) llvm-svn: 202431
* After discussing with Chris Lattner, we require C++11, so lets get rid of ↵Greg Clayton2013-04-184-9/+9
| | | | | | the macros and just use C++11. llvm-svn: 179805
* Missed some cases when switching over to using our STD_UNIQUE_PTR macros.Greg Clayton2013-04-184-10/+12
| | | | llvm-svn: 179796
* New CallNext action for the test case that causes the next action in the ↵Enrico Granata2013-04-152-0/+12
| | | | | | sequence to be called right away llvm-svn: 179578
* Enabling test case to write the average+stddev pair to the resultsEnrico Granata2013-04-155-19/+52
| | | | | | | | | | | | | | | The sketch test case writes avg+stddev for all its metrics: <key>fetch-frames</key> <dict> <key>description</key> <string>time to dump backtrace for every frame in every thread</string> <key>stddev</key> <real>0.006270938361432314</real> <key>value</key> <real>0.011568079851851851</real> </dict> llvm-svn: 179550
* - Adding a relaunch feature to the performance tester: you can use the ↵Enrico Granata2013-04-152-1/+20
| | | | | | | | relaunch if you want to measure multiple runs of your app keeping the same metrics alive. New arguments must be supplied - and the step counter will not be reset (this makes it easy to avoid endless loops) - Having the Sketch test case relaunch itself llvm-svn: 179548
* Enabling metrics to calculate (and dump) their standard deviationEnrico Granata2013-04-025-7/+72
| | | | llvm-svn: 178580
* Misc fixes:Enrico Granata2013-04-023-4/+22
| | | | | | | | | - make an overload of Launch() that takes an init list of const char* if all you need to tweak in the launch info are the command-line arguments - make Run() return an int that you can use as an exit-code - make dynamic values work properly when recursing in FetchVariables() - make the po output more obvious in verbose mode llvm-svn: 178578
* Integrating option parsing in TestCase for added convenienceEnrico Granata2013-04-012-2/+83
| | | | | | | | | To hook it up to individual test cases: - define GetLongOptions() in your test case class to return something other than NULL (hopefully an array of options :-) - implement ParseOption() to check for the short option char and do the right thing - return true at the end if you want more options to come your way or false if you don’t - make sure that your Setup() call takes int& and char**& so that optind post-processing can happen - and call TestCase::Setup from your setup llvm-svn: 178482
* Make sure the "Release" builds link against the "Release" LLDB.framework and ↵Greg Clayton2013-03-231-0/+3
| | | | | | also output the results to /dev/stdout when no outfile is supplied. llvm-svn: 177791
* More cleanup to remove the CoreFoundation classes out of mainstream code ↵Greg Clayton2013-03-225-67/+2
| | | | | | (CFCMutableDictionary, CFCMutableArray, CFCString, etc). Now it is only used in the Results.cpp file for Apple builds only. llvm-svn: 177697
* Much more cleanup on the performance testing infrastructure:Greg Clayton2013-03-2213-265/+1053
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added new abtract Results class to keep CoreFoundation out of the tests. There are many subclasses for different settings: Results::Result::Dictionary Results::Result::Array Results::Result::Unsigned Results::Result::Double Results::Result::String - Gauge<T> can now write themselves out via a templatized write to results function: template <class T> Results::ResultSP GetResult (const char *description, T value); - There are four specializations of this so far: template <> Results::ResultSP GetResult (const char *description, double value); template <> Results::ResultSP GetResult (const char *description, uint64_t value); template <> Results::ResultSP GetResult (const char *description, std::string value); template <> Results::ResultSP GetResult (const char *description, MemoryStats value); - Don't emit the virtual memory reading from the task info call as it really doesn't mean much as it includes way too much (shared cache + other stuff we don't have control over) - Fixed other test cases to build correctly and use the new classes llvm-svn: 177696
* Add correct file headers to all source files.Greg Clayton2013-03-2112-48/+60
| | | | llvm-svn: 177625
* Modify code to adhere to LLDB coding conventions.Greg Clayton2013-03-219-156/+182
| | | | llvm-svn: 177623
* Making a manual mode of operation for measurements, where you can manually ↵Enrico Granata2013-03-201-2/+24
| | | | | | | | | | call start() and stop() instead of using the function-call syntax This is especially useful to take measurements that span multiple test steps, or where you need to have different operations fall under the same measurement An example of use is in the formatters perf test case llvm-svn: 177597
* Making the test step count a member variable so that it can be accessed easilyEnrico Granata2013-03-202-8/+16
| | | | llvm-svn: 177594
* Making MemoryGauge work by fixing a Mach API call mistake - saving (and ↵Enrico Granata2013-03-206-11/+167
| | | | | | dumping) more information out of the task_info call llvm-svn: 177580
* Update Sketch test case to capture this and use accessors for debugger, ↵Greg Clayton2013-03-191-0/+23
| | | | | | target, process and thread. llvm-svn: 177425
* More cleanup on the lldb-perf code:Greg Clayton2013-03-193-26/+51
| | | | | | | | | | | | | | | - TestCase.m_thread is now filled in with the first thread that has a valid stop reason. This eliminates the need for the SelectMyThread() functions. - The first thread that stops for a reason is also set as the selected thread in the process in case any command line commands are run. - Changed launch over to take a SBLaunchInfo parameter so that the launch function doesn't keep getting new arguments as they are needed. - TestCase::Setup() and TestCase::Launch(SBLaunchInfo) now return bool to indicate success of setup and launch. - ActionWanted::Next(SBThread) was renamed to ActionWanted::StepOver(SBThread) - ActionWanted::Finish(SBThread) was renamed to ActionWanted::StepOut(SBThread) llvm-svn: 177376
* Code cleanup:Greg Clayton2013-03-1812-40/+73
| | | | | | | | | | - don't use preprocessor macros - use switch statements - don't put anything in the lldb namespace, use "lldb_perf" namespace. - Pass the action struct into each TestStep() for each step fill in - Modify the ActionWanted class to have accessors to make the continue, next, finish, kill instead of using preproc macros llvm-svn: 177332
* <rdar://problem/13228487>Enrico Granata2013-03-146-17/+80
| | | | | | | A test case for the performance of some LLDB formatters Changes and improvements to the testing infrastructure itself llvm-svn: 177100
* Initial checkin of a new project: LLDB Performance Testing InfrastructureEnrico Granata2013-03-0812-0/+952
This is a very basic implementation of a library that easily allows to drive LLDB.framework to write test cases for performance This is separate from the LLDB testsuite in test/ in that: a) this uses C++ instead of Python to avoid measures being affected by SWIG b) this is in very early development and needs lots of tweaking before it can be considered functionally complete c) this is not meant to test correctness but to help catch performance regressions There is a sample application built against the library (in darwin/sketch) that uses the famous sample app Sketch as an inferior to measure certain basic parameters of LLDB's behavior. The resulting output is a PLIST much like the following: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <dict> <key>fetch-frames</key> <real>0.13161715522222225</real> </dict> <dict> <key>file-line-bkpt</key> <real>0.029111678750000002</real> </dict> <dict> <key>fetch-modules</key> <real>0.00026376766666666668</real> </dict> <dict> <key>fetch-vars</key> <real>0.17820429311111111</real> </dict> <dict> <key>run-expr</key> <real>0.029676525769230768</real> </dict> </array> </plist> Areas for improvement: - code cleanups (I will be out of the office for a couple days this coming week, but please keep ideas coming!) - more metrics and test cases - better error checking This toolkit also comprises a simple event-loop-driven controller for LLDB, similar yet much simpler to what the Driver does to implement the lldb command-line tool. llvm-svn: 176715
OpenPOWER on IntegriCloud