[Lldb-commits] [lldb] r152423 - in /lldb/trunk/examples/summaries/cocoa: NSSet.py metrics.py
Enrico Granata
egranata at apple.com
Fri Mar 9 11:04:53 PST 2012
Author: enrico
Date: Fri Mar 9 13:04:53 2012
New Revision: 152423
URL: http://llvm.org/viewvc/llvm-project?rev=152423&view=rev
Log:
Fixing a problem with the NSSet summary provider; plus, providing a further optimization to the whole Cocoa formatters infrastructure
Modified:
lldb/trunk/examples/summaries/cocoa/NSSet.py
lldb/trunk/examples/summaries/cocoa/metrics.py
Modified: lldb/trunk/examples/summaries/cocoa/NSSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/summaries/cocoa/NSSet.py?rev=152423&r1=152422&r2=152423&view=diff
==============================================================================
--- lldb/trunk/examples/summaries/cocoa/NSSet.py (original)
+++ lldb/trunk/examples/summaries/cocoa/NSSet.py Fri Mar 9 13:04:53 2012
@@ -189,7 +189,7 @@
wrapper = NSCountedSet_SummaryProvider(valobj, class_data.sys_params)
statistics.metric_hit('code_notrun',valobj)
else:
- wrapper = NSSetUnknown_SummaryProvider(valobj)
+ wrapper = NSSetUnknown_SummaryProvider(valobj, class_data.sys_params)
statistics.metric_hit('unknown_class',str(valobj) + " seen as " + name_string)
return wrapper;
Modified: lldb/trunk/examples/summaries/cocoa/metrics.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/summaries/cocoa/metrics.py?rev=152423&r1=152422&r2=152423&view=diff
==============================================================================
--- lldb/trunk/examples/summaries/cocoa/metrics.py (original)
+++ lldb/trunk/examples/summaries/cocoa/metrics.py Fri Mar 9 13:04:53 2012
@@ -6,7 +6,11 @@
self.list = []
def update(self,name):
self.count = self.count + 1
- self.list.append(str(name))
+ # avoid getting the full dump of this ValueObject just to save its metrics
+ if isinstance(name,lldb.SBValue):
+ self.list.append(name.GetName())
+ else:
+ self.list.append(str(name))
def __str__(self):
return str(self.count) + " times, for items [" + str(self.list) + "]"
More information about the lldb-commits
mailing list