[Lldb-commits] [lldb] r177697 - 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.

Greg Clayton gclayton at apple.com
Thu Mar 21 19:38:49 PDT 2013


Author: gclayton
Date: Thu Mar 21 21:38:49 2013
New Revision: 177697

URL: http://llvm.org/viewvc/llvm-project?rev=177697&view=rev
Log:
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.


Modified:
    lldb/trunk/tools/lldb-perf/lib/Gauge.h
    lldb/trunk/tools/lldb-perf/lib/Measurement.h
    lldb/trunk/tools/lldb-perf/lib/Metric.cpp
    lldb/trunk/tools/lldb-perf/lib/Metric.h
    lldb/trunk/tools/lldb-perf/lib/Timer.cpp

Modified: lldb/trunk/tools/lldb-perf/lib/Gauge.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/Gauge.h?rev=177697&r1=177696&r2=177697&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/Gauge.h (original)
+++ lldb/trunk/tools/lldb-perf/lib/Gauge.h Thu Mar 21 21:38:49 2013
@@ -15,8 +15,6 @@
 
 #include "Results.h"
 
-class CFCMutableDictionary;
-
 namespace lldb_perf {
 
 template <class T>

Modified: lldb/trunk/tools/lldb-perf/lib/Measurement.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/Measurement.h?rev=177697&r1=177696&r2=177697&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/Measurement.h (original)
+++ lldb/trunk/tools/lldb-perf/lib/Measurement.h Thu Mar 21 21:38:49 2013
@@ -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)

Modified: lldb/trunk/tools/lldb-perf/lib/Metric.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/Metric.cpp?rev=177697&r1=177696&r2=177697&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/Metric.cpp (original)
+++ lldb/trunk/tools/lldb-perf/lib/Metric.cpp Thu Mar 21 21:38:49 2013
@@ -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>;

Modified: lldb/trunk/tools/lldb-perf/lib/Metric.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/Metric.h?rev=177697&r1=177696&r2=177697&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/Metric.h (original)
+++ lldb/trunk/tools/lldb-perf/lib/Metric.h Thu Mar 21 21:38:49 2013
@@ -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;

Modified: lldb/trunk/tools/lldb-perf/lib/Timer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/Timer.cpp?rev=177697&r1=177696&r2=177697&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/Timer.cpp (original)
+++ lldb/trunk/tools/lldb-perf/lib/Timer.cpp Thu Mar 21 21:38:49 2013
@@ -10,9 +10,6 @@
 #include "Timer.h"
 #include <assert.h>
 
-#include "CFCMutableDictionary.h"
-#include "CFCString.h"
-
 using namespace lldb_perf;
 
 TimeGauge::TimeType





More information about the lldb-commits mailing list