summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-perf/lib
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-04-15 19:07:38 +0000
committerEnrico Granata <egranata@apple.com>2013-04-15 19:07:38 +0000
commita571e21c4edae565bf2110c4d22f152f51a35529 (patch)
tree9112a94efd1e247fcb14b75fd9317ff68cb04098 /lldb/tools/lldb-perf/lib
parentfe7a59d9c25285b70d357faaeb035bbfa9286227 (diff)
downloadbcm5719-llvm-a571e21c4edae565bf2110c4d22f152f51a35529.tar.gz
bcm5719-llvm-a571e21c4edae565bf2110c4d22f152f51a35529.zip
- 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 llvm-svn: 179548
Diffstat (limited to 'lldb/tools/lldb-perf/lib')
-rw-r--r--lldb/tools/lldb-perf/lib/TestCase.cpp8
-rw-r--r--lldb/tools/lldb-perf/lib/TestCase.h13
2 files changed, 20 insertions, 1 deletions
diff --git a/lldb/tools/lldb-perf/lib/TestCase.cpp b/lldb/tools/lldb-perf/lib/TestCase.cpp
index ac8c402ac8b..b3aef6e8d6e 100644
--- a/lldb/tools/lldb-perf/lib/TestCase.cpp
+++ b/lldb/tools/lldb-perf/lib/TestCase.cpp
@@ -292,6 +292,14 @@ TestCase::Loop ()
m_process.SetSelectedThread(action.thread);
action.thread.StepOver();
break;
+ case ActionWanted::Type::eRelaunch:
+ if (m_process.IsValid())
+ {
+ m_process.Kill();
+ m_process.Clear();
+ }
+ Launch(action.launch_info);
+ break;
case ActionWanted::Type::eKill:
if (m_verbose)
printf("kill\n");
diff --git a/lldb/tools/lldb-perf/lib/TestCase.h b/lldb/tools/lldb-perf/lib/TestCase.h
index 3d2e0e94fbc..89557982e5f 100644
--- a/lldb/tools/lldb-perf/lib/TestCase.h
+++ b/lldb/tools/lldb-perf/lib/TestCase.h
@@ -30,13 +30,16 @@ public:
eStepOver,
eContinue,
eStepOut,
+ eRelaunch,
eKill
} type;
lldb::SBThread thread;
+ lldb::SBLaunchInfo launch_info;
ActionWanted () :
type (Type::eContinue),
- thread ()
+ thread (),
+ launch_info (NULL)
{
}
@@ -62,6 +65,14 @@ public:
}
void
+ Relaunch (lldb::SBLaunchInfo l)
+ {
+ type = Type::eRelaunch;
+ thread = lldb::SBThread();
+ launch_info = l;
+ }
+
+ void
Kill ()
{
type = Type::eKill;
OpenPOWER on IntegriCloud