diff options
| author | Jim Ingham <jingham@apple.com> | 2013-03-21 16:48:24 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2013-03-21 16:48:24 +0000 |
| commit | c4ca6e271c4a5b43ba8519119c72e4f6d7245aa9 (patch) | |
| tree | eb308280cb32d3d888252dd89a2488fe1239cb6e | |
| parent | 8ff029ccf183be948a2d8a93986354886f3304fa (diff) | |
| download | bcm5719-llvm-c4ca6e271c4a5b43ba8519119c72e4f6d7245aa9.tar.gz bcm5719-llvm-c4ca6e271c4a5b43ba8519119c72e4f6d7245aa9.zip | |
The outline of the stepping perf test case, doesn't do anything yet.
llvm-svn: 177646
3 files changed, 313 insertions, 17 deletions
diff --git a/lldb/tools/lldb-perf/common/stepping/lldb-perf-stepping.cpp b/lldb/tools/lldb-perf/common/stepping/lldb-perf-stepping.cpp new file mode 100644 index 00000000000..32ed38e0fcf --- /dev/null +++ b/lldb/tools/lldb-perf/common/stepping/lldb-perf-stepping.cpp @@ -0,0 +1,67 @@ +#include <CoreFoundation/CoreFoundation.h> + +#include "lldb-perf/lib/Timer.h" +#include "lldb-perf/lib/Metric.h" +#include "lldb-perf/lib/Measurement.h" +#include "lldb-perf/lib/TestCase.h" +#include "lldb-perf/lib/Xcode.h" + +#include <unistd.h> +#include <string> + +using namespace lldb_perf; + +class StepTest : public TestCase +{ +public: + StepTest() : + m_do_one_step_over_measurement (std::function<void(StepTest &, int)>(&StepTest::DoOneStep)) + { + } + + virtual + ~StepTest() {} + + virtual void + Setup (int argc, const char **argv) + { + m_app_path.assign(argv[1]); + m_out_path.assign(argv[2]); + TestCase::Setup (argc, argv); + + m_target = m_debugger.CreateTarget(m_app_path.c_str()); + const char* file_arg = m_app_path.c_str(); + const char* empty = nullptr; + const char* args[] = {file_arg, empty}; + + Launch (args,"."); + } + +private: + void + DoOneStep (int sequence) + { + + } + + TimeMeasurement<std::function<void(StepTest &, int)> > m_do_one_step_over_measurement; + std::string m_app_path; + std::string m_out_path; + + +}; + +// argv[1] == path to app +// argv[2] == path to result +int main(int argc, const char * argv[]) +{ + if (argc != 3) + { + printf ("Wrong number of arguments, should be \"path to app\", \"path to result.\"\n"); + return -1; + } + + StepTest skt; + TestCase::Run(skt,argc,argv); + return 0; +} diff --git a/lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp b/lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/lldb/tools/lldb-perf/common/stepping/stepping-testcase.cpp diff --git a/lldb/tools/lldb-perf/lldbperf.xcodeproj/project.pbxproj b/lldb/tools/lldb-perf/lldbperf.xcodeproj/project.pbxproj index a402bfab6eb..69912295102 100644 --- a/lldb/tools/lldb-perf/lldbperf.xcodeproj/project.pbxproj +++ b/lldb/tools/lldb-perf/lldbperf.xcodeproj/project.pbxproj @@ -13,8 +13,10 @@ buildPhases = ( ); dependencies = ( - 4C1E37E816F7A0AE00FF10BB /* PBXTargetDependency */, - 4C1E37EA16F7A0B100FF10BB /* PBXTargetDependency */, + 4CE3706916FB6FCA00BFD501 /* PBXTargetDependency */, + 4CE3706B16FB6FCC00BFD501 /* PBXTargetDependency */, + 4CE3706D16FB6FCF00BFD501 /* PBXTargetDependency */, + 4CE3706F16FB6FD200BFD501 /* PBXTargetDependency */, ); name = "All Perf Tests"; productName = All; @@ -61,6 +63,11 @@ 4C86C5CB16F7C1D300844407 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C86C5C616F7A37800844407 /* LLDB.framework */; }; 4C86C5CC16F7C1E000844407 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C86C5C616F7A37800844407 /* LLDB.framework */; }; 4C86C5DA16F7CED300844407 /* fmts_tester.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4C1E37B316F79E4600FF10BB /* fmts_tester.mm */; }; + 4CE3707316FB701000BFD501 /* lldb-perf-stepping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE3707216FB701000BFD501 /* lldb-perf-stepping.cpp */; }; + 4CE3707516FB703B00BFD501 /* liblldbperf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C1E373916F4035D00FF10BB /* liblldbperf.a */; }; + 4CE3707616FB704300BFD501 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 264B3DE816F7E47600D1E7AB /* LLDB.framework */; }; + 4CE3707716FB704B00BFD501 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C1E37DB16F7A03900FF10BB /* CoreFoundation.framework */; }; + 4CE3708816FB70EB00BFD501 /* stepping-testcase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE3708716FB70E100BFD501 /* stepping-testcase.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -127,26 +134,54 @@ remoteGlobalIDString = 4C1E373816F4035D00FF10BB; remoteInfo = lldbperf; }; - 4C1E37E716F7A0AE00FF10BB /* PBXContainerItemProxy */ = { + 4C86C5DB16F7CF1200844407 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 4C1E373116F4035D00FF10BB /* Project object */; proxyType = 1; - remoteGlobalIDString = 4C1E37B916F79E9D00FF10BB; - remoteInfo = formatters; + remoteGlobalIDString = 4C86C5D016F7CC8900844407; + remoteInfo = "format-tester"; }; - 4C1E37E916F7A0B100FF10BB /* PBXContainerItemProxy */ = { + 4CE3706816FB6FCA00BFD501 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 4C1E373116F4035D00FF10BB /* Project object */; proxyType = 1; remoteGlobalIDString = 4C1E376C16F4087A00FF10BB; remoteInfo = "lldb-perf-sketch"; }; - 4C86C5DB16F7CF1200844407 /* PBXContainerItemProxy */ = { + 4CE3706A16FB6FCC00BFD501 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 4C1E373116F4035D00FF10BB /* Project object */; proxyType = 1; - remoteGlobalIDString = 4C86C5D016F7CC8900844407; - remoteInfo = "format-tester"; + remoteGlobalIDString = 4C1E37B916F79E9D00FF10BB; + remoteInfo = "lldb-perf-formatters"; + }; + 4CE3706C16FB6FCF00BFD501 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4C1E373116F4035D00FF10BB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 26DBAD5816FA63B1008243D2; + remoteInfo = "lldb-perf-clang"; + }; + 4CE3706E16FB6FD200BFD501 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4C1E373116F4035D00FF10BB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4CE3705316FB6FA100BFD501; + remoteInfo = "lldb-perf-step"; + }; + 4CE3708A16FB711200BFD501 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4C1E373116F4035D00FF10BB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4CE3707B16FB70AD00BFD501; + remoteInfo = "stepping-testcase"; + }; + 4CE3708C16FB712300BFD501 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 4C1E373116F4035D00FF10BB /* Project object */; + proxyType = 1; + remoteGlobalIDString = 4C1E373816F4035D00FF10BB; + remoteInfo = lldbperf; }; /* End PBXContainerItemProxy section */ @@ -205,6 +240,14 @@ 4C86C5C416F7A36A00844407 /* LLDB.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LLDB.framework; path = build/Debug/LLDB.framework; sourceTree = "<group>"; }; 4C86C5C616F7A37800844407 /* LLDB.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LLDB.framework; path = build/Debug/LLDB.framework; sourceTree = "<group>"; }; 4C86C5D116F7CC8900844407 /* format-tester */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "format-tester"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CE3705416FB6FA100BFD501 /* lldb-step-test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-step-test"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CE3705616FB6FA100BFD501 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4CE3705816FB6FA100BFD501 /* lldb_step_test.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = lldb_step_test.1; sourceTree = "<group>"; }; + 4CE3707216FB701000BFD501 /* lldb-perf-stepping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lldb-perf-stepping.cpp"; path = "stepping/lldb-perf-stepping.cpp"; sourceTree = "<group>"; }; + 4CE3707C16FB70AD00BFD501 /* stepping-testcase */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "stepping-testcase"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4CE3707E16FB70AD00BFD501 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; }; + 4CE3708016FB70AD00BFD501 /* stepping_testcase.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = stepping_testcase.1; sourceTree = "<group>"; }; + 4CE3708716FB70E100BFD501 /* stepping-testcase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "stepping-testcase.cpp"; path = "stepping/stepping-testcase.cpp"; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -252,12 +295,30 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4CE3705116FB6FA100BFD501 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CE3707716FB704B00BFD501 /* CoreFoundation.framework in Frameworks */, + 4CE3707616FB704300BFD501 /* LLDB.framework in Frameworks */, + 4CE3707516FB703B00BFD501 /* liblldbperf.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4CE3707916FB70AD00BFD501 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 26DBAD4616FA637D008243D2 /* common */ = { isa = PBXGroup; children = ( + 4CE3707416FB701E00BFD501 /* stepping */, 26DBAD4716FA637D008243D2 /* clang */, ); path = common; @@ -280,6 +341,8 @@ 26DBAD4616FA637D008243D2 /* common */, 4C1E375A16F4081300FF10BB /* cfcpp */, 4C1E374116F407C800FF10BB /* lib */, + 4CE3705516FB6FA100BFD501 /* lldb-step-test */, + 4CE3707D16FB70AD00BFD501 /* stepping-testcase */, 4C1E373A16F4035D00FF10BB /* Products */, 4C1E37DD16F7A03900FF10BB /* Frameworks */, ); @@ -293,6 +356,8 @@ 4C1E37BA16F79E9D00FF10BB /* lldb-perf-formatters */, 4C86C5D116F7CC8900844407 /* format-tester */, 26DBAD5916FA63B1008243D2 /* lldb-perf-clang */, + 4CE3705416FB6FA100BFD501 /* lldb-step-test */, + 4CE3707C16FB70AD00BFD501 /* stepping-testcase */, ); name = Products; sourceTree = "<group>"; @@ -393,6 +458,33 @@ name = Products; sourceTree = "<group>"; }; + 4CE3705516FB6FA100BFD501 /* lldb-step-test */ = { + isa = PBXGroup; + children = ( + 4CE3705616FB6FA100BFD501 /* main.cpp */, + 4CE3705816FB6FA100BFD501 /* lldb_step_test.1 */, + ); + path = "lldb-step-test"; + sourceTree = "<group>"; + }; + 4CE3707416FB701E00BFD501 /* stepping */ = { + isa = PBXGroup; + children = ( + 4CE3708716FB70E100BFD501 /* stepping-testcase.cpp */, + 4CE3707216FB701000BFD501 /* lldb-perf-stepping.cpp */, + ); + name = stepping; + sourceTree = "<group>"; + }; + 4CE3707D16FB70AD00BFD501 /* stepping-testcase */ = { + isa = PBXGroup; + children = ( + 4CE3707E16FB70AD00BFD501 /* main.cpp */, + 4CE3708016FB70AD00BFD501 /* stepping_testcase.1 */, + ); + path = "stepping-testcase"; + sourceTree = "<group>"; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -506,6 +598,40 @@ productReference = 4C86C5D116F7CC8900844407 /* format-tester */; productType = "com.apple.product-type.tool"; }; + 4CE3705316FB6FA100BFD501 /* lldb-perf-step */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4CE3706716FB6FA100BFD501 /* Build configuration list for PBXNativeTarget "lldb-perf-step" */; + buildPhases = ( + 4CE3705016FB6FA100BFD501 /* Sources */, + 4CE3705116FB6FA100BFD501 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 4CE3708D16FB712300BFD501 /* PBXTargetDependency */, + 4CE3708B16FB711200BFD501 /* PBXTargetDependency */, + ); + name = "lldb-perf-step"; + productName = "lldb-step-test"; + productReference = 4CE3705416FB6FA100BFD501 /* lldb-step-test */; + productType = "com.apple.product-type.tool"; + }; + 4CE3707B16FB70AD00BFD501 /* stepping-testcase */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4CE3708216FB70AD00BFD501 /* Build configuration list for PBXNativeTarget "stepping-testcase" */; + buildPhases = ( + 4CE3707816FB70AD00BFD501 /* Sources */, + 4CE3707916FB70AD00BFD501 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "stepping-testcase"; + productName = "stepping-testcase"; + productReference = 4CE3707C16FB70AD00BFD501 /* stepping-testcase */; + productType = "com.apple.product-type.tool"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -538,6 +664,8 @@ 4C1E37B916F79E9D00FF10BB /* lldb-perf-formatters */, 26DBAD5816FA63B1008243D2 /* lldb-perf-clang */, 4C86C5D016F7CC8900844407 /* format-tester */, + 4CE3705316FB6FA100BFD501 /* lldb-perf-step */, + 4CE3707B16FB70AD00BFD501 /* stepping-testcase */, 4C1E37E316F7A0A500FF10BB /* All Perf Tests */, ); }; @@ -646,6 +774,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4CE3705016FB6FA100BFD501 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CE3707316FB701000BFD501 /* lldb-perf-stepping.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4CE3707816FB70AD00BFD501 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4CE3708816FB70EB00BFD501 /* stepping-testcase.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -659,20 +803,40 @@ target = 4C1E373816F4035D00FF10BB /* lldbperf */; targetProxy = 4C1E37C316F79EB000FF10BB /* PBXContainerItemProxy */; }; - 4C1E37E816F7A0AE00FF10BB /* PBXTargetDependency */ = { + 4C86C5DC16F7CF1200844407 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 4C1E37B916F79E9D00FF10BB /* lldb-perf-formatters */; - targetProxy = 4C1E37E716F7A0AE00FF10BB /* PBXContainerItemProxy */; + target = 4C86C5D016F7CC8900844407 /* format-tester */; + targetProxy = 4C86C5DB16F7CF1200844407 /* PBXContainerItemProxy */; }; - 4C1E37EA16F7A0B100FF10BB /* PBXTargetDependency */ = { + 4CE3706916FB6FCA00BFD501 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 4C1E376C16F4087A00FF10BB /* lldb-perf-sketch */; - targetProxy = 4C1E37E916F7A0B100FF10BB /* PBXContainerItemProxy */; + targetProxy = 4CE3706816FB6FCA00BFD501 /* PBXContainerItemProxy */; }; - 4C86C5DC16F7CF1200844407 /* PBXTargetDependency */ = { + 4CE3706B16FB6FCC00BFD501 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 4C86C5D016F7CC8900844407 /* format-tester */; - targetProxy = 4C86C5DB16F7CF1200844407 /* PBXContainerItemProxy */; + target = 4C1E37B916F79E9D00FF10BB /* lldb-perf-formatters */; + targetProxy = 4CE3706A16FB6FCC00BFD501 /* PBXContainerItemProxy */; + }; + 4CE3706D16FB6FCF00BFD501 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 26DBAD5816FA63B1008243D2 /* lldb-perf-clang */; + targetProxy = 4CE3706C16FB6FCF00BFD501 /* PBXContainerItemProxy */; + }; + 4CE3706F16FB6FD200BFD501 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4CE3705316FB6FA100BFD501 /* lldb-perf-step */; + targetProxy = 4CE3706E16FB6FD200BFD501 /* PBXContainerItemProxy */; + }; + 4CE3708B16FB711200BFD501 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4CE3707B16FB70AD00BFD501 /* stepping-testcase */; + targetProxy = 4CE3708A16FB711200BFD501 /* PBXContainerItemProxy */; + }; + 4CE3708D16FB712300BFD501 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 4C1E373816F4035D00FF10BB /* lldbperf */; + targetProxy = 4CE3708C16FB712300BFD501 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -883,6 +1047,54 @@ }; name = Release; }; + 4CE3705A16FB6FA100BFD501 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 4CE3705B16FB6FA100BFD501 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; + 4CE3708316FB70AD00BFD501 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 4CE3708416FB70AD00BFD501 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -893,6 +1105,7 @@ 26DBAD6116FA63B1008243D2 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 4C1E373416F4035D00FF10BB /* Build configuration list for PBXProject "lldbperf" */ = { isa = XCConfigurationList; @@ -948,6 +1161,22 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 4CE3706716FB6FA100BFD501 /* Build configuration list for PBXNativeTarget "lldb-perf-step" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4CE3705A16FB6FA100BFD501 /* Debug */, + 4CE3705B16FB6FA100BFD501 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 4CE3708216FB70AD00BFD501 /* Build configuration list for PBXNativeTarget "stepping-testcase" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4CE3708316FB70AD00BFD501 /* Debug */, + 4CE3708416FB70AD00BFD501 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; /* End XCConfigurationList section */ }; rootObject = 4C1E373116F4035D00FF10BB /* Project object */; |

