|
Examples: |
|
|
|
# Load |
|
load <file> |
|
|
|
# Show named sets / known variables |
|
info |
|
|
|
# Find live objects |
|
closure roots |
|
|
|
# or give a name |
|
all = closure roots |
|
|
|
# Look into the object |
|
stats all |
|
|
|
# Filter lists from "all" into "lists" |
|
lists = filter all _List |
|
|
|
# Find empty lists into "empty-lists" |
|
empty-lists = dfilter lists ==0 |
|
|
|
# Who's using the empty lists? |
|
users empty-lists |
|
|
|
# print that info (from $0 in this case as we didn't give it a name but it was |
|
# the first one we didn't give a name) |
|
stat $0 |
|
|
|
# Filter more |
|
empty-growable-lists = filter (users empty-lists) _GrowableList |
|
|
|
# Print |
|
stats empty-growable-lists |
|
|
|
# Who's using them? |
|
retainers empty-growable-lists |
|
|
|
# Look into strings next |
|
strings = filter all String |
|
|
|
# What's inside the strings |
|
dstats strings |
|
|
|
# Who's pointing to the big strings? |
|
retainers (dfilter strings >=1024) |
|
|
|
# Small strings |
|
small-strings = dfilter strings <100 |
|
|
|
# See them |
|
dstats small-strings |
|
|
|
# Who's retaining the string "foo" |
|
f = dfilter small-strings foo |
|
retainters f |
|
|
|
# Find stuff with specific field |
|
hasField = filter all :specificField |
|
stats closure hasField :specificField |
|
foo = follow hasField :specificField |
|
stats closure foo |
|
|
|
# Stop the closure search if going into specific files |
|
stats closure foo ^file1.dart ^file2.dart ^file3.dart |
|
|