diff options
author | Greg Clayton <gclayton@apple.com> | 2013-03-18 22:34:00 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-03-18 22:34:00 +0000 |
commit | 7b8f738227424f9c8105bf1db2bb067d596b228e (patch) | |
tree | a4ab33043496478235852e5dc2eeb805bce7e1fb | |
parent | 8fc340976d28b6719e66014496608a095e6f8ecd (diff) | |
download | bcm5719-llvm-7b8f738227424f9c8105bf1db2bb067d596b228e.tar.gz bcm5719-llvm-7b8f738227424f9c8105bf1db2bb067d596b228e.zip |
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
llvm-svn: 177332
-rw-r--r-- | lldb/lldb.xcodeproj/project.pbxproj | 2 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/darwin/formatters/main.cpp | 134 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/darwin/sketch/main.cpp | 167 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/Gauge.h | 4 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/Measurement.h | 4 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/MemoryGauge.cpp | 2 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/MemoryGauge.h | 4 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/Metric.cpp | 6 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/Metric.h | 4 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/TestCase.cpp | 13 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/TestCase.h | 64 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/Timer.cpp | 2 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/Timer.h | 4 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/Xcode.cpp | 2 | ||||
-rw-r--r-- | lldb/tools/lldb-perf/lib/Xcode.h | 4 |
15 files changed, 231 insertions, 185 deletions
diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj index a0e8ed3e9c9..e3091a6dcb7 100644 --- a/lldb/lldb.xcodeproj/project.pbxproj +++ b/lldb/lldb.xcodeproj/project.pbxproj @@ -3330,11 +3330,11 @@ 26F5C22410F3D950009D5894 /* Tools */ = { isa = PBXGroup; children = ( - 940DB8C416EA64D400D3C2F1 /* lldb-perf */, 26579F55126A255E0007C5CB /* darwin-debug */, 265E9BE0115C2B8500D0DCCB /* debugserver */, 26F5C22510F3D956009D5894 /* Driver */, 2665CD0915080846002C8FAE /* install-headers */, + 940DB8C416EA64D400D3C2F1 /* lldb-perf */, 26DC6A1B1337FEA400FF7998 /* lldb-platform */, ); name = Tools; diff --git a/lldb/tools/lldb-perf/darwin/formatters/main.cpp b/lldb/tools/lldb-perf/darwin/formatters/main.cpp index bc55e7827f3..cc12b3e0826 100644 --- a/lldb/tools/lldb-perf/darwin/formatters/main.cpp +++ b/lldb/tools/lldb-perf/darwin/formatters/main.cpp @@ -18,7 +18,7 @@ #include <unistd.h> #include <fstream> -using namespace lldb::perf; +using namespace lldb_perf; class FormattersTest : public TestCase { @@ -26,40 +26,40 @@ public: FormattersTest () : TestCase() { m_dump_std_vector_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,1,false); + lldb_perf::Xcode::FetchVariable (value,1,false); }, "std-vector", "time to dump an std::vector"); m_dump_std_list_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,1,false); + lldb_perf::Xcode::FetchVariable (value,1,false); }, "std-list", "time to dump an std::list"); m_dump_std_map_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,1,false); + lldb_perf::Xcode::FetchVariable (value,1,false); }, "std-map", "time to dump an std::map"); m_dump_std_string_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,1,false); + lldb_perf::Xcode::FetchVariable (value,1,false); }, "std-string", "time to dump an std::string"); m_dump_nsstring_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,0,false); + lldb_perf::Xcode::FetchVariable (value,0,false); }, "ns-string", "time to dump an NSString"); m_dump_nsarray_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,1,false); + lldb_perf::Xcode::FetchVariable (value,1,false); }, "ns-array", "time to dump an NSArray"); m_dump_nsdictionary_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,1,false); + lldb_perf::Xcode::FetchVariable (value,1,false); }, "ns-dictionary", "time to dump an NSDictionary"); m_dump_nsset_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,1,false); + lldb_perf::Xcode::FetchVariable (value,1,false); }, "ns-set", "time to dump an NSSet"); m_dump_nsbundle_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,1,false); + lldb_perf::Xcode::FetchVariable (value,1,false); }, "ns-bundle", "time to dump an NSBundle"); m_dump_nsdate_measurement = CreateTimeMeasurement([] (SBValue value) -> void { - lldb::perf::Xcode::FetchVariable (value,0,false); + lldb_perf::Xcode::FetchVariable (value,0,false); }, "ns-date", "time to dump an NSDate"); } @@ -138,71 +138,59 @@ public: m_dump_std_string_measurement(frame_zero.FindVariable("sstr4", lldb::eDynamicCanRunTarget)); } - virtual ActionWanted - TestStep (int counter) + virtual void + TestStep (int counter, ActionWanted &next_action) { -#define STEP(n) if (counter == n) -#define NEXT(s) return TestCase::ActionWanted{TestCase::ActionWanted::Type::eAWNext,SelectMyThread(s)} -#define FINISH(s) return TestCase::ActionWanted{TestCase::ActionWanted::Type::eAWFinish,SelectMyThread(s)} -#define CONT return TestCase::ActionWanted{TestCase::ActionWanted::Type::eAWContinue,SBThread()} -#define KILL return TestCase::ActionWanted{TestCase::ActionWanted::Type::eAWKill,SBThread()} - STEP (0) + switch (counter) { - m_target.BreakpointCreateByLocation("fmts_tester.mm", 68); - CONT; + case 0: + m_target.BreakpointCreateByLocation("fmts_tester.mm", 68); + next_action.Continue(); + break; + case 1: + DoTest (); + next_action.Continue(); + break; + case 2: + DoTest (); + next_action.Continue(); + break; + case 3: + DoTest (); + next_action.Continue(); + break; + case 4: + DoTest (); + next_action.Continue(); + break; + case 5: + DoTest (); + next_action.Continue(); + break; + case 6: + DoTest (); + next_action.Continue(); + break; + case 7: + DoTest (); + next_action.Continue(); + break; + case 8: + DoTest (); + next_action.Continue(); + break; + case 9: + DoTest (); + next_action.Continue(); + break; + case 10: + DoTest (); + next_action.Continue(); + break; + default: + next_action.Kill(); + break; } - - STEP (1) - { - DoTest (); - CONT; - } - STEP (2) - { - DoTest (); - CONT; - } - STEP (3) - { - DoTest (); - CONT; - } - STEP (4) - { - DoTest (); - CONT; - } - STEP (5) - { - DoTest (); - CONT; - } - STEP (6) - { - DoTest (); - CONT; - } - STEP (7) - { - DoTest (); - CONT; - } - STEP (8) - { - DoTest (); - CONT; - } - STEP (9) - { - DoTest (); - CONT; - } - STEP (10) - { - DoTest (); - CONT; - } - KILL; } void diff --git a/lldb/tools/lldb-perf/darwin/sketch/main.cpp b/lldb/tools/lldb-perf/darwin/sketch/main.cpp index 132903b49e3..ef1a08f1dd7 100644 --- a/lldb/tools/lldb-perf/darwin/sketch/main.cpp +++ b/lldb/tools/lldb-perf/darwin/sketch/main.cpp @@ -18,7 +18,7 @@ #include <unistd.h> #include <fstream> -using namespace lldb::perf; +using namespace lldb_perf; class SketchTest : public TestCase { @@ -82,73 +82,98 @@ public: m_fetch_vars_measurement(m_process,1); } - virtual ActionWanted - TestStep (int counter) + virtual void + TestStep (int counter, ActionWanted &next_action) { -#define STEP(n) if (counter == n) -#define NEXT(s) return TestCase::ActionWanted{TestCase::ActionWanted::Type::eAWNext,SelectMyThread(s)} -#define FINISH(s) return TestCase::ActionWanted{TestCase::ActionWanted::Type::eAWFinish,SelectMyThread(s)} -#define CONT return TestCase::ActionWanted{TestCase::ActionWanted::Type::eAWContinue,SBThread()} -#define KILL return TestCase::ActionWanted{TestCase::ActionWanted::Type::eAWKill,SBThread()} - STEP(0) { - DoTest (); - m_file_line_bp_measurement(m_target, "SKTDocument.m",254); - CONT; - } - STEP(1) { - DoTest (); - SBThread thread(SelectMyThread("SKTDocument.m")); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"properties"); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"[properties description]"); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"typeName"); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"data"); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"[data description]"); - CONT; - } - STEP(2) { - DoTest (); - CONT; - } - STEP(3) { - DoTest (); - NEXT("SKTText.m"); - } - STEP(4) { - DoTest (); - SBThread thread(SelectMyThread("SKTText.m")); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"layoutManager"); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"contents"); - NEXT("SKTText.m"); - } - STEP(5) { - DoTest (); - NEXT("SKTText.m"); - } - STEP(6) { - DoTest (); - NEXT("SKTText.m"); - } - STEP(7) { - DoTest (); - SBThread thread(SelectMyThread("SKTText.m")); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"@\"an NSString\""); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"[(id)@\"an NSString\" description]"); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"@[@1,@2,@3]"); - FINISH("SKTText.m"); - } - STEP(8) { - DoTest (); - SBThread thread(SelectMyThread("SKTGraphicView.m")); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"[graphics description]"); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"[selectionIndexes description]"); - m_run_expr_measurement(thread.GetFrameAtIndex(0),"(BOOL)NSIntersectsRect(rect, graphicDrawingBounds)"); - KILL; + switch (counter) + { + case 0: + { + DoTest (); + m_file_line_bp_measurement(m_target, "SKTDocument.m",254); + next_action.Continue(); + } + break; + + case 1: + { + DoTest (); + SBThread thread(SelectMyThread("SKTDocument.m")); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"properties"); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"[properties description]"); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"typeName"); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"data"); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"[data description]"); + next_action.Continue(); + } + break; + + case 2: + { + DoTest (); + next_action.Continue(); + } + break; + + case 3: + { + DoTest (); + next_action.Next(SelectMyThread ("SKTText.m")); + } + break; + + case 4: + { + DoTest (); + SBThread thread(SelectMyThread("SKTText.m")); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"layoutManager"); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"contents"); + next_action.Next(thread); + } + break; + + case 5: + { + DoTest (); + next_action.Next(SelectMyThread ("SKTText.m")); + } + break; + + case 6: + { + DoTest (); + next_action.Next(SelectMyThread ("SKTText.m")); + } + break; + + case 7: + { + DoTest (); + SBThread thread(SelectMyThread("SKTText.m")); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"@\"an NSString\""); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"[(id)@\"an NSString\" description]"); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"@[@1,@2,@3]"); + next_action.Finish(thread); + } + break; + + case 8: + { + DoTest (); + SBThread thread(SelectMyThread("SKTGraphicView.m")); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"[graphics description]"); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"[selectionIndexes description]"); + m_run_expr_measurement(thread.GetFrameAtIndex(0),"(BOOL)NSIntersectsRect(rect, graphicDrawingBounds)"); + next_action.Kill(); + } + break; + + default: + { + next_action.Kill(); + } + break; } - KILL; -#undef STEP -#undef NEXT -#undef CONT -#undef KILL } void @@ -169,11 +194,11 @@ public: } private: - Measurement<lldb::perf::TimeGauge, std::function<void(SBProcess)>> m_fetch_frames_measurement; - Measurement<lldb::perf::TimeGauge, std::function<void(SBTarget, const char*, uint32_t)>> m_file_line_bp_measurement; - Measurement<lldb::perf::TimeGauge, std::function<void(SBTarget)>> m_fetch_modules_measurement; - Measurement<lldb::perf::TimeGauge, std::function<void(SBProcess,int)>> m_fetch_vars_measurement; - Measurement<lldb::perf::TimeGauge, std::function<void(SBFrame,const char*)>> m_run_expr_measurement; + Measurement<lldb_perf::TimeGauge, std::function<void(SBProcess)>> m_fetch_frames_measurement; + Measurement<lldb_perf::TimeGauge, std::function<void(SBTarget, const char*, uint32_t)>> m_file_line_bp_measurement; + Measurement<lldb_perf::TimeGauge, std::function<void(SBTarget)>> m_fetch_modules_measurement; + Measurement<lldb_perf::TimeGauge, std::function<void(SBProcess,int)>> m_fetch_vars_measurement; + Measurement<lldb_perf::TimeGauge, std::function<void(SBFrame,const char*)>> m_run_expr_measurement; SBThread SelectMyThread (const char* file_name) diff --git a/lldb/tools/lldb-perf/lib/Gauge.h b/lldb/tools/lldb-perf/lib/Gauge.h index 7c843368baa..33e6a284af3 100644 --- a/lldb/tools/lldb-perf/lib/Gauge.h +++ b/lldb/tools/lldb-perf/lib/Gauge.h @@ -11,7 +11,7 @@ #include <functional> -namespace lldb { namespace perf +namespace lldb_perf { template <class TASizeType> class Gauge @@ -45,6 +45,6 @@ public: } }; -} } +} #endif diff --git a/lldb/tools/lldb-perf/lib/Measurement.h b/lldb/tools/lldb-perf/lib/Measurement.h index 4623bdf8f6f..24a95bb4b5b 100644 --- a/lldb/tools/lldb-perf/lib/Measurement.h +++ b/lldb/tools/lldb-perf/lib/Measurement.h @@ -13,7 +13,7 @@ #include "Timer.h" #include "Metric.h" -namespace lldb { namespace perf +namespace lldb_perf { template <typename GaugeType, typename Action> class Measurement : public WriteToPList @@ -90,6 +90,6 @@ public: } }; -} } +} #endif /* defined(__PerfTestDriver__Measurement__) */ diff --git a/lldb/tools/lldb-perf/lib/MemoryGauge.cpp b/lldb/tools/lldb-perf/lib/MemoryGauge.cpp index 2a80fccb7e0..f12a7fd99cb 100644 --- a/lldb/tools/lldb-perf/lib/MemoryGauge.cpp +++ b/lldb/tools/lldb-perf/lib/MemoryGauge.cpp @@ -10,7 +10,7 @@ #include <assert.h> #include <mach/task.h> -using namespace lldb::perf; +using namespace lldb_perf; MemoryGauge::SizeType MemoryGauge::now () diff --git a/lldb/tools/lldb-perf/lib/MemoryGauge.h b/lldb/tools/lldb-perf/lib/MemoryGauge.h index 272b9969b8c..eefd274b9c4 100644 --- a/lldb/tools/lldb-perf/lib/MemoryGauge.h +++ b/lldb/tools/lldb-perf/lib/MemoryGauge.h @@ -13,7 +13,7 @@ #include <mach/task_info.h> -namespace lldb { namespace perf +namespace lldb_perf { class MemoryGauge : public Gauge<mach_vm_size_t> { @@ -48,6 +48,6 @@ public: SizeType value (); }; -} } +} #endif /* defined(__PerfTestDriver__MemoryGauge__) */ diff --git a/lldb/tools/lldb-perf/lib/Metric.cpp b/lldb/tools/lldb-perf/lib/Metric.cpp index 3791dd35409..ba56c033c15 100644 --- a/lldb/tools/lldb-perf/lib/Metric.cpp +++ b/lldb/tools/lldb-perf/lib/Metric.cpp @@ -12,7 +12,7 @@ #include "CFCMutableDictionary.h" #include "CFCString.h" -using namespace lldb::perf; +using namespace lldb_perf; template <class T> Metric<T>::Metric () : Metric ("") @@ -90,5 +90,5 @@ void Metric<T>::WriteImpl (CFCMutableArray& parent, identity<mach_vm_size_t>) parent.AppendValue(dict.get(), true); } -template class lldb::perf::Metric<double>; -template class lldb::perf::Metric<mach_vm_size_t>; +template class lldb_perf::Metric<double>; +template class lldb_perf::Metric<mach_vm_size_t>; diff --git a/lldb/tools/lldb-perf/lib/Metric.h b/lldb/tools/lldb-perf/lib/Metric.h index 874169522ad..4d7b57d33cb 100644 --- a/lldb/tools/lldb-perf/lib/Metric.h +++ b/lldb/tools/lldb-perf/lib/Metric.h @@ -15,7 +15,7 @@ #include "CFCMutableArray.h" -namespace lldb { namespace perf +namespace lldb_perf { class WriteToPList { @@ -70,6 +70,6 @@ private: std::string m_description; std::vector<ValueType> m_dataset; }; -} } +} #endif /* defined(__PerfTestDriver__Metric__) */ diff --git a/lldb/tools/lldb-perf/lib/TestCase.cpp b/lldb/tools/lldb-perf/lib/TestCase.cpp index beb335f6613..ca825d99ce4 100644 --- a/lldb/tools/lldb-perf/lib/TestCase.cpp +++ b/lldb/tools/lldb-perf/lib/TestCase.cpp @@ -9,7 +9,7 @@ #include "TestCase.h" #include "Xcode.h" -using namespace lldb::perf; +using namespace lldb_perf; TestCase::TestCase () : m_debugger(), @@ -131,14 +131,15 @@ TestCase::Loop () } if (m_verbose) printf("RUNNING STEP %d\n",step); - auto action = TestStep(step); + ActionWanted action; + TestStep(step, action); step++; switch (action.type) { - case ActionWanted::Type::eAWContinue: + case ActionWanted::Type::eContinue: m_debugger.HandleCommand("continue"); break; - case ActionWanted::Type::eAWFinish: + case ActionWanted::Type::eFinish: if (action.thread.IsValid() == false) { if (m_verbose) Xcode::RunCommand(m_debugger,"bt all",true); @@ -148,7 +149,7 @@ TestCase::Loop () m_process.SetSelectedThread(action.thread); m_debugger.HandleCommand("finish"); break; - case ActionWanted::Type::eAWNext: + case ActionWanted::Type::eNext: if (action.thread.IsValid() == false) { if (m_verbose) Xcode::RunCommand(m_debugger,"bt all",true); @@ -158,7 +159,7 @@ TestCase::Loop () m_process.SetSelectedThread(action.thread); m_debugger.HandleCommand("next"); break; - case ActionWanted::Type::eAWKill: + case ActionWanted::Type::eKill: if (m_verbose) printf("I want to die\n"); m_process.Kill(); return; diff --git a/lldb/tools/lldb-perf/lib/TestCase.h b/lldb/tools/lldb-perf/lib/TestCase.h index c4d449a330a..a46dc5af24b 100644 --- a/lldb/tools/lldb-perf/lib/TestCase.h +++ b/lldb/tools/lldb-perf/lib/TestCase.h @@ -12,9 +12,7 @@ #include "lldb/API/LLDB.h" #include "Measurement.h" -using namespace lldb; - -namespace lldb { namespace perf +namespace lldb_perf { class TestCase { @@ -25,12 +23,46 @@ public: { enum class Type { - eAWNext, - eAWContinue, - eAWFinish, - eAWKill + eNext, + eContinue, + eFinish, + eKill } type; - SBThread thread; + lldb::SBThread thread; + + ActionWanted () : + type (Type::eContinue), + thread () + { + } + + void + Continue() + { + type = Type::eContinue; + thread = lldb::SBThread(); + } + + void + Next (lldb::SBThread t) + { + type = Type::eNext; + thread = t; + } + + void + Finish (lldb::SBThread t) + { + type = Type::eFinish; + thread = t; + } + + void + Kill () + { + type = Type::eKill; + thread = lldb::SBThread(); + } }; virtual @@ -40,8 +72,8 @@ public: virtual void Setup (int argc, const char** argv); - virtual ActionWanted - TestStep (int counter) = 0; + virtual void + TestStep (int counter, ActionWanted &next_action) = 0; bool Launch (const char** args, const char* cwd); @@ -74,13 +106,13 @@ public: Run (TestCase& test, int argc, const char** argv); protected: - SBDebugger m_debugger; - SBTarget m_target; - SBProcess m_process; - SBThread m_thread; - SBListener m_listener; + lldb::SBDebugger m_debugger; + lldb::SBTarget m_target; + lldb::SBProcess m_process; + lldb::SBThread m_thread; + lldb::SBListener m_listener; bool m_verbose; }; -} } +} #endif /* defined(__PerfTestDriver__TestCase__) */ diff --git a/lldb/tools/lldb-perf/lib/Timer.cpp b/lldb/tools/lldb-perf/lib/Timer.cpp index 59871aab4ce..4f4c623c2f0 100644 --- a/lldb/tools/lldb-perf/lib/Timer.cpp +++ b/lldb/tools/lldb-perf/lib/Timer.cpp @@ -9,7 +9,7 @@ #include "Timer.h" #include <assert.h> -using namespace lldb::perf; +using namespace lldb_perf; TimeGauge::HPTime TimeGauge::now () diff --git a/lldb/tools/lldb-perf/lib/Timer.h b/lldb/tools/lldb-perf/lib/Timer.h index c877a3d3c9e..4f8ac15f943 100644 --- a/lldb/tools/lldb-perf/lib/Timer.h +++ b/lldb/tools/lldb-perf/lib/Timer.h @@ -15,7 +15,7 @@ using namespace std::chrono; -namespace lldb { namespace perf +namespace lldb_perf { class TimeGauge : public Gauge<double> { @@ -51,6 +51,6 @@ public: double value (); }; -} } +} #endif /* defined(__PerfTestDriver__Timer__) */ diff --git a/lldb/tools/lldb-perf/lib/Xcode.cpp b/lldb/tools/lldb-perf/lib/Xcode.cpp index 730844d520f..e0b2a798699 100644 --- a/lldb/tools/lldb-perf/lib/Xcode.cpp +++ b/lldb/tools/lldb-perf/lib/Xcode.cpp @@ -10,7 +10,7 @@ #include <string> using namespace std; -using namespace lldb::perf; +using namespace lldb_perf; void Xcode::FetchVariable (SBValue value, uint32_t expand, bool verbose) diff --git a/lldb/tools/lldb-perf/lib/Xcode.h b/lldb/tools/lldb-perf/lib/Xcode.h index 670fdcbc24f..1799fc9703a 100644 --- a/lldb/tools/lldb-perf/lib/Xcode.h +++ b/lldb/tools/lldb-perf/lib/Xcode.h @@ -23,7 +23,7 @@ using namespace lldb; -namespace lldb { namespace perf +namespace lldb_perf { class Xcode { @@ -58,6 +58,6 @@ public: static SBBreakpoint CreateFileLineBreakpoint (SBTarget target, const char* file, uint32_t line); }; -} } +} #endif /* defined(__PerfTestDriver__Xcode__) */ |