This PR adds a statistics provider cache, which allows an individual target to keep a rolling tally of it's total time and number of invocations for a given summary provider. This information is then available in statistics dump to help slow summary providers, and gleam more into insight into LLDB's time use.
16 lines
313 B
Python
16 lines
313 B
Python
import lldb
|
|
|
|
|
|
def summary(valobj, dict):
|
|
return f"[{valobj.GetChildAtIndex(0).GetValue()}]"
|
|
|
|
|
|
def __lldb_init_module(debugger, dict):
|
|
typeName = "Box<.*$"
|
|
debugger.HandleCommand(
|
|
'type summary add -x "'
|
|
+ typeName
|
|
+ '" --python-function '
|
|
+ f"{__name__}.summary"
|
|
)
|