Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d2c50b1

Browse files
author
Greg Clayton
committedMar 22, 2013
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.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177697 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 9de4dec commit d2c50b1

File tree

5 files changed

+2
-67
lines changed

5 files changed

+2
-67
lines changed
 

‎tools/lldb-perf/lib/Gauge.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616
#include "Results.h"
1717

18-
class CFCMutableDictionary;
19-
2018
namespace lldb_perf {
2119

2220
template <class T>

‎tools/lldb-perf/lib/Measurement.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
namespace lldb_perf
1919
{
2020
template <typename GaugeType, typename Callable>
21-
class Measurement : public WriteResults
21+
class Measurement
2222
{
2323
public:
2424
Measurement () :
@@ -90,12 +90,6 @@ class Measurement : public WriteResults
9090
m_metric.Append(value);
9191
return value;
9292
}
93-
94-
virtual void
95-
Write (CFCMutableDictionary& parent)
96-
{
97-
m_metric.Write(parent);
98-
}
9993

10094
void
10195
WriteStartValue (Results &results)

‎tools/lldb-perf/lib/Metric.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
//===----------------------------------------------------------------------===//
99

1010
#include "Metric.h"
11-
12-
#include "CFCMutableArray.h"
13-
#include "CFCMutableDictionary.h"
14-
#include "CFCString.h"
1511
#include "MemoryGauge.h"
1612

1713
using namespace lldb_perf;
@@ -60,34 +56,5 @@ Metric<T>::GetAverage () const
6056
return GetSum()/GetCount();
6157
}
6258

63-
template <>
64-
void Metric<double>::WriteImpl (CFCMutableDictionary& parent_dict, const char *name, const char *description, double value)
65-
{
66-
assert(name && name[0]);
67-
CFCMutableDictionary dict;
68-
if (description && description[0])
69-
dict.AddValueCString(CFCString("description").get(),description, true);
70-
dict.AddValueDouble(CFCString("value").get(),value, true);
71-
parent_dict.AddValue(CFCString(name).get(), dict.get(), true);
72-
}
73-
74-
template <>
75-
void Metric<MemoryStats>::WriteImpl (CFCMutableDictionary& parent_dict, const char *name, const char *description, MemoryStats value)
76-
{
77-
CFCMutableDictionary dict;
78-
if (description && description[0])
79-
dict.AddValueCString(CFCString("description").get(),description, true);
80-
CFCMutableDictionary value_dict;
81-
// don't write out the "virtual size", it doesn't mean anything useful as it includes
82-
// all of the shared cache and many other things that make it way too big to be useful
83-
//value_dict.AddValueUInt64(CFCString("virtual").get(), value.GetVirtualSize(), true);
84-
value_dict.AddValueUInt64(CFCString("resident").get(), value.GetResidentSize(), true);
85-
value_dict.AddValueUInt64(CFCString("max_resident").get(), value.GetMaxResidentSize(), true);
86-
87-
dict.AddValue(CFCString("value").get(),value_dict.get(), true);
88-
89-
parent_dict.AddValue(CFCString(name).get(), dict.get(), true);
90-
}
91-
9259
template class lldb_perf::Metric<double>;
9360
template class lldb_perf::Metric<MemoryStats>;

‎tools/lldb-perf/lib/Metric.h

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,12 @@
1414
#include <string>
1515
#include <mach/task_info.h>
1616

17-
#include "CFCMutableDictionary.h"
18-
1917
namespace lldb_perf {
2018

2119
class MemoryStats;
2220

23-
class WriteResults
24-
{
25-
public:
26-
virtual void
27-
Write (CFCMutableDictionary& parent) = 0;
28-
29-
virtual
30-
~WriteResults () {}
31-
};
32-
3321
template <class ValueType>
34-
class Metric : public WriteResults
22+
class Metric
3523
{
3624
public:
3725
Metric ();
@@ -64,15 +52,6 @@ class Metric : public WriteResults
6452
return NULL;
6553
return m_description.c_str();
6654
}
67-
68-
virtual void
69-
Write (CFCMutableDictionary& parent)
70-
{
71-
WriteImpl(parent, GetName(), GetDescription(), GetAverage());
72-
}
73-
74-
static void WriteImpl (CFCMutableDictionary& parent, const char *name, const char *description, double);
75-
static void WriteImpl (CFCMutableDictionary& parent, const char *name, const char *description, MemoryStats);
7655

7756
private:
7857
std::string m_name;

‎tools/lldb-perf/lib/Timer.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
#include "Timer.h"
1111
#include <assert.h>
1212

13-
#include "CFCMutableDictionary.h"
14-
#include "CFCString.h"
15-
1613
using namespace lldb_perf;
1714

1815
TimeGauge::TimeType

0 commit comments

Comments
 (0)
This repository has been archived.