History log of /external/lldb/tools/lldb-perf/lib/TestCase.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
442b3f60c3569eb2445df8c72065a93a44bf97bf 16-Apr-2013 Enrico Granata <egranata@apple.com> New CallNext action for the test case that causes the next action in the sequence to be called right away

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
b8158c8227c34b0fde91cf8602003f250bead007 15-Apr-2013 Enrico Granata <egranata@apple.com> - Adding a relaunch feature to the performance tester: you can use the 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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
101a2d6d590b12f9647032d656a13d3d7c432038 02-Apr-2013 Enrico Granata <egranata@apple.com> Misc fixes:
- 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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
b1b36ec6dcfbe7c7dfa423d50cb7c2296deca68e 01-Apr-2013 Enrico Granata <egranata@apple.com> Integrating option parsing in TestCase for added convenience
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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
9de4dec874148d30cc1d4c498d38cd048a8164ca 22-Mar-2013 Greg Clayton <gclayton@apple.com> Much more cleanup on the performance testing infrastructure:
- 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



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
d3a8d6565ff40fd99533f50a085ace806a9300ee 21-Mar-2013 Greg Clayton <gclayton@apple.com> Add correct file headers to all source files.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
e62d448f4b663edfac26b9071323606b1b5fdc1d 20-Mar-2013 Enrico Granata <egranata@apple.com> Making the test step count a member variable so that it can be accessed easily

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
91c570abdc2eb7f0d9bc5affb086d515838ebc39 19-Mar-2013 Greg Clayton <gclayton@apple.com> More cleanup on the lldb-perf code:
- 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)




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
af222500aa2ce2b18149277e561cdf75f2115df2 18-Mar-2013 Greg Clayton <gclayton@apple.com> Code cleanup:
- 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



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
c50fc4b658c46ef43b1add131391ecdd1f9bd752 14-Mar-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13228487>

A test case for the performance of some LLDB formatters
Changes and improvements to the testing infrastructure itself



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp
f5af85a2946ed4e1ff4766829d328cfb4961f259 08-Mar-2013 Enrico Granata <egranata@apple.com> Initial checkin of a new project: LLDB Performance Testing Infrastructure

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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/tools/lldb-perf/lib/TestCase.cpp