summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-03-22 02:38:49 +0000
committerGreg Clayton <gclayton@apple.com>2013-03-22 02:38:49 +0000
commit824e5a2caab795742a816e0a0970d8bc303cd276 (patch)
treeefb1b860fbc9ca5431c6d4597535ada120e8d47d
parent880afc5728954e36d00e42d7961897814e7ae028 (diff)
downloadbcm5719-llvm-824e5a2caab795742a816e0a0970d8bc303cd276.tar.gz
bcm5719-llvm-824e5a2caab795742a816e0a0970d8bc303cd276.zip
More cleanup to remove the CoreFoundation classes out of mainstream code (CFCMutableDictionary, CFCMutableArray, CFCString, etc). Now it is only used in the Results.cpp file for Apple builds only.
llvm-svn: 177697
-rw-r--r--lldb/tools/lldb-perf/lib/Gauge.h2
-rw-r--r--lldb/tools/lldb-perf/lib/Measurement.h8
-rw-r--r--lldb/tools/lldb-perf/lib/Metric.cpp33
-rw-r--r--lldb/tools/lldb-perf/lib/Metric.h23
-rw-r--r--lldb/tools/lldb-perf/lib/Timer.cpp3
5 files changed, 2 insertions, 67 deletions
diff --git a/lldb/tools/lldb-perf/lib/Gauge.h b/lldb/tools/lldb-perf/lib/Gauge.h
index 59d5d1ff592..fc5c444a38b 100644
--- a/lldb/tools/lldb-perf/lib/Gauge.h
+++ b/lldb/tools/lldb-perf/lib/Gauge.h
@@ -15,8 +15,6 @@
#include "Results.h"
-class CFCMutableDictionary;
-
namespace lldb_perf {
template <class T>
diff --git a/lldb/tools/lldb-perf/lib/Measurement.h b/lldb/tools/lldb-perf/lib/Measurement.h
index eaea82ffd51..a75bc6ff201 100644
--- a/lldb/tools/lldb-perf/lib/Measurement.h
+++ b/lldb/tools/lldb-perf/lib/Measurement.h
@@ -18,7 +18,7 @@
namespace lldb_perf
{
template <typename GaugeType, typename Callable>
-class Measurement : public WriteResults
+class Measurement
{
public:
Measurement () :
@@ -90,12 +90,6 @@ public:
m_metric.Append(value);
return value;
}
-
- virtual void
- Write (CFCMutableDictionary& parent)
- {
- m_metric.Write(parent);
- }
void
WriteStartValue (Results &results)
diff --git a/lldb/tools/lldb-perf/lib/Metric.cpp b/lldb/tools/lldb-perf/lib/Metric.cpp
index bf8120f2b89..8bb306bb9ab 100644
--- a/lldb/tools/lldb-perf/lib/Metric.cpp
+++ b/lldb/tools/lldb-perf/lib/Metric.cpp
@@ -8,10 +8,6 @@
//===----------------------------------------------------------------------===//
#include "Metric.h"
-
-#include "CFCMutableArray.h"
-#include "CFCMutableDictionary.h"
-#include "CFCString.h"
#include "MemoryGauge.h"
using namespace lldb_perf;
@@ -60,34 +56,5 @@ Metric<T>::GetAverage () const
return GetSum()/GetCount();
}
-template <>
-void Metric<double>::WriteImpl (CFCMutableDictionary& parent_dict, const char *name, const char *description, double value)
-{
- assert(name && name[0]);
- CFCMutableDictionary dict;
- if (description && description[0])
- dict.AddValueCString(CFCString("description").get(),description, true);
- dict.AddValueDouble(CFCString("value").get(),value, true);
- parent_dict.AddValue(CFCString(name).get(), dict.get(), true);
-}
-
-template <>
-void Metric<MemoryStats>::WriteImpl (CFCMutableDictionary& parent_dict, const char *name, const char *description, MemoryStats value)
-{
- CFCMutableDictionary dict;
- if (description && description[0])
- dict.AddValueCString(CFCString("description").get(),description, true);
- CFCMutableDictionary value_dict;
- // don't write out the "virtual size", it doesn't mean anything useful as it includes
- // all of the shared cache and many other things that make it way too big to be useful
- //value_dict.AddValueUInt64(CFCString("virtual").get(), value.GetVirtualSize(), true);
- value_dict.AddValueUInt64(CFCString("resident").get(), value.GetResidentSize(), true);
- value_dict.AddValueUInt64(CFCString("max_resident").get(), value.GetMaxResidentSize(), true);
-
- dict.AddValue(CFCString("value").get(),value_dict.get(), true);
-
- parent_dict.AddValue(CFCString(name).get(), dict.get(), true);
-}
-
template class lldb_perf::Metric<double>;
template class lldb_perf::Metric<MemoryStats>;
diff --git a/lldb/tools/lldb-perf/lib/Metric.h b/lldb/tools/lldb-perf/lib/Metric.h
index bdbe8245af5..3e173c69962 100644
--- a/lldb/tools/lldb-perf/lib/Metric.h
+++ b/lldb/tools/lldb-perf/lib/Metric.h
@@ -14,24 +14,12 @@
#include <string>
#include <mach/task_info.h>
-#include "CFCMutableDictionary.h"
-
namespace lldb_perf {
class MemoryStats;
-class WriteResults
-{
-public:
- virtual void
- Write (CFCMutableDictionary& parent) = 0;
-
- virtual
- ~WriteResults () {}
-};
-
template <class ValueType>
-class Metric : public WriteResults
+class Metric
{
public:
Metric ();
@@ -64,15 +52,6 @@ public:
return NULL;
return m_description.c_str();
}
-
- virtual void
- Write (CFCMutableDictionary& parent)
- {
- WriteImpl(parent, GetName(), GetDescription(), GetAverage());
- }
-
- static void WriteImpl (CFCMutableDictionary& parent, const char *name, const char *description, double);
- static void WriteImpl (CFCMutableDictionary& parent, const char *name, const char *description, MemoryStats);
private:
std::string m_name;
diff --git a/lldb/tools/lldb-perf/lib/Timer.cpp b/lldb/tools/lldb-perf/lib/Timer.cpp
index 52b6c2917d8..4bbab904c63 100644
--- a/lldb/tools/lldb-perf/lib/Timer.cpp
+++ b/lldb/tools/lldb-perf/lib/Timer.cpp
@@ -10,9 +10,6 @@
#include "Timer.h"
#include <assert.h>
-#include "CFCMutableDictionary.h"
-#include "CFCString.h"
-
using namespace lldb_perf;
TimeGauge::TimeType
OpenPOWER on IntegriCloud