diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-08 21:38:34 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-07-08 21:38:34 +0000 |
commit | cbdf794872a96a9941ea711513901f9daba21083 (patch) | |
tree | 1e6bc8b27f66bcad4ecda88f980984b7a3ab7116 /lldb/tools/lldb-perf/lib/TestCase.h | |
parent | 39d1f2f5ea719b68f74b0c4520dee2d3304edc31 (diff) | |
download | bcm5719-llvm-cbdf794872a96a9941ea711513901f9daba21083.tar.gz bcm5719-llvm-cbdf794872a96a9941ea711513901f9daba21083.zip |
Remove lldb-perf
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
Diffstat (limited to 'lldb/tools/lldb-perf/lib/TestCase.h')
-rw-r--r-- | lldb/tools/lldb-perf/lib/TestCase.h | 144 |
1 files changed, 0 insertions, 144 deletions
diff --git a/lldb/tools/lldb-perf/lib/TestCase.h b/lldb/tools/lldb-perf/lib/TestCase.h deleted file mode 100644 index 4ab4bd1c176..00000000000 --- a/lldb/tools/lldb-perf/lib/TestCase.h +++ /dev/null @@ -1,144 +0,0 @@ -//===-- TestCase.h ----------------------------------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#ifndef __PerfTestDriver__TestCase__ -#define __PerfTestDriver__TestCase__ - -#include "Measurement.h" -#include "lldb/API/LLDB.h" -#include <getopt.h> - -namespace lldb_perf { - -class Results; - -class TestCase { -public: - TestCase(); - - struct ActionWanted { - enum class Type { - eStepOver, - eContinue, - eStepOut, - eRelaunch, - eCallNext, - eNone, - eKill - } type; - lldb::SBThread thread; - lldb::SBLaunchInfo launch_info; - - ActionWanted() : type(Type::eContinue), thread(), launch_info(NULL) {} - - void None() { - type = Type::eNone; - thread = lldb::SBThread(); - } - - void Continue() { - type = Type::eContinue; - thread = lldb::SBThread(); - } - - void StepOver(lldb::SBThread t) { - type = Type::eStepOver; - thread = t; - } - - void StepOut(lldb::SBThread t) { - type = Type::eStepOut; - thread = t; - } - - void Relaunch(lldb::SBLaunchInfo l) { - type = Type::eRelaunch; - thread = lldb::SBThread(); - launch_info = l; - } - - void Kill() { - type = Type::eKill; - thread = lldb::SBThread(); - } - - void CallNext() { - type = Type::eCallNext; - thread = lldb::SBThread(); - } - }; - - virtual ~TestCase() {} - - virtual bool Setup(int &argc, const char **&argv); - - virtual void TestStep(int counter, ActionWanted &next_action) = 0; - - bool Launch(lldb::SBLaunchInfo &launch_info); - - bool Launch(std::initializer_list<const char *> args = {}); - - void Loop(); - - void SetVerbose(bool); - - bool GetVerbose(); - - virtual void WriteResults(Results &results) = 0; - - template <typename G, typename A> - Measurement<G, A> CreateMeasurement(A a, const char *name = NULL, - const char *description = NULL) { - return Measurement<G, A>(a, name, description); - } - - template <typename A> - TimeMeasurement<A> CreateTimeMeasurement(A a, const char *name = NULL, - const char *description = NULL) { - return TimeMeasurement<A>(a, name, description); - } - - template <typename A> - MemoryMeasurement<A> CreateMemoryMeasurement(A a, const char *name = NULL, - const char *description = NULL) { - return MemoryMeasurement<A>(a, name, description); - } - - static int Run(TestCase &test, int argc, const char **argv); - - virtual bool ParseOption(int short_option, const char *optarg) { - return false; - } - - virtual struct option *GetLongOptions() { return NULL; } - - lldb::SBDebugger &GetDebugger() { return m_debugger; } - - lldb::SBTarget &GetTarget() { return m_target; } - - lldb::SBProcess &GetProcess() { return m_process; } - - lldb::SBThread &GetThread() { return m_thread; } - - int GetStep() { return m_step; } - - static const int RUN_SUCCESS = 0; - static const int RUN_SETUP_ERROR = 100; - -protected: - lldb::SBDebugger m_debugger; - lldb::SBTarget m_target; - lldb::SBProcess m_process; - lldb::SBThread m_thread; - lldb::SBListener m_listener; - bool m_verbose; - int m_step; -}; -} - -#endif /* defined(__PerfTestDriver__TestCase__) */ |